Public report of excalidraw/excalidraw, published 23 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 23 October 2026, 06:59 UTC · Survey ID cd_cae00e292fb941798786a20bad1cd56f

excalidraw/excalidraw

Measured 23 October 2026, 06:49 UTC, at code version 1d4dc2c

No regression since the last survey

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

CAI score 43out of 100 At risk Down 1 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 135,613 lines of product code in 10 projects, tests not counted · Estimated rebuild effort: about 1.2 person-years · Weakest lens: Production Readiness, 36

Findings by how serious they are

152 critical 1491 serious 247 minor

11 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
23 October 2026, 06:49 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

80of 83 dimensions measured by tools. The other 3 are advisory notes from an AI model, which explain the code but don't count towards the score.
1826of 1890 findings point to an exact file and line, so you can open each one in the code. The other 64 concern the repository as a whole, such as missing documentation.
83dimensions across 7 lenses, read from 135,613 lines of product code in 10 projects.
Chapters

Executive summary

excalidraw/excalidraw scores 43 out of 100, but it is rated At risk while a critical security finding is open; the score itself is unchanged. The project hasn't declared a stable release yet, so its lenses are rated against a lower bar than a released product's, while the score itself is worked out as for any repository.

The weakest lens counts most in the score, and here that is Production Readiness, which scores 36 and is rated Weak. Its Dependency Hygiene dimension scores 0 out of 10, and until that reaches 4, Production Readiness can't be rated higher than Adequate. The first actions are to resolve the 23 Deprecated finding(s) in Dependency Hygiene and to resolve the 3 No assertions (empty test) finding(s) in Test Quality, and if Production Readiness rose to 70, the score would rise from 43 to about 50.

152 findings are critical: 78 in Dependency Vulnerabilities, 23 in Dependency Hygiene, 14 in Forms & labels, 13 in Keyboard semantics, seven in Circular Imports, six in Static Analysis (SAST), three in Knowledge Freshness, three in Test Quality, two in IaC & Container Security, one in Page structure, one in Secrets (history) and one in Text alternatives.

Watchdog couldn't measure 10 dimensions in this code, among them Documentation Quality, Navigability and Platform End-of-Life, so they are left out of the score. The product code is 135,613 lines, which would take an estimated 1.2 person-years, around €170,000, to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Production Readiness 36 · counts for 46%Accessibility 42 · counts for 25%Architecture 53 · counts for 14%Code Health 54 · counts for 8%Security and Compliance 58 · counts for 4%Maturity 69 · counts for 2%Performance 100 · counts for 1%

If Production Readiness rose from 36 to 70, the lowest score rated Strong, the score would rise from 43 to about 50.

Code composition: what the lines of code are
Product code 68%Tests 32%
New since the last survey: 449 findings

These 449 critical or serious findings weren't in the previous survey, on 9 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity · export.configExportDimension (cyclomatic 58) REDACTED
  • Cyclomatic Complexity · AppSelectionTool.handleSelectionDragOnPointerMove (cyclomatic 43) packages/excalidraw/components/App.selectionTool.ts
  • Cyclomatic Complexity · AppWrap.rewrap (cyclomatic 26) packages/excalidraw/components/App.wrap.ts
  • Cyclomatic Complexity · App.selection.getSelectionStateAddingElements (cyclomatic 23) packages/excalidraw/components/App.selection.ts
  • Cyclomatic Complexity · TTDDialogOutput.TTDDialogOutput (cyclomatic 22) packages/excalidraw/components/TTDDialog/TTDDialogOutput.tsx
  • Cyclomatic Complexity · AppSelectionTool.handleBoxSelectionOnPointerMove (cyclomatic 17) packages/excalidraw/components/App.selectionTool.ts
  • Cognitive Complexity · AppSelectionTool.handleSelectionDragOnPointerMove (cognitive 61) packages/excalidraw/components/App.selectionTool.ts
  • Cognitive Complexity · export.configExportDimension (cognitive 58) REDACTED
  • Cognitive Complexity · App.selection.getSelectionStateAddingElements (cognitive 40) packages/excalidraw/components/App.selection.ts
  • Cognitive Complexity · AppWrap.rewrap (cognitive 39) packages/excalidraw/components/App.wrap.ts
  • Cognitive Complexity · AppSelectionTool.handleBoxSelectionOnPointerMove (cognitive 35) packages/excalidraw/components/App.selectionTool.ts
  • Cognitive Complexity · staticScene.renderLinkIcon (cognitive 21) packages/excalidraw/renderer/staticScene.ts
  • Cognitive Complexity · TTDDialogOutput.TTDDialogOutput (cognitive 20) packages/excalidraw/components/TTDDialog/TTDDialogOutput.tsx
  • Cognitive Complexity · actionBoundText.wrapTextsInContainers (cognitive 19) packages/excalidraw/actions/actionBoundText.tsx
  • Cognitive Complexity · App.selection.getFramesSelectedViaGroups (cognitive 17) packages/excalidraw/components/App.selection.ts
  • Cognitive Complexity · AppWrap.toggle (cognitive 16) packages/excalidraw/components/App.wrap.ts
  • God Classes · MethodTooLong: AppSelectionTool.handleSelectionDragOnPointerMove packages/excalidraw/components/App.selectionTool.ts
  • God Classes · FileTooLong: REDACTED REDACTED
  • God Classes · FunctionTooLong: TTDDialogOutput.TTDDialogOutput packages/excalidraw/components/TTDDialog/TTDDialogOutput.tsx
  • God Classes · FunctionTooLong: InteractiveCanvas.InteractiveCanvas packages/excalidraw/components/canvases/InteractiveCanvas.tsx
  • God Classes · FunctionTooLong: actionDeleteSelected.deleteSelectedElements packages/excalidraw/actions/actionDeleteSelected.tsx
  • Code Coverage · Low coverage: excalidraw-app/data/firebaseSDK.ts excalidraw-app/data/firebaseSDK.ts
  • Test Quality · Skipped test: normalize boundElements array packages/element/tests/sortElements.test.ts
  • Test Quality · Skipped test: normalizeElementsOrder() perf packages/element/tests/sortElements.test.ts
  • Test Quality · Skipped test: flips while resizing packages/element/tests/resize.test.tsx
  • Test Quality · Skipped test: resizes from center packages/element/tests/resize.test.tsx
  • Test Quality · Skipped test: should add elements packages/element/tests/frame.test.tsx
  • Test Quality · Skipped test: should add elements when there are other other elements in between packages/element/tests/frame.test.tsx
  • Test Quality · Skipped test: should add elements when there are other elements in between and the order is reversed packages/element/tests/frame.test.tsx
  • Test Quality · Skipped test: resizing over text containers and labelled arrows packages/element/tests/frame.test.tsx
  • Test Quality · Skipped test: should add arrow bound with text when frame is in a layer below packages/element/tests/frame.test.tsx
  • Test Quality · Skipped test: should add arrow bound with text when frame is in an inner layer packages/element/tests/frame.test.tsx
  • Test Quality · Skipped test: should add elements when frame is in a layer below packages/element/tests/frame.test.tsx
  • Test Quality · Skipped test: should add elements when frame is in a layer above packages/element/tests/frame.test.tsx
  • Test Quality · Skipped test: should add elements when frame is in an inner layer packages/element/tests/frame.test.tsx
  • Test Quality · Skipped test: should drag element inside, duplicate it and keep it in frame packages/element/tests/frame.test.tsx
  • Test Quality · Skipped test: should drag element inside, duplicate it and remove it from frame packages/element/tests/frame.test.tsx
  • Test Quality · Skipped test: should create orbit binding when one of the cursor is inside rectangle packages/element/tests/binding.test.tsx
  • Test Quality · Skipped test: checks nested containment against the current editing depth packages/excalidraw/tests/selection.test.tsx
  • Test Quality · Skipped test: should support undo and redo when escape unwinds nested group editing packages/excalidraw/tests/history.test.tsx
  • Test Quality · Skipped test: flips an unrotated arrow horizontally with line outside min/max points bounds packages/excalidraw/tests/flip.test.tsx
  • Test Quality · Skipped test: flips a rotated arrow horizontally with line outside min/max points bounds packages/excalidraw/tests/flip.test.tsx
  • Test Quality · Skipped test: flips an unrotated arrow vertically with line outside min/max points bounds packages/excalidraw/tests/flip.test.tsx
  • Test Quality · Skipped test: flips a rotated arrow vertically with line outside min/max points bounds packages/excalidraw/tests/flip.test.tsx
  • Test Quality · Skipped test: flips an unrotated line horizontally with line outside min/max points bounds packages/excalidraw/tests/flip.test.tsx
  • Test Quality · Skipped test: flips an unrotated line vertically with line outside min/max points bounds packages/excalidraw/tests/flip.test.tsx
  • Test Quality · Skipped test: flips a rotated line horizontally with line outside min/max points bounds packages/excalidraw/tests/flip.test.tsx
  • Test Quality · Skipped test: flips a rotated line vertically with line outside min/max points bounds packages/excalidraw/tests/flip.test.tsx
  • Test Quality · Skipped test: should bump the version of a labeled arrow when the label is updated packages/excalidraw/wysiwyg/textWysiwyg.test.tsx
  • Dependency Hygiene · Deprecated: @types/socket.io-client REDACTED
  • Churn × Complexity Hotspots · Hotspot: packages/element/src/resizeElements.ts packages/element/src/resizeElements.ts
  • Churn × Complexity Hotspots · Hotspot: packages/excalidraw/components/App.selectionTool.ts packages/excalidraw/components/App.selectionTool.ts
  • Churn × Complexity Hotspots · Hotspot: packages/excalidraw/components/TopPicksDnD/topPicksDnD.tsx packages/excalidraw/components/TopPicksDnD/topPicksDnD.tsx
  • Churn × Complexity Hotspots · Hotspot: REDACTED REDACTED
  • Churn × Complexity Hotspots · Hotspot: packages/excalidraw/components/App.clipboard.ts packages/excalidraw/components/App.clipboard.ts
  • Churn × Complexity Hotspots · Hotspot: packages/element/src/textElement.ts packages/element/src/textElement.ts
  • Churn × Complexity Hotspots · Hotspot: packages/excalidraw/components/canvases/InteractiveCanvas.tsx packages/excalidraw/components/canvases/InteractiveCanvas.tsx
  • Churn × Complexity Hotspots · Hotspot: packages/excalidraw/actions/actionStyles.ts packages/excalidraw/actions/actionStyles.ts
  • Churn × Complexity Hotspots · Hotspot: packages/excalidraw/data/index.ts packages/excalidraw/data/index.ts
  • Churn × Complexity Hotspots · Hotspot: excalidraw-app/components/AI.tsx excalidraw-app/components/AI.tsx
  • Explicit Debt · HackComment packages/excalidraw/components/App.selectionTool.ts
  • Explicit Debt · TodoComment packages/excalidraw/hooks/useLibraryItemSvg.ts
  • Boundary Type-Coupling · Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/FileManager.ts
  • Boundary Type-Coupling · Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/FileManager.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw-app) excalidraw-app/data/FileManager.ts
  • Boundary Type-Coupling · Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/FileManager.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw-app) excalidraw-app/data/FileManager.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw-app) excalidraw-app/data/FileManager.ts
  • Boundary Type-Coupling · Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/FileManager.ts
  • Boundary Type-Coupling · Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/FileManager.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw-app) excalidraw-app/data/FileManager.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw-app) excalidraw-app/data/firebase.ts
  • Boundary Type-Coupling · Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/firebase.ts
  • Boundary Type-Coupling · Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/firebase.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw-app) excalidraw-app/data/index.ts
  • Boundary Type-Coupling · Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/fileStatusStore.ts
  • Boundary Type-Coupling · Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/fileStatusStore.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw-app) excalidraw-app/data/LocalData.ts
  • Boundary Type-Coupling · Cross-context type SocketId (excalidraw → excalidraw-app) excalidraw-app/collab/Collab.tsx
  • Boundary Type-Coupling · Cross-context type SocketId (excalidraw → excalidraw-app) excalidraw-app/collab/Collab.tsx
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → common) REDACTED
  • Boundary Type-Coupling · Cross-context type ToolType (excalidraw → common) packages/common/src/utils.ts
  • Boundary Type-Coupling · Cross-context type ToolType (excalidraw → common) packages/common/src/utils.ts
  • Boundary Type-Coupling · Cross-context type ActiveTool (excalidraw → common) packages/common/src/utils.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawTextElement (element → common) packages/common/src/font-metadata.ts
  • Boundary Type-Coupling · Cross-context type GlobalPoint (math → common) packages/common/src/points.ts
  • Boundary Type-Coupling · Cross-context type LocalPoint (math → common) packages/common/src/points.ts
  • Boundary Type-Coupling · Cross-context type GlobalPoint (math → common) packages/common/src/points.ts
  • Boundary Type-Coupling · Cross-context type NullableGridSize (excalidraw → common) packages/common/src/points.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/actions/types.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/actions/types.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/actions/types.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/actions/types.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/actions/types.ts
  • Boundary Type-Coupling · Cross-context type ChartType (element → excalidraw) packages/excalidraw/charts/charts.helpers.ts
  • Boundary Type-Coupling · Cross-context type ChartType (element → excalidraw) packages/excalidraw/charts/index.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/viewport.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/viewport.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/data/types.ts
  • Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/data/types.ts

Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 341 findings

These 341 critical or serious findings were in the previous survey, on 9 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · cropElement.cropElement (cyclomatic 51) packages/element/src/cropElement.ts
  • Cognitive Complexity · cropElement.cropElement (cognitive 91) packages/element/src/cropElement.ts
  • Cognitive Complexity · frame.shouldApplyFrameClip (cognitive 16) packages/element/src/frame.ts
  • God Classes · FunctionTooLong: cropElement.cropElement packages/element/src/cropElement.ts
  • God Classes · FunctionTooLong: renderElement.drawElement packages/element/src/renderElement.ts
  • God Classes · MethodTooLong: AppSelectionTool.handleSelectionOnPointerUp packages/excalidraw/components/App.selectionTool.ts
  • Code Coverage · Low coverage: packages/element/src/elementLink.ts packages/element/src/elementLink.ts
  • Code Coverage · Low coverage: packages/excalidraw/actions/actionFrame.ts packages/excalidraw/actions/actionFrame.ts
  • Code Coverage · Low coverage: packages/excalidraw/components/ElementLinkDialog.tsx packages/excalidraw/components/ElementLinkDialog.tsx
  • Code Coverage · Low coverage: packages/excalidraw/data/index.ts packages/excalidraw/data/index.ts
  • Churn × Complexity Hotspots · Hotspot: packages/element/src/binding.ts packages/element/src/binding.ts
  • Churn × Complexity Hotspots · Hotspot: packages/element/src/linearElementEditor.ts packages/element/src/linearElementEditor.ts
  • Churn × Complexity Hotspots · Hotspot: packages/excalidraw/index.tsx packages/excalidraw/index.tsx
  • Churn × Complexity Hotspots · Hotspot: packages/excalidraw/components/MobileMenu.tsx packages/excalidraw/components/MobileMenu.tsx
  • Churn × Complexity Hotspots · Hotspot: packages/excalidraw/components/SearchMenu.tsx packages/excalidraw/components/SearchMenu.tsx
  • Churn × Complexity Hotspots · Hotspot: packages/excalidraw/components/IconButton.tsx packages/excalidraw/components/IconButton.tsx
  • Churn × Complexity Hotspots · Hotspot: packages/excalidraw/actions/manager.tsx packages/excalidraw/actions/manager.tsx
  • Churn × Complexity Hotspots · Repeated repair: packages/excalidraw/components/CursorHint.tsx packages/excalidraw/components/CursorHint.tsx
  • Explicit Debt · HackComment REDACTED
  • Explicit Debt · TodoComment packages/excalidraw/hooks/useLibraryItemSvg.ts
  • Explicit Debt · TodoComment packages/excalidraw/hooks/useLibraryItemSvg.ts
  • Dependency Vulnerabilities · Critical CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · Critical vulnerability: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Supply-chain Provenance & Signing · REDACTED
  • Code Duplication · Duplicated block with local edits (97 matched lines × 2 locations) packages/excalidraw/components/Stats/Dimension.tsx
  • Code Duplication · Duplicated block with local edits (69 matched lines × 2 locations) packages/excalidraw/components/Stats/MultiDimension.tsx
  • Code Duplication · Duplicated block with local edits (50 matched lines × 2 locations) packages/excalidraw/charts/charts.bar.ts
  • Code Duplication · Duplicated block (25 lines × 2 locations) packages/element/src/cropElement.ts
  • Code Duplication · Duplicated block (22 lines × 2 locations) packages/element/src/cropElement.ts
  • Code Duplication · Duplicated block (21 lines × 2 locations) packages/element/src/elbowArrow.ts
  • Code Duplication · Duplicated block (21 lines × 2 locations) packages/excalidraw/actions/actionZindex.tsx
  • Code Duplication · Duplicated block with local edits (21 matched lines × 2 locations) packages/excalidraw/components/Stats/FontSize.tsx
  • Code Duplication · Duplicated block (20 lines × 2 locations) excalidraw-app/components/AppSidebar.tsx
  • Code Duplication · Duplicated block (20 lines × 2 locations) packages/element/src/linearElementEditor.ts
  • Code Duplication · Duplicated block (19 lines × 2 locations) packages/excalidraw/actions/actionAlign.tsx
  • Code Duplication · Duplicated block (19 lines × 2 locations) packages/excalidraw/actions/actionBoundText.tsx
  • Code Duplication · Duplicated block (19 lines × 2 locations) packages/excalidraw/actions/actionCanvas.tsx
  • Code Duplication · Duplicated block (19 lines × 2 locations) packages/excalidraw/actions/actionToggleViewMode.tsx
  • Code Duplication · Duplicated block (19 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (19 lines × 2 locations) packages/excalidraw/components/PasteChartDialog.tsx
  • Code Duplication · Duplicated block (19 lines × 2 locations) packages/excalidraw/components/Stack.tsx
  • Code Duplication · Duplicated block (19 lines × 2 locations) packages/excalidraw/components/Stats/index.tsx
  • Code Duplication · Duplicated block (19 lines × 2 locations) packages/excalidraw/renderer/interactiveScene.ts
  • Code Duplication · Duplicated block with local edits (18 matched lines × 2 locations) excalidraw-app/components/AI.tsx
  • Code Duplication · Duplicated block (18 lines × 2 locations) excalidraw-app/components/DebugCanvas.tsx
  • Code Duplication · Duplicated block (18 lines × 2 locations) packages/element/src/cropElement.ts
  • Code Duplication · Duplicated block (18 lines × 2 locations) packages/element/src/cropElement.ts
  • Code Duplication · Duplicated block (18 lines × 2 locations) packages/element/src/delta.ts
  • Code Duplication · Duplicated block (18 lines × 2 locations) packages/excalidraw/components/PublishLibrary.tsx
  • Code Duplication · Duplicated block (18 lines × 2 locations) packages/excalidraw/components/icons.tsx
  • Code Duplication · Duplicated block (17 lines × 2 locations) packages/excalidraw/actions/actionFlip.ts
  • Code Duplication · Duplicated block (17 lines × 2 locations) packages/excalidraw/actions/actionFrame.ts
  • Code Duplication · Duplicated block (17 lines × 2 locations) packages/excalidraw/actions/actionProperties.tsx
  • Code Duplication · Duplicated block (17 lines × 2 locations) packages/excalidraw/actions/actionProperties.tsx
  • Code Duplication · Duplicated block with local edits (17 matched lines × 2 locations) packages/excalidraw/components/App.selectionTool.ts
  • Code Duplication · Duplicated block with local edits (17 matched lines × 2 locations) packages/excalidraw/components/LockButton.tsx
  • Code Duplication · Duplicated block (17 lines × 2 locations) packages/excalidraw/components/PublishLibrary.tsx
  • Code Duplication · Duplicated block (17 lines × 2 locations) packages/excalidraw/components/icons.tsx
  • Code Duplication · Duplicated block (17 lines × 3 locations) packages/excalidraw/snapping.ts
  • Code Duplication · Duplicated block (16 lines × 2 locations) packages/common/src/utils.ts
  • Code Duplication · Duplicated block (16 lines × 2 locations) packages/element/src/bucketFill.ts
  • Code Duplication · Duplicated block (16 lines × 2 locations) packages/element/src/delta.ts
  • Code Duplication · Duplicated block (16 lines × 3 locations) packages/element/src/embeddable.ts
  • Code Duplication · Duplicated block (16 lines × 2 locations) packages/element/src/embeddable.ts
  • Code Duplication · Duplicated block (16 lines × 2 locations) packages/element/src/frame.ts
  • Code Duplication · Duplicated block (16 lines × 2 locations) packages/element/src/resizeElements.ts
  • Code Duplication · Duplicated block (16 lines × 2 locations) packages/element/src/shape.ts
  • Code Duplication · Duplicated block (16 lines × 2 locations) packages/excalidraw/actions/actionClipboard.tsx
  • Code Duplication · Duplicated block (16 lines × 3 locations) packages/excalidraw/actions/actionProperties.tsx
  • Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) packages/excalidraw/actions/actionToggleArrowBinding.tsx
  • Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) packages/excalidraw/actions/actionToggleArrowBinding.tsx
  • Code Duplication · Duplicated block (16 lines × 2 locations) packages/excalidraw/components/Actions.tsx
  • Code Duplication · Duplicated block (16 lines × 2 locations) packages/excalidraw/components/App.selectionTool.ts
  • Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) packages/excalidraw/components/FilledButton.tsx
  • Code Duplication · Duplicated block (16 lines × 5 locations) packages/excalidraw/components/icons.tsx
  • Code Duplication · Duplicated block (16 lines × 2 locations) packages/excalidraw/components/main-menu/DefaultItems.tsx
  • Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) packages/excalidraw/components/main-menu/DefaultItems.tsx
  • Code Duplication · Duplicated block (16 lines × 5 locations) packages/excalidraw/snapping.ts
  • Code Duplication · Duplicated block (16 lines × 2 locations) packages/excalidraw/snapping.ts
  • Code Duplication · Duplicated block (16 lines × 2 locations) packages/math/src/curve.ts
  • Code Duplication · Duplicated block (15 lines × 2 locations) packages/element/src/renderElement.ts
  • Code Duplication · Duplicated block (15 lines × 2 locations) packages/element/src/textElement.ts
  • Code Duplication · Duplicated block (15 lines × 2 locations) packages/element/src/utils.ts
Rebuild cost: about €170,000 · Estimate
Cost to rebuild€58,000 to €290,000, for 967 to 3,067 hours of work, about 1.2 person-years for 1 to 3 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 43. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 135,613 lines of product code

How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Resolve the 23 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (23).
Raises the score by about 6 points · Medium effort · Dependency Hygiene
2
Resolve the 3 No assertions (empty test) finding(s) in Test Quality — start with Sidebar.test.tsx (2), history.test.tsx.
Raises the score by about 2 points · Low effort · Test Quality
3
Adopt pino (or winston) and log at meaningful points in the services you run.
Raises the score by about 5 points · Medium effort · Observability

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Files that change often carry extra risk · Combined risk
4 files are changed often and are hard to read, which makes them the likeliest places for a mistake. They also have under half their code tested, or were written almost entirely by one person, so a mistake there is less likely to be caught, or only one person knows the code well enough to avoid it. A change to these files therefore carries more risk than the overall score suggests.
Based on: Churn × Complexity Hotspots (41 files) · Code Coverage (118 files under half tested) · Bus Factor (0 files written almost entirely by one person) · The files: CommandPalette.tsx, ConvertElementTypePopup.tsx and index.ts
What to do: Add tests to these files and have a second person review every change to them, starting with CommandPalette.tsx, ConvertElementTypePopup.tsx and index.ts.
Where the investment is most exposed · Value at risk
This code would cost about €170,000 to build again, about 1.2 person-years of work. Its weakest lens is Production Readiness, at 36 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 23 Deprecated finding(s) in Dependency Hygiene. Of all the actions in this report, it raises the score most for the work it takes: about 6 points for medium effort, because it clears the 23 Dependency Hygiene findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 4.5 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 9% to 20% on every change. The history of the code shows how much it changes: about 66,851 lines over the last 90 days, which is about 271,118 lines a year. At that pace, the extra work comes to an estimated 58.9 to 353.4 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch @excalidraw/common common @excalidraw/element element @excalidraw/element->@excalidraw/common @excalidraw/fractional-indexing fractional-indexing @excalidraw/element->@excalidraw/fractional-indexing @excalidraw/math math @excalidraw/element->@excalidraw/math @excalidraw/excalidraw excalidraw @excalidraw/excalidraw->@excalidraw/common @excalidraw/excalidraw->@excalidraw/element @excalidraw/laser-pointer laser-pointer @excalidraw/excalidraw->@excalidraw/laser-pointer @excalidraw/excalidraw->@excalidraw/math @excalidraw/math->@excalidraw/common @excalidraw/utils utils @excalidraw/utils->@excalidraw/laser-pointer excalidraw-app excalidraw-app

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

240 modules, with 324 dependencies between them. 2 loops run through 25 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 200 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 packages.common.src.constants2 packages.common.src.utility-types3 packages.element.src.transformHandles4 packages.element.src.types5 packages.excalidraw.actions.types6 packages.excalidraw.components.ColorPicker7 packages.excalidraw.components.ColorPicker.colorPickerUtils8 packages.excalidraw.components.FontPicker9 packages.excalidraw.components.TTDDialog.types10 packages.math.src.types11 packages.element.src.Scene12 packages.excalidraw.components.App_arrowText13 packages.excalidraw.components.TTDDialog14 packages.excalidraw.types15 excalidraw-app.collab.Collab16 packages.common.src17 packages.element.src.delta18 packages.element.src.flowchart19 packages.excalidraw20 packages.excalidraw.actions21 packages.excalidraw.components.App_text22 packages.excalidraw.components.App_wrap23 packages.excalidraw.components.Stats.Angle24 packages.excalidraw.components.Stats.Dimension25 packages.excalidraw.components.Stats.FontSize26 packages.excalidraw.components.hyperlink27 packages.excalidraw.data28 excalidraw-app.collab.Portal29 packages.excalidraw.components.App_flowchart30 packages.excalidraw.components.Stats31 excalidraw-app.data32 packages.excalidraw.components.App33 excalidraw-app34 packages.element.src.store35 packages.excalidraw.animatedTrail36 packages.excalidraw.components37 packages.element.src.linearElementEditor38 packages.excalidraw.lasso39 packages.element.src40 packages.element.src.arrows
1 packages.common.src.constants
2 packages.common.src.utility-types
3 packages.element.src.transformHandles
4 packages.element.src.types
5 packages.excalidraw.actions.types
6 packages.excalidraw.components.ColorPicker
7 packages.excalidraw.components.ColorPicker.colorPickerUtils
8 packages.excalidraw.components.FontPicker
9 packages.excalidraw.components.TTDDialog.types
10 packages.math.src.types
11 packages.element.src.Scene2
12 packages.excalidraw.components.App_arrowText311
13 packages.excalidraw.components.TTDDialog2
14 packages.excalidraw.types14
15 excalidraw-app.collab.Collab121
16 packages.common.src222
17 packages.element.src.delta111
18 packages.element.src.flowchart311
19 packages.excalidraw135
20 packages.excalidraw.actions185212
21 packages.excalidraw.components.App_text111
22 packages.excalidraw.components.App_wrap111
23 packages.excalidraw.components.Stats.Angle111
24 packages.excalidraw.components.Stats.Dimension111
25 packages.excalidraw.components.Stats.FontSize111
26 packages.excalidraw.components.hyperlink232
27 packages.excalidraw.data155
28 excalidraw-app.collab.Portal111
29 packages.excalidraw.components.App_flowchart111
30 packages.excalidraw.components.Stats4132111
31 excalidraw-app.data21
32 packages.excalidraw.components.App4113111111
33 excalidraw-app121
34 packages.element.src.store1121
35 packages.excalidraw.animatedTrail11
36 packages.excalidraw.components811611
37 packages.element.src.linearElementEditor2121
38 packages.excalidraw.lasso12111
39 packages.element.src1859251218111
40 packages.element.src.arrows11121
Uses a module listed above itPart of a loopThe module itself
1 packages.common.src.constants2 packages.common.src.utility-types3 packages.element.src.transformHandles4 packages.element.src.types5 packages.excalidraw.actions.types6 packages.excalidraw.components.ColorPicker7 packages.excalidraw.components.ColorPicker.colorPickerUtils8 packages.excalidraw.components.FontPicker9 packages.excalidraw.components.TTDDialog.types10 packages.math.src.types11 packages.element.src.Scene12 packages.excalidraw.components.App_arrowText13 packages.excalidraw.components.TTDDialog14 packages.excalidraw.types15 excalidraw-app.collab.Collab16 packages.common.src17 packages.element.src.delta18 packages.element.src.flowchart19 packages.excalidraw20 packages.excalidraw.actions21 packages.excalidraw.components.App_text22 packages.excalidraw.components.App_wrap23 packages.excalidraw.components.Stats.Angle24 packages.excalidraw.components.Stats.Dimension25 packages.excalidraw.components.Stats.FontSize26 packages.excalidraw.components.hyperlink27 packages.excalidraw.data28 excalidraw-app.collab.Portal29 packages.excalidraw.components.App_flowchart30 packages.excalidraw.components.Stats31 excalidraw-app.data32 packages.excalidraw.components.App33 excalidraw-app34 packages.element.src.store35 packages.excalidraw.animatedTrail36 packages.excalidraw.components37 packages.element.src.linearElementEditor38 packages.excalidraw.lasso39 packages.element.src40 packages.element.src.arrowspackages.common.src.constants1packages.common.src.utility-types2packages.element.src.transformHandles3packages.element.src.types4packages.excalidraw.actions.types5packages.excalidraw.components.ColorPicker6packages.excalidraw.components.ColorPicker.colorPickerUtils7packages.excalidraw.components.FontPicker8packages.excalidraw.components.TTDDialog.types9packages.math.src.types10packages.element.src.Scene11packages.excalidraw.components.App_arrowText12packages.excalidraw.components.TTDDialog13packages.excalidraw.types14excalidraw-app.collab.Collab15packages.common.src16packages.element.src.delta17packages.element.src.flowchart18packages.excalidraw19packages.excalidraw.actions20packages.excalidraw.components.App_text21packages.excalidraw.components.App_wrap22packages.excalidraw.components.Stats.Angle23packages.excalidraw.components.Stats.Dimension24packages.excalidraw.components.Stats.FontSize25packages.excalidraw.components.hyperlink26packages.excalidraw.data27excalidraw-app.collab.Portal28packages.excalidraw.components.App_flowchart29packages.excalidraw.components.Stats30excalidraw-app.data31packages.excalidraw.components.App32excalidraw-app33packages.element.src.store34packages.excalidraw.animatedTrail35packages.excalidraw.components36packages.element.src.linearElementEditor37packages.excalidraw.lasso38packages.element.src39packages.element.src.arrows4023112141212221113111351852121111111111111112321551111114132111214113111111121112111811611212112111185925121811111121+200 more modules (most-connected shown)

At a glance — Code Health · 54% · Adequate · gated by D1, D2, R3 ·

At a glance — Architecture · 53% · Adequate · gated by R9 ·

At a glance — Maturity · 69% · Strong ·

At a glance — Readiness · 36% · Weak · gated by R8, P2, P3 ·

At a glance — Security · 58% · Adequate · gated by D29, D30, D36 ·

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

At a glance — Performance · 100% · Exemplary ·

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
A03:2025 — Software Supply Chain Failures139High / Critical
A05:2025 — Injection30High / Critical
A02:2025 — Security Misconfiguration3High / Critical
A07:2025 — Authentication Failures2High / Critical

Roadmap

Begin by resolving deprecated dependencies in REDACTED and cleaning up unused or unlisted packages to stabilize the codebase. Next, implement structured logging with pino or winston across all services to establish baseline observability. Integrate a static analysis tool into the CI pipeline to prevent security regressions from reaching production. Finally, ensure all custom controls are fully keyboard-accessible and anchors have valid hrefs to improve accessibility.

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

Do thisHelpsEffortDimension
Resolve the 23 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (23).+5.8 ptsMediumDependency Hygiene
Resolve the 3 No assertions (empty test) finding(s) in Test Quality — start with Sidebar.test.tsx (2), history.test.tsx.+2.3 ptsLowTest Quality
Adopt pino (or winston) and log at meaningful points in the services you run.+4.5 ptsMediumObservability
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.+4.5 ptsMediumSecurity & performance tooling
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+4.5 ptsMediumDependency Hygiene
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+2.7 ptsMediumKeyboard semantics
Resolve the 3 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED (3).+1.2 ptsLowDependency Hygiene
Resolve the 1 No ADRs found finding(s) in ADR Quality.+0.7 ptsLowADR Quality

File quality

Per-file score 0–10 — a quality signature. Of 318 files carrying findings, judged against the Preview bar: 1% slop · 32% mixed · 67% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED2.8SlopStatic Analysis (SAST): High: REDACTED
packages/excalidraw/tests/history.test.tsx3.0MixedTest Quality: No assertions (empty test): should unbind remotely deleted bindable elements from arrow when the arrow is added through the history
REDACTED3.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
packages/element/src/binding.ts4.0MixedCyclomatic Complexity: binding.getBindingStrategyForDraggingBindingElementEndpoints_simple (cyclomatic 66)
packages/excalidraw/components/ConvertElementTypePopup.tsx4.0MixedCyclomatic Complexity: ConvertElementTypePopup.convertElementTypes (cyclomatic 28)
packages/element/src/arrows/focus.ts4.0MixedCyclomatic Complexity: focus.handleFocusPointDrag (cyclomatic 26)
REDACTED4.1MixedStatic Analysis (SAST): High: REDACTED
packages/element/src/utils.ts4.2MixedCyclomatic Complexity: utils.projectFixedPointOntoDiagonal (cyclomatic 21)
REDACTED4.3MixedDependency Vulnerabilities: Critical CVE: REDACTED
packages/excalidraw/components/Sidebar/Sidebar.test.tsx4.4MixedTest Quality: No assertions (empty test): should be user-dockable when both `onDock` and `docked` supplied
packages/element/src/collision.ts4.4MixedCyclomatic Complexity: collision.hitElementItself (cyclomatic 21)
packages/element/src/dragElements.ts4.6MixedCyclomatic Complexity: dragElements.dragSelectedElements (cyclomatic 27)
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
packages/excalidraw/components/App.selection.ts4.8MixedCyclomatic Complexity: App.selection.getSelectionStateAddingElements (cyclomatic 23)
packages/element/src/bucketFill.ts4.8MixedCyclomatic Complexity: bucketFill.buildFaces (cyclomatic 80)
packages/excalidraw/components/App.duplicate.ts4.8MixedCyclomatic Complexity: AppDuplicate.duplicateDraggedSelection (cyclomatic 18)

How the grades work

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

Critical — 152

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 1491

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 247

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

Could not be resolved — 11

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

Methodology & how to trust this report

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. 80 of 83 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 1.0 — 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 — 83 dimensions across the health lenses
D1D2D3D5D6D8D9D10D11D12D13D14D15D16D17D20D21D22D23D26D28D29D30D31D34D35D36D43AC1AC2AC3AC4AC5AC6AC7AX10AX3AX4AX6GD1IC1M1M2M3M4P1P10P2P3P4P6PF3R1R10R11R2R3R4R6R7R8R9S1X1X12X13X14X15X16X17X18X19X2X21X22X23X24X25X28X29X3X30X5

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, 1826 of 1890 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ 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 01a16786-089c-7aa6-a7bf-a09b2d95cea0.

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.

  • D19 Documentation Quality — 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.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `packages/excalidraw/components/TTDDialog/utils/mermaidValidation.ts`, `REDACTED` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • D44 Platform End-of-Life — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a REDACTED) is simply not read here yet.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (docker-compose.yml). compose up failed (exit 17 — an image could not be built) — -slim@sha256:2c605dbeab79a6b2a63340474fe58119d0ef95bdc4b1f41df0aa689659b3d13b: failed to resolve source metadata for docker.io/library/nginx:stable-alpine-slim@sha256:2c605dbeab79a6b2a63340474fe58119d0ef95bdc4b1f41df0aa689659b3d13b: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/sha256:2c605dbeab79a6b2a63340474fe58119d0ef95bdc4b1f41df0aa689659b3d13b": Forbidden; runtime evidence skipped.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'firebase/app' is imported (excalidraw-app/data/firebaseSDK.ts:7), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'firebase/app' is imported (excalidraw-app/data/firebaseSDK.ts:7), but this repository stands up no server and carries no migration or rules file this check reads, so who may read and write its data could not be decided.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'firebase/app' is imported (excalidraw-app/data/firebaseSDK.ts:7), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'firebase/app' is imported (excalidraw-app/data/firebaseSDK.ts:7), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'firebase/app' is imported (excalidraw-app/data/firebaseSDK.ts:7), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • IC1 Incompleteness & stubs — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 3 further occurrence(s) are not listed individually; the score already reflects all 43.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 210 further occurrence(s) are not listed individually; the score already reflects all 250.
  • R3 Large Files — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 38 further occurrence(s) are not listed individually; the score already reflects all 78.
  • R7 Dead Code — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 15 further occurrence(s) are not listed individually; the score already reflects all 55.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations: 15 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.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside Watchdog's isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
  • D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

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

Dimensions

D1 · Cyclomatic Complexity2.0 / 10Critical✓ Tool-verified

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

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

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

183 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was App.onPointerUpFromPointerDownHandler at 133. A further 4 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 ElementsDelta.checkForVisibleDifference at 19 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: packages/element/src/typeChecks.ts (typeChecks.isExcalidrawElement at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

textWysiwyg.textWysiwyg::onPointerDown (cyclomatic 21) · ×2packages/excalidraw/wysiwyg/textWysiwyg.tsx:1168
App.onPointerUpFromPointerDownHandler (cyclomatic 133)REDACTED:9448
App.handleCanvasPointerMove (cyclomatic 94)REDACTED:6848
staticSvgScene.renderElementToSvg (cyclomatic 93)REDACTED:97
App.ExcalidrawWrapper (cyclomatic 92)REDACTED:375

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

What to do

  1. Bring the 15 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with App.onPointerUpFromPointerDownHandler (cyclomatic 133), App.handleCanvasPointerMove (cyclomatic 94), staticSvgScene.renderElementToSvg (cyclomatic 93). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 15 together lifts Cyclomatic Complexity from 2.0 to about 4.1/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. 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.0 / 10Critical✓ Tool-verified

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

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

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

237 method(s) exceeded the cognitive complexity threshold of 15; the worst was bucketFill.buildFaces at 191.

textWysiwyg.textWysiwyg::updateWysiwygStyle (cognitive 38) · ×2packages/excalidraw/wysiwyg/textWysiwyg.tsx:337
bucketFill.buildFaces (cognitive 191)packages/element/src/bucketFill.ts:717
App.onPointerUpFromPointerDownHandler (cognitive 161)REDACTED:9448
staticSvgScene.renderElementToSvg (cognitive 155)REDACTED:97
resizeElements.resizeMultipleElements (cognitive 136)packages/element/src/resizeElements.ts:1234

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

What to do

  1. Bring the 88 bodies over 30 down to 30 or less in Cognitive Complexity — start with bucketFill.buildFaces (cognitive 191), App.onPointerUpFromPointerDownHandler (cognitive 161), staticSvgScene.renderElementToSvg (cognitive 155). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 88 together lifts Cognitive Complexity from 2.0 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
  2. 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 Classes7.1 / 10Strong✓ Tool-verified

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

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

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

143 god class(es) detected.

FunctionTooLong: App.ExcalidrawWrapper · ×73REDACTED:375
FileTooLong: REDACTED · ×41REDACTED
MethodTooLong: App.onPointerUpFromPointerDownHandler · ×20REDACTED:9448
ClassTooLong: LinearElementEditor · ×6packages/element/src/linearElementEditor.ts:143
TooManyMethods: App · ×3REDACTED:583

What to do

  1. Resolve the 73 FunctionTooLong finding(s) in God Classes — start with elbowArrow.ts (6), binding.ts (5), interactiveScene.ts (3). — One of this dimension's main actionable groups (73 warning-level).
  2. Resolve the 41 FileTooLong finding(s) in God Classes — start with REDACTED (2), utils.ts (2), binding.ts. — One of this dimension's main actionable groups (41 warning-level).
  3. Resolve the 20 MethodTooLong finding(s) in God Classes — start with REDACTED (12), linearElementEditor.ts (2), App.clipboard.ts (2). — One of this dimension's main actionable groups (20 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D5 · Coupling8.0 / 10Strong✓ Tool-verified

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

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

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

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

8 production modules (npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 3 module(s) off the main sequence.

Off the main sequence: @excalidraw/fractional-indexing · ×2
Off the main sequence: @excalidraw/common

What to do

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

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

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

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

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

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

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

2 of 56 classes have LCOM4 above 3.

Low cohesion: App (LCOM4 7) · ×2REDACTED:583

What to do

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

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

D8 · Code Coverage9.8 / 10Stronggated by 129 serious findings✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from coverlet runs or committed reports (Cobertura/OpenCover/lcov), computed per-file with structured exclusions for generated, trivial, and glue code. When the suite can't be built/run in-image AND no report is committed, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

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

Line coverage 74.1% — 129 file(s) below 50%. Measured from the JavaScript/TypeScript suite (vitest + @vitest/coverage-v8 via `yarn install --frozen-lockfile --ignore-scripts` in the repository root).

Low coverage: dev-docs/docusaurus.config.js · ×129dev-docs/docusaurus.config.js:1

What to do

  1. Resolve the 129 Low coverage finding(s) in Code Coverage — start with types.ts (8), index.tsx (4), index.js (2). — One of this dimension's main actionable groups (129 warning-level).
  2. Enforce Code Coverage in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

2299 test methods: 2299 unit, 0 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 2299 `it`/`test` case(s) across 148 test file(s) declaring at least one; its tier split is read from package names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality9.6 / 10Adequategated by 3 critical findings✓ Tool-verified

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

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

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

29 skipped (2 with a documented reason), 18 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 2299 tests.

No assertions (empty test): should be user-dockable when both `onDock` and `docked` supplied · ×3packages/excalidraw/components/Sidebar/Sidebar.test.tsx:278
Skipped test: normalize boundElements array · ×27packages/element/tests/sortElements.test.ts:385
No assertions: duplication z order with Cmd+D for the lowest z-ordered element should be +1 for the clone · ×15packages/element/tests/duplicate.test.tsx:551
Mock-dominated test: preserves a pending visual update when followed by an equivalent snapshot · ×3packages/excalidraw/tests/renderOverrides.test.tsx:187
Skipped (documented): should not rotate the bound text and update position of bound text and bounding box correctly when arrow rotated · ×2packages/element/tests/linearElementEditor.test.tsx:1401

What to do

  1. Resolve the 3 No assertions (empty test) finding(s) in Test Quality — start with Sidebar.test.tsx (2), history.test.tsx. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 27 Skipped test finding(s) in Test Quality — start with frame.test.tsx (11), flip.test.tsx (8), sortElements.test.ts (2). — One of this dimension's main actionable groups (27 warning-level).
  3. Resolve the 15 No assertions finding(s) in Test Quality — start with duplicate.test.tsx (12), Sidebar.test.tsx (3). — One of this dimension's main actionable groups (15 warning-level).
  4. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

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

0 flaky across 1 measured tier(s). JavaScript/TypeScript (vitest via `yarn install --frozen-lockfile --ignore-scripts` in the repository root (2554 tests)): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

D12 · Dependency Hygiene7.7 / 10Strong✓ Tool-verified

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

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

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

37 outdated direct production npm dependency(ies) of 52 graded, 0 pinning defect(s), across 11 REDACTED (8 of them the product) and 3 committed lockfile(s). Development dependencies are deliberately not graded for currency: that grade is about what SHIPS. 1 direct dependency(ies) — production, development or optional — are marked DEPRECATED by their publisher (the registry's per-version mark, or the lockfile's copy of it when the registry could not be asked); deprecated transitive packages are listed but not charged. Whether any is UNMAINTAINED is not graded — the registry publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, and the frontend dependency lens (R8) answers it in this same run. Known CVEs in this dependency graph are D30's question, read from the manifest there.

Deprecated: @types/socket.io-clientREDACTED:19
Deprecated: @babel/plugin-proposal-class-properties · ×23REDACTED:299
Outdated (npm): cross-env · ×3REDACTED:96
Outdated (npm): @braintree/sanitize-url · ×34

What to do

  1. Resolve the 23 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (23). — One of this dimension's main actionable groups (23 recommendation-level).
  2. Resolve the 3 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED (3). — One of this dimension's main actionable groups (3 recommendation-level).
  3. Resolve the 1 Deprecated finding(s) in Dependency Hygiene — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D13 · 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: Documented → Verified → Prevented · 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.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

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

0 of 52 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 52 production dependency(ies) this repository's committed lockfile resolves, across 8 product REDACTED manifest(s). Its 74 `devDependencies` declaration(s) are excluded: a consumer installs none of them. ★ DEPTH: this is the DIRECT production set the lockfile resolves, NOT the transitive closure — only one of the four lock dialects this pass reads states a full graph, so a banned licence pulled in only by a dependency's OWN dependencies is outside this verdict, exactly as the JVM arm's declaration-site verdict is. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. This repository publishes itself under CC0-1.0 / MIT, which is its own choice and is not judged here.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots8.2 / 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: Documented → Verified → Prevented · effective 8.2 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: REDACTED (43×133=5719); packages/excalidraw/wysiwyg/textWysiwyg.tsx (11×142=1562); packages/excalidraw/renderer/interactiveScene.ts (6×79=474)

Hotspot: REDACTED · ×42REDACTED:9448

What to do

  1. Resolve the 42 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (2), textWysiwyg.tsx, interactiveScene.ts. — One of this dimension's main actionable groups (42 warning-level).

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

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

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

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

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

19 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is packages/excalidraw/components/App.viewport.ts. Counted over 288 of the 510 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

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

D17 · Explicit Debt9.8 / 10Stronggated by 107 serious findings✓ Tool-verified

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

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

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

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

TodoComment · ×89REDACTED:449
FixmeComment · ×13packages/common/src/colors.ts:166
HackComment · ×5excalidraw-app/collab/Collab.tsx:399

What to do

  1. Resolve the 89 TodoComment finding(s) in Explicit Debt — start with flip.test.tsx (9), delta.ts (7), history.test.tsx (5). — One of this dimension's main actionable groups (89 warning-level).
  2. Resolve the 13 FixmeComment finding(s) in Explicit Debt — start with textMeasurements.ts (2), zindex.test.tsx (2), actionDuplicateSelection.test.tsx (2). — One of this dimension's main actionable groups (13 warning-level).
  3. Resolve the 5 HackComment finding(s) in Explicit Debt — start with Collab.tsx, App.selectionTool.ts, Popover.tsx. — One of this dimension's main actionable groups (5 warning-level).
  4. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

No architecture decision records were found.

No ADRs found

What to do

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

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

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

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

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

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D22 · Internal API ConsistencyStrong◐ Sampled · advisory

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

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

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

3 API inconsistencies across a 400-member sample of 177 exposed types.

Redundant utility methods that duplicate native Array.prototype.findIndex and Array.prototype.findLastIndex. While these might exist for older environment support, exposing them in a general utility namespace alongside native-like names creates confusion about whether to use the native method or the utility.
Naming inconsistency and potential overlap. `arrayToMap` accepts an existing Map, suggesting it might be a converter or merger, while `arrayToMapWithIndex` implies creating a map from an array. The distinction between 'Map' (key-value) and 'Map with Index' (index-keyed) is unclear, and `arrayToMap`'s behavior with an input Map is ambiguous compared to the explicit `arrayToMapWithIndex`.
Semantic overlap between `isWritableElement` and `isInputLike`. Both check for editable input elements. `isInputLike` includes `HTMLSelectElement` while `isWritableElement` does not, but the naming convention is inconsistent (`Writable` vs `InputLike`) and the distinction is subtle and domain-specific, potentially confusing consumers who just want to know if an element is an 'input'.

What to do

  1. Resolve the 1 Redundant utility methods that duplicate native… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Naming inconsistency and potential overlap. `arrayToMap` accepts an… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Semantic overlap between `isWritableElement` and `isInputLike`. Both… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).

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

D23 · Boundary Type-Coupling6.3 / 10Adequate✓ Tool-verified

What it measures: Whether domain types (IDs, enums, value objects) leak across bounded-context boundaries.

Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.

Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.

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

254 domain type(s) cross context boundaries across 10 contexts.

Cross-context type ExcalidrawElement (element → excalidraw) · ×72packages/excalidraw/actions/types.ts:166
Cross-context type GlobalPoint (math → element) · ×47packages/element/src/arrowEndpointText.ts:61
Cross-context type ExcalidrawTextElement (element → excalidraw) · ×15packages/excalidraw/fonts/Fonts.ts:164
Cross-context type ElementOrToolType (excalidraw → element) · ×13packages/element/src/typeChecks.ts:159
Cross-context type FileId (element → excalidraw-app) · ×9excalidraw-app/data/FileManager.ts:45

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

What to do

  1. Resolve the 72 Cross-context type ExcalidrawElement (element → excalidraw) finding(s) in Boundary Type-Coupling — start with types.ts (17), REDACTED (11), actionBoundText.tsx (5). — One of this dimension's main actionable groups (72 warning-level).
  2. Resolve the 47 Cross-context type GlobalPoint (math → element) finding(s) in Boundary Type-Coupling — start with linearElementEditor.ts (12), binding.ts (7), collision.ts (6). — One of this dimension's main actionable groups (47 warning-level).
  3. Resolve the 15 Cross-context type ExcalidrawTextElement (element → excalidraw) finding(s) in Boundary Type-Coupling — start with actionBoundText.tsx (4), App.text.ts (3), textAutoResizeHandle.ts (2). — One of this dimension's main actionable groups (15 warning-level).
  4. Enforce Boundary Type-Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D26 · Project Cohesion6.0 / 10Adequate✓ Tool-verified

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

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

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

2 of 10 build units (npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

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

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

30 finding(s): 0 critical, 6 high, 24 medium, 0 low. semgrep hit a parse error in 3 file(s) — `excalidraw-app/index.html` (line 100, line 130, line 134, …), `packages/excalidraw/components/TTDDialog/utils/mermaidValidation.ts` (line 24), `REDACTED` (line 1217, lines 1222–1223) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

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

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

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

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

124 finding(s): 8 critical, 70 high, 34 medium, 12 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D31 · IaC & Container Security9.2 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

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

3 finding(s): 0 critical, 2 high, 1 medium, 0 low.

REDACTED
REDACTED

What to do

  1. Resolve the 2 High IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 Medium IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

D34 · Knowledge Freshness9.0 / 10Adequategated by 3 critical findings✓ Tool-verified

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

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

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

30 of 288 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is packages/excalidraw/fonts/Xiaolai/index.ts. Counted over 288 of the 510 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×3packages/excalidraw/fonts/Xiaolai/index.ts:1
Orphaned file · ×27packages/excalidraw/actions/actionAlign.tsx:1
Further orphaned files (smaller)

What to do

  1. Resolve the 3 Orphaned knowledge finding(s) in Knowledge Freshness — start with index.ts, initialData.js, store.ts. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 27 Orphaned file finding(s) in Knowledge Freshness — start with actionAlign.tsx, index.ts, history.ts. — One of this dimension's main actionable groups (27 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling9.8 / 10Stronggated by 7 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: index.ts↔types.ts 89%; AppMainMenu.tsx↔AppWelcomeScreen.tsx 70%; REDACTED↔HintViewer.tsx 68%

Change coupling: index.ts ↔ types.ts · ×7packages/excalidraw/actions/index.ts:1

What to do

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

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: Documented → Verified → Prevented · effective 2.5 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives4.3 / 10Weak✓ Tool-verified

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

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

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

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. — REDACTED:10602
  • A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. — packages/excalidraw/components/canvases/NewElementCanvas.tsx:49

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels5.2 / 10Adequate✓ Tool-verified

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

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

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

  • This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×2) — excalidraw-app/components/TopErrorBoundary.tsx:132, packages/excalidraw/components/TTDDialog/TTDDialogPanel.tsx:102
  • This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×5) — excalidraw-app/components/TopErrorBoundary.tsx:133, REDACTED:2212, packages/excalidraw/components/ImageExportDialog.tsx:206, …
  • A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one. (×2) — packages/excalidraw/actions/actionProperties.tsx:1698, packages/excalidraw/components/Actions.tsx:182
  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×2) — packages/excalidraw/components/ColorPicker/ShadeList.tsx:113, packages/excalidraw/components/TTDDialog/Chat/ChatInterface.tsx:175
  • This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×3) — packages/excalidraw/components/CommandPalette/CommandPalette.tsx:892, packages/excalidraw/components/LibraryMenuItems.tsx:398, packages/excalidraw/components/SearchMenu.tsx:348
  • This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×3) — packages/excalidraw/components/ElementLinkDialog.tsx:122, packages/excalidraw/components/ImageExportDialog.tsx:294, packages/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.tsx:37
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×5) — packages/excalidraw/components/QuickSearch.tsx:19, packages/excalidraw/components/TTDDialog/Chat/ChatInterface.tsx:154, packages/excalidraw/components/TTDDialog/TTDDialogInput.tsx:117, …

What to do

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

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

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

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

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. — excalidraw-app/index.html:2
  • 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. — excalidraw-app/index.html:6

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 semantics2.1 / 10Weak✓ Tool-verified

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

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

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

  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×8) — packages/excalidraw/actions/actionNavigate.tsx:98, packages/excalidraw/components/Avatar.tsx:28, packages/excalidraw/components/CommandPalette/CommandPalette.tsx:1009, …
  • This <div> binds pointerdown and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click. — REDACTED:2266
  • A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}. (×2) — packages/excalidraw/components/ColorPicker/ColorInput.tsx:123, packages/excalidraw/components/LibraryMenuItems.tsx:341
  • This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. (×3) — packages/excalidraw/components/ColorPicker/ColorPicker.tsx:419, packages/excalidraw/components/FontPicker/FontPicker.tsx:253, packages/excalidraw/components/Modal.tsx:49
  • This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — packages/excalidraw/components/ColorPicker/Picker.tsx:152
  • This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus. (×2) — packages/excalidraw/components/LibraryUnit.tsx:53, packages/excalidraw/components/Toast.tsx:59

What to do

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

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

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

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

AC6 · Visual & motion safety4.8 / 10Adequate✓ Tool-verified

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

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

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

  • `.excalidraw:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — packages/excalidraw/css/styles.scss:79, packages/excalidraw/components/ToolPopover.scss:16
  • `.excalidraw .ConvertElementTypePopup:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/ConvertElementTypePopup.scss:15
  • `.excalidraw .Modal__content:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/Modal.scss:78
  • `.excalidraw .popover` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/Popover.scss:5
  • `.excalidraw .range-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/Range.scss:27
  • `.excalidraw .layer-ui__result-item` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/SearchMenu.scss:109
  • `.excalidraw .ExcTextField__input input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/TextField.scss:82
  • `.excalidraw .UnlockPopup:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/UnlockPopup.scss:19
  • `.excalidraw-hyperlinkContainer-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/hyperlink/Hyperlink.scss:37
  • `.excalidraw .top-picks-dnd__context-menu-item` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/TopPicksDnD/TopPicksDnD.scss:118
  • `.excalidraw .ttd-dialog-content` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/TTDDialog/TTDDialog.scss:108
  • `.excalidraw .ttd-dialog-input--codemirror .cm-editor.cm-focused` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/TTDDialog/TTDDialog.scss:242
  • `.excalidraw .chat-interface__input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/TTDDialog/Chat/Chat.scss:119
  • `.excalidraw .drag-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/Stats/DragInput.scss:44
  • `.excalidraw .sidebar-tabs-root [role="tabpanel"]` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/Sidebar/Sidebar.scss:111
  • `.excalidraw .focus-visible-none:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/ColorPicker/ColorPicker.scss:12
  • `.excalidraw .color-picker__button:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/ColorPicker/ColorPicker.scss:121
  • `.excalidraw .color-picker__button--no-focus-visible:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/ColorPicker/ColorPicker.scss:157
  • `.excalidraw .color-picker-content` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/ColorPicker/ColorPicker.scss:261
  • `.excalidraw .color-picker-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/excalidraw/components/ColorPicker/ColorPicker.scss:383
  • `.excalidraw .ExcButton .ExcButton__statusIcon` moves (`animation: successStatusAnimation 0.5s cubic-bezier(0.3, 1, 0.6, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/excalidraw/components/FilledButton.scss:50
  • `.excalidraw .layer-ui__wrapper.animate` moves (`transition: width 0.1s ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/excalidraw/components/LayerUI.scss:5
  • `.excalidraw .library-unit__adder` moves (`animation: library-unit__adder-animation 1s ease-in infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/excalidraw/components/LibraryUnit.scss:169
  • `.excalidraw .Modal__content` moves (`animation: Modal__content_fade-in 0.025s ease-out 0s forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/excalidraw/components/Modal.scss:64
  • `.excalidraw .PasteChartDialog .PasteChartDialog__reshuffleBtn` moves (`transition: transform 120ms ease, background-color 120ms ease, color 120ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/excalidraw/components/PasteChartDialog.scss:26
  • `.excalidraw .Spinner svg` moves (`animation: rotate $duration linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/excalidraw/components/Spinner.scss:17
  • `.excalidraw .UserList__collaborator-status-icon-speaking-indicator div:nth-of-type(1)` moves (`animation: speaking-indicator-anim 1s -0.45s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/excalidraw/components/UserList.scss:172
  • `.excalidraw .UserList__collaborator-status-icon-speaking-indicator div:nth-of-type(2)` moves (`animation: speaking-indicator-anim 1s -0.9s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/excalidraw/components/UserList.scss:176
  • `.excalidraw .UserList__collaborator-status-icon-speaking-indicator div:nth-of-type(3)` moves (`animation: speaking-indicator-anim 1s -0.15s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/excalidraw/components/UserList.scss:180
  • `.excalidraw .top-picks-dnd.is-dnd-active .top-picks-dnd__pick` moves (`transition: transform 0.14s ease, opacity 0.14s ease, box-shadow 0.14s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/excalidraw/components/TopPicksDnD/TopPicksDnD.scss:21
  • `.excalidraw .top-picks-dnd__pick.is-dnd-duplicate` moves (`animation: excalidraw-top-picks-dnd-duplicate 0.45s ease-in-out infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/excalidraw/components/TopPicksDnD/TopPicksDnD.scss:67
  • `.excalidraw-top-picks-dnd-ghost__content` moves (`transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/excalidraw/components/TopPicksDnD/TopPicksDnD.scss:156
  • `.excalidraw-top-picks-dnd-ghost--dropping` moves (`transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1), width 0.18s ease, height 0.18s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/excalidraw/components/TopPicksDnD/TopPicksDnD.scss:177
  • `.excalidraw-top-picks-dnd-ghost` moves (`transition: width 0.15s ease, height 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/excalidraw/components/TopPicksDnD/TopPicksDnD.scss:147
  • `.excalidraw .chat-message__typing-indicator span` moves (`animation: typing 1.4s infinite ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — packages/excalidraw/components/TTDDialog/Chat/Chat.scss:318
  • `.excalidraw .collab-errors-button-shake` moves (`animation: strong-shake 0.15s 6`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — excalidraw-app/collab/CollabError.scss:15

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

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

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

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

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

What to do

  • Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition9.6 / 10Exemplary✓ Tool-verified

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

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

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

What to do

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

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

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

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

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

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

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

IC1 · Incompleteness & stubs7.2 / 10Strong✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • The guard above `return false;` also returns `false`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — packages/common/src/editorInterface.ts:139
  • `nextAnimationFrame` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/common/src/utils.ts:164
  • Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. (×2) — packages/element/src/binding.ts:453, packages/element/src/binding.ts:593
  • `onClick` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/excalidraw/actions/actionNavigate.tsx:109
  • `onClose` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. (×3) — packages/excalidraw/components/Actions.tsx:281, packages/excalidraw/components/Actions.tsx:393, packages/excalidraw/components/Actions.tsx:551
  • The `if` and its `else` contain the same statements, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body. — packages/excalidraw/components/ColorPicker/ColorPicker.tsx:472
  • `clear` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/excalidraw/workers.ts:98
  • A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×27) — packages/element/tests/binding.test.tsx:584, packages/element/tests/frame.test.tsx:489, packages/element/tests/frame.test.tsx:533, …
  • A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead. (×3) — packages/excalidraw/polyfill.ts:4, REDACTED:1, REDACTED:2

What to do

  • Clear the softer debt: re-enable or delete skipped tests, decide whether each empty function is a deliberate no-op (and say so in a comment), and replace blanket `eslint-disable` / `@ts-nocheck` with targeted, justified suppressions.
M1 · Documentation (README)6.6 / 10Strong✓ Tool-verified

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

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

  • 296 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 3 of 11 project(s) that lack one — worth up to 0.5 pts.
  • Review the README against recent changes; refresh the parts that drifted.
M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
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 accuracy7.3 / 10Strong◐ 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.

  • dev-docs/README.md documents the environment variable `USE_SSH`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/README.md:32
  • packages/excalidraw/README.md names the package `@excalidraw/excalidraw@next`, but no REDACTED of the workspace declares or depends on it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — packages/excalidraw/README.md:15
  • dev-docs/docs/introduction/get-started.mdx links to `/docs/`, but `docs` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/introduction/get-started.mdx:14
  • dev-docs/docs/introduction/get-started.mdx links to `/docs/@excalidraw/excalidraw/installation`, but `docs/@excalidraw/excalidraw/installation` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/introduction/get-started.mdx:15
  • dev-docs/docs/introduction/get-started.mdx links to `/docs/@excalidraw/mermaid-to-excalidraw/installation`, but `docs/@excalidraw/mermaid-to-excalidraw/installation` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/introduction/get-started.mdx:17
  • packages/excalidraw/locales/README.md links to `./../../REDACTED`, but `packages/REDACTED` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — packages/excalidraw/locales/README.md:10
  • dev-docs/docs/@excalidraw/excalidraw/development.mdx names the package `@excalidraw/*`, but no REDACTED of the workspace declares or depends on it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/development.mdx:39
  • dev-docs/docs/@excalidraw/excalidraw/installation.mdx names the package `@excalidraw/excalidraw@next`, but no REDACTED of the workspace declares or depends on it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/installation.mdx:15
  • dev-docs/docs/@excalidraw/mermaid-to-excalidraw/api.mdx links to `/docs/@excalidraw/excalidraw/installation`, but `docs/@excalidraw/excalidraw/installation` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/mermaid-to-excalidraw/api.mdx:5
  • dev-docs/docs/@excalidraw/excalidraw/api/api-intro.mdx links to `/docs/@excalidraw/excalidraw/api/props`, but `docs/@excalidraw/excalidraw/api/props` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/api-intro.mdx:9
  • dev-docs/docs/@excalidraw/excalidraw/api/api-intro.mdx links to `/docs/@excalidraw/excalidraw/api/children-components`, but `docs/@excalidraw/excalidraw/api/children-components` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/api-intro.mdx:10
  • dev-docs/docs/@excalidraw/excalidraw/api/api-intro.mdx links to `/docs/@excalidraw/excalidraw/api/utils`, but `docs/@excalidraw/excalidraw/api/utils` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/api-intro.mdx:11
  • dev-docs/docs/@excalidraw/excalidraw/api/excalidraw-element-skeleton.mdx links to `/docs/@excalidraw/excalidraw/api/excalidraw-element-skeleton#converttoexcalidrawelements`, but `docs/@excalidraw/excalidraw/api/excalidraw-element-skeleton` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/excalidraw-element-skeleton.mdx:7
  • dev-docs/docs/@excalidraw/mermaid-to-excalidraw/codebase/codebase.mdx links to `/docs/@excalidraw/mermaid-to-excalidraw/codebase/parser`, but `docs/@excalidraw/mermaid-to-excalidraw/codebase/parser` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/mermaid-to-excalidraw/codebase/codebase.mdx:5
  • dev-docs/docs/@excalidraw/mermaid-to-excalidraw/codebase/codebase.mdx links to `/docs/@excalidraw/mermaid-to-excalidraw/codebase/new-diagram-type`, but `docs/@excalidraw/mermaid-to-excalidraw/codebase/new-diagram-type` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/mermaid-to-excalidraw/codebase/codebase.mdx:7
  • dev-docs/docs/@excalidraw/mermaid-to-excalidraw/codebase/new-diagram-type.mdx documents the environment variable `SUPPORTED_DIAGRAM_TYPES`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/mermaid-to-excalidraw/codebase/new-diagram-type.mdx:17
  • dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx links to `/docs/@excalidraw/excalidraw/api/children-components/main-menu`, but `docs/@excalidraw/excalidraw/api/children-components/main-menu` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx:18
  • dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx links to `/docs/@excalidraw/excalidraw/api/children-components/welcome-screen`, but `docs/@excalidraw/excalidraw/api/children-components/welcome-screen` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx:19
  • dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx links to `/docs/@excalidraw/excalidraw/api/children-components/sidebar`, but `docs/@excalidraw/excalidraw/api/children-components/sidebar` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx:20
  • dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx links to `/docs/@excalidraw/excalidraw/api/children-components/footer`, but `docs/@excalidraw/excalidraw/api/children-components/footer` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx:21
  • dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx links to `/docs/@excalidraw/excalidraw/api/children-components/live-collaboration-trigger`, but `docs/@excalidraw/excalidraw/api/children-components/live-collaboration-trigger` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx:22
  • dev-docs/docs/@excalidraw/excalidraw/api/children-components/live-collaboration-trigger.mdx links to `/docs/@excalidraw/excalidraw/api/props#rendertoprightui`, but `docs/@excalidraw/excalidraw/api/props` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/children-components/live-collaboration-trigger.mdx:3
  • dev-docs/docs/@excalidraw/excalidraw/api/children-components/sidebar.mdx links to `/docs/@excalidraw/excalidraw/api/props/excalidraw-api#toggleSidebar`, but `docs/@excalidraw/excalidraw/api/props/excalidraw-api` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/children-components/sidebar.mdx:83
  • dev-docs/docs/@excalidraw/excalidraw/api/children-components/welcome-screen.mdx links to `/docs/@excalidraw/excalidraw/api/children-components/live-collaboration-trigger`, but `docs/@excalidraw/excalidraw/api/children-components/live-collaboration-trigger` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/children-components/welcome-screen.mdx:84
  • dev-docs/docs/@excalidraw/excalidraw/api/props/excalidraw-api.mdx links to `/docs/@excalidraw/excalidraw/api/children-components/sidebar`, but `docs/@excalidraw/excalidraw/api/children-components/sidebar` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/props/excalidraw-api.mdx:393
  • dev-docs/docs/@excalidraw/excalidraw/api/props/excalidraw-api.mdx links to `/docs/@excalidraw/excalidraw/api/props#onchange`, but `docs/@excalidraw/excalidraw/api/props` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/props/excalidraw-api.mdx:415
  • dev-docs/docs/@excalidraw/excalidraw/api/props/props.mdx links to `/docs/@excalidraw/excalidraw/api/props/initialdata`, but `docs/@excalidraw/excalidraw/api/props/initialdata` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/props/props.mdx:7
  • dev-docs/docs/@excalidraw/excalidraw/api/props/props.mdx links to `/docs/@excalidraw/excalidraw/api/props/excalidraw-api`, but `docs/@excalidraw/excalidraw/api/props/excalidraw-api` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/props/props.mdx:8
  • dev-docs/docs/@excalidraw/excalidraw/api/props/props.mdx links to `/docs/@excalidraw/excalidraw/api/props/render-props#rendertoprightui`, but `docs/@excalidraw/excalidraw/api/props/render-props` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/props/props.mdx:19
  • dev-docs/docs/@excalidraw/excalidraw/api/props/props.mdx links to `/docs/@excalidraw/excalidraw/api/props/ui-options`, but `docs/@excalidraw/excalidraw/api/props/ui-options` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/props/props.mdx:27
  • dev-docs/docs/@excalidraw/excalidraw/api/props/props.mdx links to `/docs/@excalidraw/excalidraw/api/utils#theme`, but `docs/@excalidraw/excalidraw/api/utils` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/props/props.mdx:225
  • dev-docs/docs/@excalidraw/excalidraw/api/props/ui-options.mdx links to `/docs/@excalidraw/excalidraw/api/props#theme`, but `docs/@excalidraw/excalidraw/api/props` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/props/ui-options.mdx:25
  • dev-docs/docs/@excalidraw/excalidraw/api/props/ui-options.mdx documents the environment variable `MQ_RIGHT_SIDEBAR_MAX_WIDTH_PORTRAIT`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/props/ui-options.mdx:58
  • dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md links to `/docs/@excalidraw/excalidraw/API/utils/export`, but `docs/@excalidraw/excalidraw/API/utils/export` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md:7
  • dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md links to `/docs/@excalidraw/excalidraw/API/utils/restore`, but `docs/@excalidraw/excalidraw/API/utils/restore` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md:7
  • dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md links to `/docs/@excalidraw/excalidraw/api/props/#langcode`, but `docs/@excalidraw/excalidraw/api/props` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/excalidraw/api/utils/utils-intro.md:374
  • dev-docs/docs/@excalidraw/mermaid-to-excalidraw/codebase/parser/parser.mdx links to `/docs/@excalidraw/mermaid-to-excalidraw/codebase/parser#rendering-mermaid-to-svg`, but `docs/@excalidraw/mermaid-to-excalidraw/codebase/parser` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — dev-docs/docs/@excalidraw/mermaid-to-excalidraw/codebase/parser/parser.mdx:20

What to do

  • Reconcile the README with reality: dev-docs/README.md documents the environment variable `USE_SSH`, but no code, script or configuration file names it; packages/excalidraw/README.md names the package `@excalidraw/excalidraw@next`, but no REDACTED of the workspace declares or depends on it; dev-docs/docs/introduction/get-started.mdx links to `/docs/`, but `docs` does not exist; dev-docs/docs/introduction/get-started.mdx links to `/docs/@excalidraw/excalidraw/installation`, but `docs/@excalidraw/excalidraw/installation` does not exist; dev-docs/docs/introduction/get-started.mdx links to `/docs/@excalidraw/mermaid-to-excalidraw/installation`, but `docs/@excalidraw/mermaid-to-excalidraw/installation` does not exist.
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.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

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

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

P2 · Observability0.0 / 10Critical✓ Tool-verified

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

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

  • No logging call was found in the 510 JavaScript/TypeScript production file(s) this check read across 10 module(s). Each was searched for its ecosystem's logging libraries (JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.

What to do

  • Adopt pino (or winston) and log at meaningful points in the services you run.
  • Consider OpenTelemetry tracing/metrics (@opentelemetry/sdk-node) and a health-check endpoint (@godaddy/terminus or a /health route) for operability.
P3 · Security & performance tooling0.0 / 10Critical✓ 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.

  • No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 10892 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback8.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.

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

What to do

  • Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

R1 · Type Safety9.7 / 10Exemplary✓ Tool-verified

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

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

What to do

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

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

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

  • 13 duplicated blocks under packages/ have copies in at least two of the sibling directories common, element, excalidraw, math, utils — 7 of them are reported below, and 6 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 13 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 13 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 13 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/math/src/ellipse.ts:109
  • 8 duplicated blocks under packages/excalidraw/components/ have copies in at least two of the sibling directories ColorPicker, FontPicker, Sidebar, TTDDialog, dropdownMenu, main-menu (+1 more sibling(s) not listed) — 3 of them are reported below, and 5 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 8 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/excalidraw/components/main-menu/DefaultItems.tsx:197
  • 6 of the duplicated blocks reported below have copies in at least two of the sibling directories excalidraw-app, packages under the repository root. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — excalidraw-app/share/ShareDialog.tsx:77
  • packages/excalidraw/components/Stats/Dimension.tsx:196 · packages/excalidraw/components/Stats/MultiDimension.tsx:288 — the two spans are one implementation copied and then locally edited — 433 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/excalidraw/components/Stats/Dimension.tsx:196
  • packages/excalidraw/components/MobileToolbar.tsx:299 · packages/excalidraw/components/Toolbar.tsx:136 — the two spans are one implementation copied and then locally edited — 492 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/excalidraw/components/MobileToolbar.tsx:299
  • packages/excalidraw/charts/charts.bar.ts:22 · packages/excalidraw/charts/charts.line.ts:26 — the two spans are one implementation copied and then locally edited — 313 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/excalidraw/charts/charts.bar.ts:22
  • packages/element/src/transform.ts:327 · packages/element/src/transform.ts:406 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/element/src/transform.ts:327
  • packages/element/src/transform.ts:105 · packages/element/src/transform.ts:146 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/element/src/transform.ts:105
  • packages/excalidraw/components/Stats/Angle.tsx:23 · packages/excalidraw/components/Stats/MultiAngle.tsx:23 — the two spans are one implementation copied and then locally edited — 226 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/excalidraw/components/Stats/Angle.tsx:23
  • packages/element/src/linearElementEditor.ts:2537 · packages/element/src/linearElementEditor.ts:2577 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/element/src/linearElementEditor.ts:2537
  • packages/element/src/utils.ts:335 · packages/element/src/utils.ts:467 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/element/src/utils.ts:335
  • packages/excalidraw/renderer/interactiveScene.ts:633 · packages/excalidraw/renderer/interactiveScene.ts:675 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/excalidraw/renderer/interactiveScene.ts:633
  • packages/excalidraw/renderer/interactiveScene.ts:354 · packages/excalidraw/renderer/interactiveScene.ts:395 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/excalidraw/renderer/interactiveScene.ts:354
  • packages/excalidraw/snapping.ts:357 · packages/excalidraw/snapping.ts:401 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/excalidraw/snapping.ts:357
  • packages/excalidraw/actions/actionAlign.tsx:79 · packages/excalidraw/actions/actionAlign.tsx:113 · packages/excalidraw/actions/actionAlign.tsx:147 · packages/excalidraw/actions/actionAlign.tsx:181 — all 4 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/excalidraw/actions/actionAlign.tsx:79
  • excalidraw-app/share/ShareDialog.tsx:77 · packages/excalidraw/components/ShareableLinkDialog.tsx:35 — the two spans are one implementation copied and then locally edited — 141 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — excalidraw-app/share/ShareDialog.tsx:77
  • packages/element/src/binding.ts:671 · packages/element/src/binding.ts:978 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/element/src/binding.ts:671
  • packages/excalidraw/actions/actionHistory.tsx:75 · packages/excalidraw/actions/actionHistory.tsx:114 — the two spans are one implementation copied and then locally edited — 174 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/excalidraw/actions/actionHistory.tsx:75
  • packages/excalidraw/actions/actionProperties.tsx:1562 · packages/excalidraw/actions/actionProperties.tsx:1664 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/excalidraw/actions/actionProperties.tsx:1562
  • packages/element/src/collision.ts:701 · packages/element/src/collision.ts:753 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/element/src/collision.ts:701
  • packages/element/src/elbowArrow.ts:762 · packages/element/src/elbowArrow.ts:834 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/element/src/elbowArrow.ts:762
  • packages/element/src/linearElementEditor.ts:337 · packages/element/src/linearElementEditor.ts:542 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/element/src/linearElementEditor.ts:337
  • packages/excalidraw/components/Actions.tsx:245 · packages/excalidraw/components/Actions.tsx:330 · packages/excalidraw/components/Actions.tsx:512 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/excalidraw/components/Actions.tsx:245
  • packages/element/src/bounds.ts:176 · packages/element/src/bounds.ts:210 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/element/src/bounds.ts:176
  • excalidraw-app/components/DebugCanvas.tsx:473 · excalidraw-app/components/DebugCanvas.tsx:503 — 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. — excalidraw-app/components/DebugCanvas.tsx:473
  • REDACTED:1221 · REDACTED:1343 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:1221
  • REDACTED:4074 · REDACTED:4179 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:4074
  • REDACTED:838 · REDACTED:962 — the two spans are one implementation copied and then locally edited — 80 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:838
  • packages/excalidraw/snapping.ts:1031 · packages/excalidraw/snapping.ts:1057 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/excalidraw/snapping.ts:1031
  • packages/element/src/arrows/focus.ts:359 · packages/element/src/arrows/focus.ts:395 · packages/element/src/arrows/focus.ts:516 · packages/element/src/arrows/focus.ts:545 — 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. — packages/element/src/arrows/focus.ts:359
  • packages/element/src/convertToShape.ts:620 · packages/element/src/convertToShape.ts:658 · packages/element/src/convertToShape.ts:698 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/element/src/convertToShape.ts:620
  • packages/excalidraw/components/Actions.tsx:597 · packages/excalidraw/components/Actions.tsx:715 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/excalidraw/components/Actions.tsx:597
  • packages/excalidraw/components/icons.tsx:991 · packages/excalidraw/components/icons.tsx:1023 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — packages/excalidraw/components/icons.tsx:991
  • packages/excalidraw/actions/actionCanvas.tsx:155 · packages/excalidraw/actions/actionCanvas.tsx:209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/excalidraw/actions/actionCanvas.tsx:155
  • packages/excalidraw/actions/actionZindex.tsx:86 · packages/excalidraw/actions/actionZindex.tsx:123 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/excalidraw/actions/actionZindex.tsx:86
  • packages/element/src/binding.ts:1041 · packages/element/src/binding.ts:1067 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/element/src/binding.ts:1041
  • packages/excalidraw/actions/actionExport.tsx:303 · packages/excalidraw/actions/actionExport.tsx:355 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/excalidraw/actions/actionExport.tsx:303
  • packages/excalidraw/components/IconPicker.tsx:125 · packages/excalidraw/components/IconPicker.tsx:150 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/excalidraw/components/IconPicker.tsx:125
  • packages/excalidraw/components/Stats/FontSize.tsx:59 · packages/excalidraw/components/Stats/MultiFontSize.tsx:108 — the two spans are one implementation copied and then locally edited — 91 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/excalidraw/components/Stats/FontSize.tsx:59
  • packages/math/src/ellipse.ts:109 · packages/utils/src/shape.ts:422 — the two spans are one implementation copied and then locally edited — 236 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/math/src/ellipse.ts:109

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R11 · Import Boundaries4.5 / 10Weak✓ Tool-verified

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • packages/common/global.d.ts:2 imports @excalidraw/excalidraw/global, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/common/global.d.ts:2
  • packages/common/global.d.ts:3 imports @excalidraw/excalidraw/css, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/common/global.d.ts:3
  • packages/common/src/colors.ts:3 imports @excalidraw/math, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/common/src/colors.ts:3
  • packages/common/src/colors.ts:4 imports @excalidraw/math, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/common/src/colors.ts:4
  • packages/common/src/points.ts:1 imports @excalidraw/math, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/common/src/points.ts:1
  • packages/common/src/utils.ts:1 imports @excalidraw/math, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/common/src/utils.ts:1
  • packages/element/global.d.ts:2 imports @excalidraw/excalidraw/global, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/element/global.d.ts:2
  • packages/element/global.d.ts:3 imports @excalidraw/excalidraw/css, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/element/global.d.ts:3
  • packages/element/src/Scene.ts:43 reaches into another package with a relative path (../../excalidraw/types) — import the package by name instead. — packages/element/src/Scene.ts:43
  • packages/element/src/bounds.ts:16 imports @excalidraw/utils/shape, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/element/src/bounds.ts:16
  • packages/element/src/linearElementEditor.ts:21 imports @excalidraw/utils/shape, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/element/src/linearElementEditor.ts:21
  • packages/element/src/shape.ts:3 imports @excalidraw/laser-pointer, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/element/src/shape.ts:3
  • packages/element/src/shape.ts:5 imports @excalidraw/utils/shape, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/element/src/shape.ts:5
  • packages/excalidraw/actions/actionLinearEditor.tsx:23 reaches into another package with a relative path (../../element/src/mutateElement) — import the package by name instead. — packages/excalidraw/actions/actionLinearEditor.tsx:23
  • packages/excalidraw/components/Stats/MultiDimension.tsx:26 imports @excalidraw/utils, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/excalidraw/components/Stats/MultiDimension.tsx:26
  • packages/excalidraw/components/TTDDialog/common.ts:5 imports @excalidraw/utils, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/excalidraw/components/TTDDialog/common.ts:5
  • packages/math/global.d.ts:2 imports @excalidraw/excalidraw/global, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/math/global.d.ts:2
  • packages/math/global.d.ts:3 imports @excalidraw/excalidraw/css, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/math/global.d.ts:3
  • packages/utils/global.d.ts:2 imports @excalidraw/excalidraw/global, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/utils/global.d.ts:2
  • packages/utils/global.d.ts:3 imports @excalidraw/excalidraw/css, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/utils/global.d.ts:3
  • packages/utils/src/index.ts:2 imports @excalidraw/excalidraw/scene/export, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/utils/src/index.ts:2
  • packages/utils/src/index.ts:14 imports @excalidraw/element, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/utils/src/index.ts:14
  • packages/utils/src/index.ts:15 imports @excalidraw/element, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/utils/src/index.ts:15
  • packages/utils/src/shape.ts:16 imports @excalidraw/common, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/utils/src/shape.ts:16
  • packages/utils/src/shape.ts:17 imports @excalidraw/math, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/utils/src/shape.ts:17
  • packages/utils/src/shape.ts:37 imports @excalidraw/element, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies. — packages/utils/src/shape.ts:37
  • scripts/buildPackage.js:8 reaches into another package with a relative path (../packages/excalidraw/env.cjs) — import the package by name instead. — scripts/buildPackage.js:8
  • setupTests.ts:9 reaches into another package with a relative path (./packages/excalidraw/polyfill) — import the package by name instead. — setupTests.ts:9
  • setupTests.ts:10 reaches into another package with a relative path (./packages/excalidraw/tests/helpers/mocks) — import the package by name instead. — setupTests.ts:10
  • setupTests.ts:11 reaches into another package with a relative path (./packages/excalidraw/tests/helpers/colorize) — import the package by name instead. — setupTests.ts:11
  • setupTests.ts:12 reaches into another package with a relative path (./packages/excalidraw/tests/helpers/polyfills) — import the package by name instead. — setupTests.ts:12
  • setupTests.ts:106 reaches into another package with a relative path (./packages/excalidraw/fonts/ExcalidrawFontFace) — import the package by name instead. — setupTests.ts:106

What to do

  • Fix the listed violations: declare the workspace packages these files import in the importing package's own REDACTED dependencies (24 rows) — those imports are already bare package specifiers, so the import statements do not change, only the manifest; import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (8 rows).
R2 · Cyclomatic Complexity7.0 / 10Strong✓ Tool-verified

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

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

  • (anonymous) has cyclomatic complexity 130 and cognitive complexity 167; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:9451
  • renderElementToSvg has cyclomatic complexity 85 and cognitive complexity 134; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:97
  • (anonymous) has cyclomatic complexity 73 and cognitive complexity 176; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/element/src/bucketFill.ts:720
  • convertToExcalidrawElements has cyclomatic complexity 73 and cognitive complexity 110; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/element/src/transform.ts:579
  • configExportDimension has cyclomatic complexity 72 and cognitive complexity 88; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:549
  • (anonymous) has cyclomatic complexity 69 and cognitive complexity 114; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/excalidraw/renderer/interactiveScene.ts:1630
  • perform has cyclomatic complexity 69 and cognitive complexity 95; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/excalidraw/actions/actionFinalize.tsx:57
  • resizeMultipleElements has cyclomatic complexity 68 and cognitive complexity 152; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/element/src/resizeElements.ts:1234
  • (anonymous) has cyclomatic complexity 68 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/element/src/linearElementEditor.ts:2394
  • (anonymous) has cyclomatic complexity 66 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/element/src/binding.ts:670
  • (anonymous) has cyclomatic complexity 65 and cognitive complexity 85; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/excalidraw/components/HintViewer.tsx:49
  • (anonymous) has cyclomatic complexity 63 and cognitive complexity 100; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:8993
  • startTextEditing has cyclomatic complexity 62 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/excalidraw/components/App.text.ts:615
  • (anonymous) has cyclomatic complexity 54 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/excalidraw/tests/helpers/api.ts:256
  • (anonymous) has cyclomatic complexity 52 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/element/src/elbowArrow.ts:1675
  • (anonymous) has cyclomatic complexity 51 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/excalidraw/data/restore.ts:547
  • (anonymous) has cyclomatic complexity 50 and cognitive complexity 120; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/excalidraw/components/App.selectionTool.ts:107
  • estimateSegmentCount has cyclomatic complexity 49 and cognitive complexity 80; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/element/src/elbowArrow.ts:1924
  • (anonymous) has cyclomatic complexity 48 and cognitive complexity 85; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/element/src/elbowArrow.ts:716
  • (anonymous) has cyclomatic complexity 47 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/element/src/elbowArrow.ts:472

What to do

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

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

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

  • REDACTED has 10477 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 4038 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • packages/element/src/binding.ts has 2956 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/element/src/binding.ts:1
  • packages/element/src/linearElementEditor.ts has 2584 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/element/src/linearElementEditor.ts:1
  • packages/excalidraw/components/icons.tsx has 2368 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/components/icons.tsx:1
  • packages/excalidraw/actions/actionProperties.tsx has 2167 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/actions/actionProperties.tsx:1
  • packages/element/src/elbowArrow.ts has 2117 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/element/src/elbowArrow.ts:1
  • packages/excalidraw/renderer/interactiveScene.ts has 1951 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/renderer/interactiveScene.ts:1
  • packages/element/src/delta.ts has 1922 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/element/src/delta.ts:1
  • packages/element/src/bucketFill.ts has 1815 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/element/src/bucketFill.ts:1
  • packages/excalidraw/types.ts has 1580 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/types.ts:1
  • packages/element/src/resizeElements.ts has 1477 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/element/src/resizeElements.ts:1
  • packages/excalidraw/components/App.selectionTool.ts has 1414 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/components/App.selectionTool.ts:1
  • packages/element/src/bounds.ts has 1409 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/element/src/bounds.ts:1
  • packages/excalidraw/fonts/Xiaolai/index.ts has 1319 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/fonts/Xiaolai/index.ts:1
  • packages/excalidraw/data/restore.ts has 1304 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/data/restore.ts:1
  • packages/element/src/renderElement.ts has 1285 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/element/src/renderElement.ts:1
  • REDACTED has 1247 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 1238 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • packages/excalidraw/snapping.ts has 1230 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/snapping.ts:1
  • packages/element/src/shape.ts has 1219 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/element/src/shape.ts:1
  • packages/excalidraw/wysiwyg/textWysiwyg.tsx has 1205 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/wysiwyg/textWysiwyg.tsx:1
  • packages/common/src/utils.ts has 1123 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/common/src/utils.ts:1
  • excalidraw-app/collab/Collab.tsx has 964 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — excalidraw-app/collab/Collab.tsx:1
  • packages/excalidraw/components/CommandPalette/CommandPalette.tsx has 957 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/components/CommandPalette/CommandPalette.tsx:1
  • packages/element/src/stickyNote.ts has 921 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/element/src/stickyNote.ts:1
  • packages/element/src/frame.ts has 897 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/element/src/frame.ts:1
  • packages/element/src/store.ts has 888 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/element/src/store.ts:1
  • packages/excalidraw/data/library.ts has 874 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/data/library.ts:1
  • packages/excalidraw/charts/charts.helpers.ts has 871 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/charts/charts.helpers.ts:1
  • packages/excalidraw/components/Actions.tsx has 869 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/components/Actions.tsx:1
  • REDACTED has 857 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • packages/excalidraw/components/App.viewport.ts has 847 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/components/App.viewport.ts:1
  • packages/element/src/transform.ts has 842 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/element/src/transform.ts:1
  • packages/excalidraw/components/ConvertElementTypePopup.tsx has 842 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/components/ConvertElementTypePopup.tsx:1
  • packages/excalidraw/components/App.text.ts has 838 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/components/App.text.ts:1
  • packages/element/src/collision.ts has 830 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/element/src/collision.ts:1
  • packages/element/src/utils.ts has 809 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/element/src/utils.ts:1
  • packages/excalidraw/components/SearchMenu.tsx has 766 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/excalidraw/components/SearchMenu.tsx:1
  • packages/element/src/convertToShape.ts has 739 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/element/src/convertToShape.ts:1

What to do

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

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

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

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×26) — dev-docs/src/initialData.js:1, packages/element/src/visualdebug.ts:1, REDACTED:1, …

What to do

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

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

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

R7 · Dead Code7.7 / 10Strong✓ Tool-verified

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

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

  • Unreachable from the 149 application, 22 tooling and 162 test entry point(s) detected in this repo. Gate removals on `yarn run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (149 application, 22 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×8) — dev-docs/src/initialData.js, packages/excalidraw/data/ai/types.ts, dev-docs/src/components/Homepage/index.tsx, …
  • Nothing imports this binding — it is safe to review for removal. (×17) — excalidraw-app/data/index.ts:74, excalidraw-app/data/index.ts:123, packages/excalidraw/actions/actionCanvas.tsx:311, …
  • Nothing ultimately consumes this binding: its only referrer is the re-export in packages/excalidraw/actions/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/excalidraw/actions/index.ts in the same commit, or the barrel will import a name that no longer exists. (×13) — packages/excalidraw/actions/actionCanvas.tsx:47, packages/excalidraw/actions/actionDeselect.ts:65, packages/excalidraw/actions/actionNavigate.tsx:21, …
  • No runtime consumer imports this binding — the only demand on it comes from a type-position import of its module, which asks for the module's type surface rather than for this name. If the value is genuinely unneeded, remove it; if a consumer needs only its TYPE, export that type (e.g. `export type X = typeof x`) and drop the value. A value export — a const, a function, a class — cannot itself be rewritten as `export type`. — packages/excalidraw/components/TTDDialog/types.ts:91

What to do

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

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

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

  • Imported but not declared in any reachable REDACTED — installs work only by hoisting accident. (×23) — setupTests.ts:5, setupTests.ts:6, scripts/buildBase.js:3, …
  • Imported only as a TYPE and declared in no reachable REDACTED. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning REDACTED. (×2) — dev-docs/sidebars.js:14, dev-docs/docusaurus.config.js:9
  • Declared in the root REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2)

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports0.0 / 10Critical✓ 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.

  • excalidraw-app/data/firebase.ts → excalidraw-app/data/index.ts → excalidraw-app/data/firebase.ts — excalidraw-app/data/firebase.ts:26
  • packages/common/src/appEventBus.ts → packages/common/src/utils.ts → REDACTED → packages/common/src/colors.ts → packages/math/src/index.ts → packages/math/src/range.ts → packages/common/src/index.ts → packages/common/src/appEventBus.ts (one verified cycle inside a mutually-dependent group of 12 files) — packages/common/src/appEventBus.ts:4
  • packages/element/src/Scene.ts → packages/element/src/index.ts → packages/element/src/Scene.ts (one verified cycle inside a mutually-dependent group of 45 files) — packages/element/src/Scene.ts:11
  • REDACTED → packages/excalidraw/actions/actionClipboard.tsx → packages/excalidraw/actions/actionDeleteSelected.tsx → REDACTED (one verified cycle inside a mutually-dependent group of 106 files) — REDACTED:282
  • packages/excalidraw/data/blob.ts → packages/excalidraw/data/encode.ts → packages/excalidraw/data/encryption.ts → packages/excalidraw/data/blob.ts (one verified cycle inside a mutually-dependent group of 8 files) — packages/excalidraw/data/blob.ts:21
  • packages/excalidraw/fonts/Cascadia/index.ts → packages/excalidraw/fonts/Fonts.ts → packages/excalidraw/fonts/Cascadia/index.ts (one verified cycle inside a mutually-dependent group of 11 files) — packages/excalidraw/fonts/Cascadia/index.ts:1
  • packages/excalidraw/scene/index.ts → packages/excalidraw/viewport.ts → packages/excalidraw/scene/index.ts — packages/excalidraw/scene/index.ts:7

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture6.5 / 10Adequate✓ Tool-verified

Other · Security — Read from this repository's JavaScript/TypeScript source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. This repository commits the configuration that serves its own HTTP surface, so that configuration was read in full for the security response headers it sets. The server controls — HTTPS enforcement, HSTS, cookie flags, input validation — are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. — packages/excalidraw/data/blob.ts:265

What to do

  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key.
X1 · Async correctness6.9 / 10Strong✓ Tool-verified

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

  • The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it. (×9) — packages/excalidraw/actions/actionExport.tsx:198, REDACTED:10456, packages/excalidraw/data/library.ts:269, …

What to do

  • `async` Promise executor
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation4.9 / 10Adequate✓ Tool-verified

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 1/7 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `initializeScene` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:217
  • `importFromBackend` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — excalidraw-app/data/index.ts:202
  • `exportToBackend` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — excalidraw-app/data/index.ts:248
  • `loadFilesFromFirebase` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — excalidraw-app/data/firebase.ts:277
  • `importLibraryFromURL` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/excalidraw/data/library.ts:718
  • `ImageURLToFile` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/excalidraw/data/blob.ts:424

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped4.9 / 10Adequate✓ Tool-verified

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

  • `svgData` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — excalidraw-app/share/QRCode.tsx:53
  • `svg.outerHTML` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — packages/excalidraw/components/PublishLibrary.tsx:151, packages/excalidraw/hooks/useLibraryItemSvg.ts:74

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling6.3 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×13) — excalidraw-app/CustomStats.tsx:69, REDACTED:199, excalidraw-app/share/ShareDialog.tsx:100, …
  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — packages/excalidraw/components/TTDDialog/TTDDialog.tsx:72
  • `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — packages/excalidraw/components/TTDDialog/hooks/useTextGeneration.ts:100

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X5 · Nullable reference types8.7 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • 10/11 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
  • ~1.4 `!` null assertions per 1k TypeScript source lines — 207 assertion(s) across the 144790 source line(s) of the 497 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: REDACTED (23), packages/element/src/linearElementEditor.ts (14), packages/element/src/elbowArrow.ts (8). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

WCAG coverage — what static analysis assessed

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

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health54%Adequate — gated by D1, D2, R3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture53%Adequate — gated by R9Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity69%StrongSolid.
Readiness36%Weak — gated by R8, P2, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security58%Adequate — gated by D29, D30, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility42%Weak — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100%ExemplaryStrongest area.
Unscored — 3 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Not assessed: this repository stores data through 'firebase/app' (excalidraw-app/data/firebaseSDK.ts:7) but declares no persisted model this check reads (TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entities, Mongoose schemas, Sequelize or Drizzle tables, Knex migrations, Prisma models). Personal data may be written through raw SQL or a hosted backend, so whether its changes need an audit trail could not be established, and the trail's absence is not scored.
  • C4 Data Retention — Not assessed: this repository stores data through 'firebase/app' (excalidraw-app/data/firebaseSDK.ts:7) but declares no persisted model this check reads (TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entities, Mongoose schemas, Sequelize or Drizzle tables, Knex migrations, Prisma models). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
  • C5 Data-Subject Rights — Not assessed: this repository stores data through 'firebase/app' (excalidraw-app/data/firebaseSDK.ts:7) but declares no persisted model this check reads (TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entities, Mongoose schemas, Sequelize or Drizzle tables, Knex migrations, Prisma models). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 42 check(s) not relevant to this codebase

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

  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — Not applicable: TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — compose up failed (exit 17 — an image could not be built) — -slim@sha256:2c605dbeab79a6b2a63340474fe58119d0ef95bdc4b1f41df0aa689659b3d13b: failed to resolve source metadata for docker.io/library/nginx:stable-alpine-slim@sha256:2c605dbeab79a6b2a63340474fe58119d0ef95bdc4b1f41df0aa689659b3d13b: failed to do request: Head "https://registry-1.docker.io/v2/library/nginx/manifests/sha256:2c605dbeab79a6b2a63340474fe58119d0ef95bdc4b1f41df0aa689659b3d13b": Forbidden; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: this repository stores data through 'firebase/app' (excalidraw-app/data/firebaseSDK.ts:7) but declares no persisted model this check reads (TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entities, Mongoose schemas, Sequelize or Drizzle tables, Knex migrations, Prisma models). Personal data may be written through raw SQL or a hosted backend, so the absence of a personal-data field here is not evidence that none is stored, and encryption at rest is not scored over a subject that could not be established.
  • C2 Access Controls — Not assessed: this is a browser application whose data is served by a hosted backend ('firebase/app', excalidraw-app/data/firebaseSDK.ts:7). Its access control is that backend's configuration — Supabase row-level security, Firebase security rules, Appwrite permissions — and this repository carries none of it that this check reads (no Supabase migration, no server code). A client-side route guard hides a page; it authorizes nothing. Whether access is authorized by default could not be established, and its absence is not scored.
  • 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.
  • D19 Documentation Quality — LLM evaluation failed
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.js,.ts,.tsx), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 2 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D4 Code Duplication — This repository's production source (.ts, .tsx) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 538 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a REDACTED, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
  • R5 Dependency Freshness — uses a yarn lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X27 Collection changed while being enumerated — Not applicable: this check looks for a loop whose body adds to or removes from the very collection the loop is walking, invalidating the enumerator it holds, and in this repository's languages that cannot happen. JavaScript and TypeScript have no iterator that a change can invalidate: an `Array` is walked by index against its live length, and a `Map` or `Set` by the ECMAScript specification's live entry list, so a body that adds to, removes from or empties what it walks raises nothing — every loop form (`for…of`, `for…in`, `forEach`, `map`, `filter`, `reduce`, `entries()`) on every built-in collection (`Array`, `Map`, `Set`, plain objects, `URLSearchParams`, `Headers`, `FormData`) runs to completion. Such a loop can still skip an element or never end, which is a different defect and not the one this check asks about. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — 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 — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 152 finding(s)
D30 · Dependency Vulnerabilities · High CVE · ×67
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 42 more in this group — see findings.md.
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×9
  • Click handler on a non-interactive <div> packages/excalidraw/actions/actionNavigate.tsx:98 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> packages/excalidraw/components/Avatar.tsx:28 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> packages/excalidraw/components/ColorPicker/ColorInput.tsx:123 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
  • Click handler on a non-interactive <div> packages/excalidraw/components/CommandPalette/CommandPalette.tsx:1009 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> packages/excalidraw/components/LibraryMenuItems.tsx:341 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
  • Click handler on a non-interactive <div> packages/excalidraw/components/LibraryUnit.tsx:85 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> packages/excalidraw/components/Stats/Collapsible.tsx:26 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> packages/excalidraw/components/Stats/index.tsx:194 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> packages/excalidraw/components/UnlockPopup.tsx:61 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC2 · Forms & labels · <input> without a programmatic label · ×7
  • <input> without a programmatic label REDACTED:2212 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/excalidraw/components/ImageExportDialog.tsx:206 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/excalidraw/components/ProjectName.tsx:46 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/excalidraw/components/QuickSearch.tsx:19 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label packages/excalidraw/components/Stats/DragInput.tsx:367 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label packages/excalidraw/components/TextField.tsx:84 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label packages/excalidraw/components/hyperlink/Hyperlink.tsx:321 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
D30 · Dependency Vulnerabilities · Critical CVE · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×4
  • Import cycle (2 files) excalidraw-app/data/firebase.ts:26 — excalidraw-app/data/firebase.ts → excalidraw-app/data/index.ts → excalidraw-app/data/firebase.ts
  • Import cycle (2 files) packages/element/src/Scene.ts:11 — packages/element/src/Scene.ts → packages/element/src/index.ts → packages/element/src/Scene.ts (one verified cycle inside a mutually-dependent group of 45 files)
  • Import cycle (2 files) packages/excalidraw/fonts/Cascadia/index.ts:1 — packages/excalidraw/fonts/Cascadia/index.ts → packages/excalidraw/fonts/Fonts.ts → packages/excalidraw/fonts/Cascadia/index.ts (one verified cycle inside a mutually-dependent group of 11 files)
  • Import cycle (2 files) packages/excalidraw/scene/index.ts:7 — packages/excalidraw/scene/index.ts → packages/excalidraw/viewport.ts → packages/excalidraw/scene/index.ts
AC2 · Forms & labels · <textarea> without a programmatic label · ×3
  • <textarea> without a programmatic label excalidraw-app/components/TopErrorBoundary.tsx:133 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <textarea> without a programmatic label packages/excalidraw/components/TTDDialog/Chat/ChatInterface.tsx:154 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <textarea> without a programmatic label packages/excalidraw/components/TTDDialog/TTDDialogInput.tsx:117 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
D10 · Test Quality · No assertions (empty test) · ×3
  • No assertions (empty test): should be user-dockable when both `onDock` and `docked` supplied packages/excalidraw/components/Sidebar/Sidebar.test.tsx:278 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): shouldn't be user-dockable when only `onDock` supplied w/o `docked` packages/excalidraw/components/Sidebar/Sidebar.test.tsx:302 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): should unbind remotely deleted bindable elements from arrow when the arrow is added through the history packages/excalidraw/tests/history.test.tsx:5105 — Test method has an empty body — it asserts nothing and exercises no code.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×3
  • Orphaned knowledge packages/excalidraw/fonts/Xiaolai/index.ts:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge dev-docs/src/initialData.js:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge packages/element/src/store.ts:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
AC2 · Forms & labels · <label> that labels no control · ×2
  • <label> that labels no control excalidraw-app/components/TopErrorBoundary.tsx:132 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control packages/excalidraw/components/TTDDialog/TTDDialogPanel.tsx:102 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC2 · Forms & labels · <button> with no accessible text · ×2
  • <button> with no accessible text packages/excalidraw/components/ColorPicker/ShadeList.tsx:113 — 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 packages/excalidraw/components/TTDDialog/Chat/ChatInterface.tsx:175 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC4 · Keyboard semantics · Hover-only interaction on <div> · ×2
  • Hover-only interaction on <div> packages/excalidraw/components/LibraryUnit.tsx:53 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
  • Hover-only interaction on <div> packages/excalidraw/components/Toast.tsx:59 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
D31 · IaC & Container Security · High IaC · ×2
  • REDACTED
  • REDACTED
R8 · Dependency Hygiene · Unlisted import '@testing-library/react' · ×2
  • Unlisted import '@testing-library/react' setupTests.ts:6 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
  • Unlisted import '@testing-library/react' packages/element/tests/linearElementEditor.test.tsx:2 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'lodash.throttle' · ×2
  • Unlisted import 'lodash.throttle' excalidraw-app/collab/Collab.tsx:30 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
  • Unlisted import 'lodash.throttle' packages/element/src/Scene.ts:1 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'nanoid' · ×2
  • Unlisted import 'nanoid' excalidraw-app/components/ExportToExcalidrawPlus.tsx:2 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
  • Unlisted import 'nanoid' packages/common/src/random.ts:1 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'roughjs' · ×2
  • Unlisted import 'roughjs' packages/common/src/random.ts:2 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
  • Unlisted import 'roughjs' packages/element/src/bounds.ts:1 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R9 · Circular Imports · Import cycle (3 files) · ×2
  • Import cycle (3 files) REDACTED:282 — REDACTED → packages/excalidraw/actions/actionClipboard.tsx → packages/excalidraw/actions/actionDeleteSelected.tsx → REDACTED (one verified cycle inside a mutually-dependent group of 106 files)
  • Import cycle (3 files) packages/excalidraw/data/blob.ts:21 — packages/excalidraw/data/blob.ts → packages/excalidraw/data/encode.ts → packages/excalidraw/data/encryption.ts → packages/excalidraw/data/blob.ts (one verified cycle inside a mutually-dependent group of 8 files)
AC1 · Text alternatives · <img> without a text alternative · ×1
  • <img> without a text alternative REDACTED:10602 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
AC3 · Page structure · Viewport restricts zoom · ×1
  • Viewport restricts zoom excalidraw-app/index.html:6 — 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.
AC4 · Keyboard semantics · Double-click handler on a non-interactive <div> · ×1
  • Double-click handler on a non-interactive <div> REDACTED:2266 — This <div> binds pointerdown and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click.
AC4 · Keyboard semantics · Click handler on a non-interactive <canvas> · ×1
  • Click handler on a non-interactive <canvas> packages/excalidraw/components/canvases/InteractiveCanvas.tsx:211 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D28 · Secrets (history) · High secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Critical vulnerability · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import '@testing-library/jest-dom' · ×1
  • Unlisted import '@testing-library/jest-dom' setupTests.ts:5 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'esbuild' · ×1
  • Unlisted import 'esbuild' scripts/buildBase.js:3 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'esbuild-sass-plugin' · ×1
  • Unlisted import 'esbuild-sass-plugin' scripts/buildPackage.js:6 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'fake-indexeddb' · ×1
  • Unlisted import 'fake-indexeddb' setupTests.ts:47 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'fonteditor-core' · ×1
  • Unlisted import 'fonteditor-core' REDACTED:5 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'wawoff2' · ×1
  • Unlisted import 'wawoff2' REDACTED:6 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'which' · ×1
  • Unlisted import 'which' REDACTED:7 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@docusaurus/theme-common' · ×1
  • Unlisted import '@docusaurus/theme-common' dev-docs/src/theme/ReactLiveScope/index.js:4 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@site/src' · ×1
  • Unlisted import '@site/src' dev-docs/src/pages/index.tsx:3 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'clsx' · ×1
  • Unlisted import 'clsx' REDACTED:58 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@braintree/sanitize-url' · ×1
  • Unlisted import '@braintree/sanitize-url' packages/common/src/url.ts:1 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'es6-promise-pool' · ×1
  • Unlisted import 'es6-promise-pool' packages/common/src/promise-pool.ts:1 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'perfect-freehand' · ×1
  • Unlisted import 'perfect-freehand' packages/element/src/shape.ts:2 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'points-on-curve' · ×1
  • Unlisted import 'points-on-curve' packages/element/src/bounds.ts:17 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'react' · ×1
  • Unlisted import 'react' packages/element/tests/cropElement.test.tsx:1 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R9 · Circular Imports · Import cycle (7 files) · ×1
  • Import cycle (7 files) packages/common/src/appEventBus.ts:4 — packages/common/src/appEventBus.ts → packages/common/src/utils.ts → REDACTED → packages/common/src/colors.ts → packages/math/src/index.ts → packages/math/src/range.ts → packages/common/src/index.ts → packages/common/src/appEventBus.ts (one verified cycle inside a mutually-dependent group of 12 files)
Serious — 1491 finding(s)
D8 · Code Coverage · Low coverage · ×129
  • Low coverage: dev-docs/docusaurus.config.js dev-docs/docusaurus.config.js:1 — 0.0% line coverage (0/178).
  • Low coverage: dev-docs/sidebars.js dev-docs/sidebars.js:1 — 0.0% line coverage (0/133).
  • Low coverage: dev-docs/src/initialData.js dev-docs/src/initialData.js:1 — 0.0% line coverage (0/1230).
  • Low coverage: dev-docs/src/components/Highlight.js dev-docs/src/components/Highlight.js:1 — 0.0% line coverage (0/15).
  • Low coverage: dev-docs/src/components/Homepage/index.js dev-docs/src/components/Homepage/index.js:1 — 0.0% line coverage (0/63).
  • Low coverage: dev-docs/src/components/Homepage/index.tsx dev-docs/src/components/Homepage/index.tsx:1 — 0.0% line coverage (0/71).
  • Low coverage: dev-docs/src/pages/index.tsx dev-docs/src/pages/index.tsx:1 — 0.0% line coverage (0/36).
  • Low coverage: dev-docs/src/theme/MDXComponents.js dev-docs/src/theme/MDXComponents.js:1 — 0.0% line coverage (0/11).
  • Low coverage: dev-docs/src/theme/ReactLiveScope/index.js dev-docs/src/theme/ReactLiveScope/index.js:1 — 0.0% line coverage (0/39).
  • Low coverage: examples/with-nextjs/next.config.js examples/with-nextjs/next.config.js:1 — 0.0% line coverage (0/12).
  • Low coverage: examples/with-nextjs/src/excalidrawWrapper.tsx examples/with-nextjs/src/excalidrawWrapper.tsx:1 — 0.0% line coverage (0/23).
  • Low coverage: examples/with-nextjs/src/app/layout.tsx examples/with-nextjs/src/app/layout.tsx:1 — 0.0% line coverage (0/11).
  • Low coverage: examples/with-nextjs/src/app/page.tsx examples/with-nextjs/src/app/page.tsx:1 — 0.0% line coverage (0/27).
  • Low coverage: examples/with-nextjs/src/pages/excalidraw-in-pages.tsx examples/with-nextjs/src/pages/excalidraw-in-pages.tsx:1 — 0.0% line coverage (0/23).
  • Low coverage: examples/with-script-in-browser/index.tsx examples/with-script-in-browser/index.tsx:1 — 0.0% line coverage (0/29).
  • Low coverage: examples/with-script-in-browser/initialData.tsx examples/with-script-in-browser/initialData.tsx:1 — 0.0% line coverage (0/994).
  • Low coverage: examples/with-script-in-browser/utils.ts examples/with-script-in-browser/utils.ts:1 — 0.0% line coverage (0/109).
  • Low coverage: examples/with-script-in-browser/components/CustomFooter.tsx examples/with-script-in-browser/components/CustomFooter.tsx:1 — 0.0% line coverage (0/74).
  • Low coverage: examples/with-script-in-browser/components/ExampleApp.tsx examples/with-script-in-browser/components/ExampleApp.tsx:1 — 0.0% line coverage (0/1017).
  • Low coverage: examples/with-script-in-browser/components/MobileFooter.tsx examples/with-script-in-browser/components/MobileFooter.tsx:1 — 0.0% line coverage (0/30).
  • Low coverage: examples/with-script-in-browser/components/sidebar/ExampleSidebar.tsx examples/with-script-in-browser/components/sidebar/ExampleSidebar.tsx:1 — 0.0% line coverage (0/32).
  • Low coverage: excalidraw-app/CustomStats.tsx excalidraw-app/CustomStats.tsx:1 — 37.4% line coverage (34/91).
  • Low coverage: excalidraw-app/ExcalidrawPlusIframeExport.tsx excalidraw-app/ExcalidrawPlusIframeExport.tsx:1 — 20.5% line coverage (46/224).
  • Low coverage: excalidraw-app/bug-issue-template.js excalidraw-app/bug-issue-template.js:1 — 0.0% line coverage (0/11).
  • Low coverage: excalidraw-app/debugCollaborators.ts excalidraw-app/debugCollaborators.ts:1 — 45.9% line coverage (34/74).
  • + 104 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×89
  • TodoComment REDACTED:449 — // TODO maybe remove this in several months (shipped: 24-03-11) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment excalidraw-app/collab/Collab.tsx:520 — // TODO: `ImportedDataState` type here seems abused — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/common/src/points.ts:68 — // TODO: Rounding this point causes some shake when free drawing — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:136 — // TODO: shouldn't be really `const`, likely neither have integers as values, due to value for the custom fonts, which should likely be some hash. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/common/src/binary-heap.ts:14 — // TODO: Optimize — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/zindex.ts:95 — // TODO: why not to get the container from the nextElements? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/types.ts:134 — // TODO move later to AI-specific frame — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/typeChecks.ts:221 — // TODO: Remove this when proper distance calculation is introduced — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/store.ts:109 — // TODO: Suspicious that this is called so many places. Seems error-prone. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/store.ts:434 — // TODO: we might need to have binary files here as well, in order to be drop-in replacement for `onChange` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/store.ts:980 — // TODO: consider just creating new instance, once we can ensure that all reference properties on every element are immutable — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/store.ts:981 — // TODO: consider creating a lazy deep clone, having a one-time-usage proxy over the snapshotted element and deep cloning only if it gets mutated — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/sizeHelpers.ts:58 — // TODO: remove invisible elements consistently actions, so that invisible elements are not recorded by the store, exported, broadcasted or persisted — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/shape.ts:1173 — // TODO: satisfies ElementUpdate<ExcalidrawLineElement> — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/selection.ts:70 — // TODO remove (this flag is effectively unused AFAIK) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/renderElement.ts:1008 — // TODO can be be improved by offseting to the negative when user selects — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/renderElement.ts:1095 — // TODO change later to only affect AI frames — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/positionElementsOnGrid.ts:6 — // TODO rewrite (mostly vibe-coded) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/linearElementEditor.ts:1872 — // TODO do we need to get precise coords here just to calc centers? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/frame.ts:841 — // TODO: this a huge bottleneck for large scenes, optimise — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/frame.ts:1005 — // TODO name frames "AI" only if specific to AI frames — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/elbowArrow.ts:995 — // TODO (dwelle,mtolmacs): Remove this once Scene.getScene() is removed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/elbowArrow.ts:1059 — // TODO (dwelle,mtolmacs): Remove this once Scene.getScene() is removed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/duplicate.ts:157 — // TODO remove/review this once we add frame children order migration — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/element/src/delta.ts:728 — // TODO: #7348 we could still get an empty undo/redo, as we assume that previous appstate does not contain references to deleted elements
  • + 64 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×73
  • FunctionTooLong: App.ExcalidrawWrapper REDACTED:375 — FunctionTooLong — ExcalidrawWrapper runs 644 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 544 over it, 6.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: CommandPalette.CommandPaletteInner packages/excalidraw/components/CommandPalette/CommandPalette.tsx:200 — FunctionTooLong — CommandPaletteInner runs 550 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 450 over it, 5.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: HelpDialog.HelpDialog packages/excalidraw/components/HelpDialog.tsx:128 — FunctionTooLong — HelpDialog runs 380 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 280 over it, 3.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: interactiveScene._renderInteractiveScene packages/excalidraw/renderer/interactiveScene.ts:1614 — FunctionTooLong — _renderInteractiveScene runs 372 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 272 over it, 3.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: topPicksDnD.useTopPicksDnD packages/excalidraw/components/TopPicksDnD/topPicksDnD.tsx:140 — FunctionTooLong — useTopPicksDnD runs 367 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 267 over it, 3.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: LibraryMenuItems.LibraryMenuItems packages/excalidraw/components/LibraryMenuItems.tsx:60 — FunctionTooLong — LibraryMenuItems runs 303 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 203 over it, 3.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: PublishLibrary.PublishLibrary packages/excalidraw/components/PublishLibrary.tsx:213 — FunctionTooLong — PublishLibrary runs 288 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 188 over it, 2.88× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: linearElementEditor.pointDraggingUpdates packages/element/src/linearElementEditor.ts:2377 — FunctionTooLong — pointDraggingUpdates runs 285 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 185 over it, 2.85× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: MobileToolbar.MobileToolbar packages/excalidraw/components/MobileToolbar.tsx:49 — FunctionTooLong — MobileToolbar runs 271 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 171 over it, 2.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: resizeElements.resizeMultipleElements packages/element/src/resizeElements.ts:1234 — FunctionTooLong — resizeMultipleElements runs 265 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 165 over it, 2.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: SearchMenu.SearchMenu packages/excalidraw/components/SearchMenu.tsx:83 — FunctionTooLong — SearchMenu runs 247 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 147 over it, 2.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: binding.getBindingStrategyForDraggingBindingElementEndpoints_simple packages/element/src/binding.ts:654 — FunctionTooLong — getBindingStrategyForDraggingBindingElementEndpoints_simple runs 244 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 144 over it, 2.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: transform.convertToExcalidrawElements packages/element/src/transform.ts:579 — FunctionTooLong — convertToExcalidrawElements runs 240 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 140 over it, 2.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: interactiveScene.renderBindingHighlightForBindableElement_complex packages/excalidraw/renderer/interactiveScene.ts:525 — FunctionTooLong — renderBindingHighlightForBindableElement_complex runs 234 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 134 over it, 2.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Hyperlink.Hyperlink packages/excalidraw/components/hyperlink/Hyperlink.tsx:118 — FunctionTooLong — Hyperlink runs 230 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 130 over it, 2.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ImageExportDialog.ImageExportModal packages/excalidraw/components/ImageExportDialog.tsx:65 — FunctionTooLong — ImageExportModal runs 226 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 126 over it, 2.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: binding.getBindingSideMidPoint packages/element/src/binding.ts:2913 — FunctionTooLong — getBindingSideMidPoint runs 223 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 123 over it, 2.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: elbowArrow.getElbowArrowData packages/element/src/elbowArrow.ts:1192 — FunctionTooLong — getElbowArrowData runs 203 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 103 over it, 2.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: MermaidToExcalidraw.MermaidToExcalidraw packages/excalidraw/components/TTDDialog/MermaidToExcalidraw.tsx:69 — FunctionTooLong — MermaidToExcalidraw runs 201 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 101 over it, 2.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: staticScene._renderStaticScene packages/excalidraw/renderer/staticScene.ts:333 — FunctionTooLong — _renderStaticScene runs 201 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 101 over it, 2.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: duplicate.duplicateElements packages/element/src/duplicate.ts:136 — FunctionTooLong — duplicateElements runs 199 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 99 over it, 1.99× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: interactiveScene.renderBindingHighlightForBindableElement_simple packages/excalidraw/renderer/interactiveScene.ts:258 — FunctionTooLong — renderBindingHighlightForBindableElement_simple runs 191 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 91 over it, 1.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: renderElement.drawElementOnCanvas packages/element/src/renderElement.ts:460 — FunctionTooLong — drawElementOnCanvas runs 190 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 90 over it, 1.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: bounds.elementsOverlappingBBox packages/element/src/bounds.ts:1273 — FunctionTooLong — elementsOverlappingBBox runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: resizeElements.resizeSingleElement packages/element/src/resizeElements.ts:748 — FunctionTooLong — resizeSingleElement runs 183 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 48 more in this group — see findings.md.
D23 · Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw) · ×72
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/actions/types.ts:166 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via Action.label — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/actions/types.ts:174 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via Action.icon — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/actions/types.ts:183 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via Action.keyTest — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/actions/types.ts:189 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via Action.predicate — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/actions/types.ts:196 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via Action.trackEvent — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/viewport.ts:370 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via viewport.getClosestElementBounds — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/viewport.ts:483 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via viewport.getScrollToContentState — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/data/types.ts:18 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via ExportedDataState.elements — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/data/types.ts:39 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via ImportedDataState.elements — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/data/json.ts:52 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via json.serializeAsJSON — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/data/json.ts:102 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via json.loadFromJSON — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/data/restore.ts:537 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via restore.restoreElement — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/fonts/Fonts.ts:194 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via Fonts.loadElementsFonts — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/fonts/Fonts.ts:229 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via Fonts.generateFontFaceDeclarations — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/data/blob.ts:140 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via blob.loadSceneOrLibraryFromBlob — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/data/blob.ts:200 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via blob.loadFromBlob — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/clipboard.ts:48 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via ClipboardData.elements — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/components/App.selection.ts:493 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via ElementsOrIds.ElementsOrIds — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/components/App.selection.ts:705 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via AppSelection.isASelectedElement — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/components/App.selection.ts:711 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via AppSelection.isHittingCommonBoundingBoxOfSelectedElements — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/components/ColorPicker/colorPickerUtils.ts:55 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via colorPickerUtils.getMostUsedCustomColors — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/actions/colorTargets.ts:103 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via colorTargets.resolveColorTarget — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/actions/actionProperties.tsx:193 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via actionProperties.changeProperty — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/actions/actionProperties.tsx:229 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via actionProperties.getFormValue — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw) packages/excalidraw/data/index.ts:49 — ExcalidrawElement (context element) is exposed in excalidraw's public surface via index.prepareElementsForExport — couples the contexts.
  • + 47 more in this group — see findings.md.
D23 · Boundary Type-Coupling · Cross-context type GlobalPoint (math → element) · ×47
  • Cross-context type GlobalPoint (math → element) packages/element/src/arrowEndpointText.ts:61 — GlobalPoint (context math) is exposed in element's public surface via arrowEndpointText.getUnboundArrowEndpointAtPoint — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/arrowEndpointText.ts:133 — GlobalPoint (context math) is exposed in element's public surface via arrowEndpointText.getTextBindingForArrowEndpoint — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/distance.ts:30 — GlobalPoint (context math) is exposed in element's public surface via distance.distanceToElement — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/bucketFill.ts:1470 — GlobalPoint (context math) is exposed in element's public surface via bucketFill.computeBucketFillPolygon — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/bucketFill.ts:1885 — GlobalPoint (context math) is exposed in element's public surface via bucketFill.isRestylableFill — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/zindex.ts:153 — GlobalPoint (context math) is exposed in element's public surface via zindex.moveArrowAboveBindable — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/arrows/focus.ts:37 — GlobalPoint (context math) is exposed in element's public surface via focus.isFocusPointVisible — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/convertToShape.ts:58 — GlobalPoint (context math) is exposed in element's public surface via Window.LAST_POINTS — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/convertToShape.ts:535 — GlobalPoint (context math) is exposed in element's public surface via convertToShape.convertToShape — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/utils.ts:377 — GlobalPoint (context math) is exposed in element's public surface via utils.getDiamondBaseCorners — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/utils.ts:743 — GlobalPoint (context math) is exposed in element's public surface via utils.getAllMidpoints — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/utils.ts:769 — GlobalPoint (context math) is exposed in element's public surface via utils.getElbowArrowSnapMidPoint — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/utils.ts:788 — GlobalPoint (context math) is exposed in element's public surface via utils.getSnapOutlineMidPoint — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/utils.ts:810 — GlobalPoint (context math) is exposed in element's public surface via utils.projectFixedPointOntoDiagonal — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/collision.ts:250 — GlobalPoint (context math) is exposed in element's public surface via collision.hitElementBoundingBox — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/collision.ts:269 — GlobalPoint (context math) is exposed in element's public surface via collision.hitElementBoundText — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/collision.ts:427 — GlobalPoint (context math) is exposed in element's public surface via collision.getAllHoveredElementAtPoint — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/collision.ts:437 — GlobalPoint (context math) is exposed in element's public surface via collision.getHoveredElementForBinding — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/collision.ts:495 — GlobalPoint (context math) is exposed in element's public surface via collision.intersectElementWithLineSegment — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/collision.ts:830 — GlobalPoint (context math) is exposed in element's public surface via collision.isPointInElement — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/binding.ts:1141 — GlobalPoint (context math) is exposed in element's public surface via binding.bindBindingElement — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/binding.ts:1574 — GlobalPoint (context math) is exposed in element's public surface via binding.getHeadingForElbowArrowSnap — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/binding.ts:1617 — GlobalPoint (context math) is exposed in element's public surface via binding.bindPointToSnapToElementOutline — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/binding.ts:1765 — GlobalPoint (context math) is exposed in element's public surface via binding.avoidRectangularCorner — couples the contexts.
  • Cross-context type GlobalPoint (math → element) packages/element/src/binding.ts:2196 — GlobalPoint (context math) is exposed in element's public surface via binding.calculateFixedPointForNonElbowArrowBinding — couples the contexts.
  • + 22 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×42
  • Hotspot: REDACTED REDACTED:9448 — REDACTED changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 133 in App.onPointerUpFromPointerDownHandler at line 9448. 11 of those changes were fix/bug commits, and the other 32 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/excalidraw/wysiwyg/textWysiwyg.tsx packages/excalidraw/wysiwyg/textWysiwyg.tsx:250 — packages/excalidraw/wysiwyg/textWysiwyg.tsx changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 142 in textWysiwyg.textWysiwyg at line 250. 4 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/excalidraw/wysiwyg/textWysiwyg.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/excalidraw/renderer/interactiveScene.ts packages/excalidraw/renderer/interactiveScene.ts:1614 — packages/excalidraw/renderer/interactiveScene.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 79 in interactiveScene._renderInteractiveScene at line 1614. 2 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/excalidraw/renderer/interactiveScene.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/element/src/transform.ts packages/element/src/transform.ts:579 — packages/element/src/transform.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 74 in transform.convertToExcalidrawElements at line 579. 3 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/element/src/transform.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/excalidraw/data/restore.ts packages/excalidraw/data/restore.ts:537 — packages/excalidraw/data/restore.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in restore.restoreElement at line 537. 3 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/excalidraw/data/restore.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:375 — REDACTED changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 92 in App.ExcalidrawWrapper at line 375. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/excalidraw/actions/actionFinalize.tsx packages/excalidraw/actions/actionFinalize.tsx:57 — packages/excalidraw/actions/actionFinalize.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in perform at line 57. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/excalidraw/actions/actionFinalize.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/element/src/resizeElements.ts packages/element/src/resizeElements.ts:1234 — packages/element/src/resizeElements.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 73 in resizeElements.resizeMultipleElements at line 1234. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/element/src/resizeElements.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/excalidraw/components/App.text.ts packages/excalidraw/components/App.text.ts:615 — packages/excalidraw/components/App.text.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in AppText.startTextEditing at line 615. 2 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/excalidraw/components/App.text.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:97 — REDACTED changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 93 in staticSvgScene.renderElementToSvg at line 97. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/excalidraw/tests/helpers/api.ts packages/excalidraw/tests/helpers/api.ts:256 — packages/excalidraw/tests/helpers/api.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in (anonymous) at line 256. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/excalidraw/tests/helpers/api.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/element/src/renderElement.ts packages/element/src/renderElement.ts:460 — packages/element/src/renderElement.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in renderElement.drawElementOnCanvas at line 460. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/element/src/renderElement.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/excalidraw/components/HintViewer.tsx packages/excalidraw/components/HintViewer.tsx:43 — packages/excalidraw/components/HintViewer.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 65 in HintViewer.getHints at line 43. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/excalidraw/components/HintViewer.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/excalidraw/components/LayerUI.tsx packages/excalidraw/components/LayerUI.tsx:147 — packages/excalidraw/components/LayerUI.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 77 in LayerUI.LayerUI at line 147. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/excalidraw/components/LayerUI.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/excalidraw/components/CommandPalette/CommandPalette.tsx packages/excalidraw/components/CommandPalette/CommandPalette.tsx:200 — packages/excalidraw/components/CommandPalette/CommandPalette.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in CommandPalette.CommandPaletteInner at line 200. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/excalidraw/components/CommandPalette/CommandPalette.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/excalidraw/components/App.selectionTool.ts packages/excalidraw/components/App.selectionTool.ts:104 — packages/excalidraw/components/App.selectionTool.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in AppSelectionTool.handleSelectionOnPointerDown at line 104. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/excalidraw/components/App.selectionTool.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/excalidraw/renderer/staticScene.ts packages/excalidraw/renderer/staticScene.ts:333 — packages/excalidraw/renderer/staticScene.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in staticScene._renderStaticScene at line 333. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/excalidraw/renderer/staticScene.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/excalidraw/components/TopPicksDnD/topPicksDnD.tsx packages/excalidraw/components/TopPicksDnD/topPicksDnD.tsx:140 — packages/excalidraw/components/TopPicksDnD/topPicksDnD.tsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 65 in topPicksDnD.useTopPicksDnD at line 140. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/excalidraw/components/TopPicksDnD/topPicksDnD.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/element/src/collision.ts packages/element/src/collision.ts:137 — packages/element/src/collision.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in collision.hitElementItself at line 137. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/element/src/collision.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:549 — REDACTED changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in export.configExportDimension at line 549. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/excalidraw/components/App.cursor.ts packages/excalidraw/components/App.cursor.ts:95 — packages/excalidraw/components/App.cursor.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in AppCursor.applyForTool at line 95. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/excalidraw/components/App.cursor.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/excalidraw/components/MobileToolbar.tsx packages/excalidraw/components/MobileToolbar.tsx:49 — packages/excalidraw/components/MobileToolbar.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in MobileToolbar.MobileToolbar at line 49. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/excalidraw/components/MobileToolbar.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/excalidraw/components/Actions.tsx packages/excalidraw/components/Actions.tsx:129 — packages/excalidraw/components/Actions.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in Actions.SelectedShapeActions at line 129. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/excalidraw/components/Actions.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/element/src/dragElements.ts packages/element/src/dragElements.ts:40 — packages/element/src/dragElements.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in dragElements.dragSelectedElements at line 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. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/element/src/dragElements.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/excalidraw/components/App.viewport.ts packages/excalidraw/components/App.viewport.ts:629 — packages/excalidraw/components/App.viewport.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in AppViewport.getOffsets at line 629. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-23..2026-10-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-23 12:36:40 +02:00' --until='2026-10-21 12:36:40 +02:00' --full-history --no-merges -- packages/excalidraw/components/App.viewport.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 17 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×41
  • FileTooLong: REDACTED REDACTED — FileTooLong — 7545 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: App (583-11446). The bar is 500 significant lines; this is 7045 over it, 15.09× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/binding.ts packages/element/src/binding.ts — FileTooLong — 2257 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1757 over it, 4.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/linearElementEditor.ts packages/element/src/linearElementEditor.ts — FileTooLong — 2018 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: LinearElementEditor (143-2365). The bar is 500 significant lines; this is 1518 over it, 4.04× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: actions/actionProperties.tsx packages/excalidraw/actions/actionProperties.tsx — FileTooLong — 1653 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1153 over it, 3.31× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/elbowArrow.ts packages/element/src/elbowArrow.ts — FileTooLong — 1610 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1110 over it, 3.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: renderer/interactiveScene.ts packages/excalidraw/renderer/interactiveScene.ts — FileTooLong — 1559 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1059 over it, 3.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/delta.ts packages/element/src/delta.ts — FileTooLong — 1313 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 813 over it, 2.63× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/resizeElements.ts packages/element/src/resizeElements.ts — FileTooLong — 1182 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 682 over it, 2.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/bounds.ts packages/element/src/bounds.ts — FileTooLong — 1103 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 603 over it, 2.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/bucketFill.ts packages/element/src/bucketFill.ts — FileTooLong — 1049 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 549 over it, 2.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/renderElement.ts packages/element/src/renderElement.ts — FileTooLong — 999 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 499 over it, 2.00× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: components/App.selectionTool.ts packages/excalidraw/components/App.selectionTool.ts — FileTooLong — 967 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: AppSelectionTool (92-1549). The bar is 500 significant lines; this is 467 over it, 1.93× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: data/restore.ts packages/excalidraw/data/restore.ts — FileTooLong — 964 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 464 over it, 1.93× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: excalidraw/snapping.ts packages/excalidraw/snapping.ts — FileTooLong — 937 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 437 over it, 1.87× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 936 significant lines (blank, comment-only and punctuation-only lines excluded), about 69% of them inside a single declaration: ExcalidrawWrapper (375-1311). The bar is 500 significant lines; this is 436 over it, 1.87× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/shape.ts packages/element/src/shape.ts — FileTooLong — 902 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 402 over it, 1.80× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: excalidraw/types.ts packages/excalidraw/types.ts — FileTooLong — 900 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 400 over it, 1.80× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: wysiwyg/textWysiwyg.tsx packages/excalidraw/wysiwyg/textWysiwyg.tsx — FileTooLong — 878 significant lines (blank, comment-only and punctuation-only lines excluded), about 80% of them inside a single declaration: SubmitHandler (248-1329). The bar is 500 significant lines; this is 378 over it, 1.76× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/utils.ts packages/common/src/utils.ts — FileTooLong — 838 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 338 over it, 1.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: CommandPalette/CommandPalette.tsx packages/excalidraw/components/CommandPalette/CommandPalette.tsx — FileTooLong — 763 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: CommandPaletteInner (200-971). The bar is 500 significant lines; this is 263 over it, 1.53× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: charts/charts.helpers.ts packages/excalidraw/charts/charts.helpers.ts — FileTooLong — 740 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 240 over it, 1.48× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: components/Actions.tsx packages/excalidraw/components/Actions.tsx — FileTooLong — 739 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 239 over it, 1.48× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 727 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 227 over it, 1.45× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: collab/Collab.tsx excalidraw-app/collab/Collab.tsx — FileTooLong — 720 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: Collab (140-1092). The bar is 500 significant lines; this is 220 over it, 1.44× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 695 significant lines (blank, comment-only and punctuation-only lines excluded), about 80% of them inside a single declaration: renderElementToSvg (97-851). The bar is 500 significant lines; this is 195 over it, 1.39× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • + 16 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · Medium CVE · ×33
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 8 more in this group — see findings.md.
R11 · Import Boundaries · Boundary violation [package · ×32
  • Boundary violation [package:undeclared-workspace-dep] packages/common/global.d.ts:2 — packages/common/global.d.ts:2 imports @excalidraw/excalidraw/global, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/common/global.d.ts:3 — packages/common/global.d.ts:3 imports @excalidraw/excalidraw/css, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/common/src/colors.ts:3 — packages/common/src/colors.ts:3 imports @excalidraw/math, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/common/src/colors.ts:4 — packages/common/src/colors.ts:4 imports @excalidraw/math, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/common/src/points.ts:1 — packages/common/src/points.ts:1 imports @excalidraw/math, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/common/src/utils.ts:1 — packages/common/src/utils.ts:1 imports @excalidraw/math, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/element/global.d.ts:2 — packages/element/global.d.ts:2 imports @excalidraw/excalidraw/global, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/element/global.d.ts:3 — packages/element/global.d.ts:3 imports @excalidraw/excalidraw/css, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:relative-cross-package] packages/element/src/Scene.ts:43 — packages/element/src/Scene.ts:43 reaches into another package with a relative path (../../excalidraw/types) — import the package by name instead.
  • Boundary violation [package:undeclared-workspace-dep] packages/element/src/bounds.ts:16 — packages/element/src/bounds.ts:16 imports @excalidraw/utils/shape, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/element/src/linearElementEditor.ts:21 — packages/element/src/linearElementEditor.ts:21 imports @excalidraw/utils/shape, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/element/src/shape.ts:3 — packages/element/src/shape.ts:3 imports @excalidraw/laser-pointer, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/element/src/shape.ts:5 — packages/element/src/shape.ts:5 imports @excalidraw/utils/shape, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:relative-cross-package] packages/excalidraw/actions/actionLinearEditor.tsx:23 — packages/excalidraw/actions/actionLinearEditor.tsx:23 reaches into another package with a relative path (../../element/src/mutateElement) — import the package by name instead.
  • Boundary violation [package:undeclared-workspace-dep] packages/excalidraw/components/Stats/MultiDimension.tsx:26 — packages/excalidraw/components/Stats/MultiDimension.tsx:26 imports @excalidraw/utils, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/excalidraw/components/TTDDialog/common.ts:5 — packages/excalidraw/components/TTDDialog/common.ts:5 imports @excalidraw/utils, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/math/global.d.ts:2 — packages/math/global.d.ts:2 imports @excalidraw/excalidraw/global, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/math/global.d.ts:3 — packages/math/global.d.ts:3 imports @excalidraw/excalidraw/css, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/utils/global.d.ts:2 — packages/utils/global.d.ts:2 imports @excalidraw/excalidraw/global, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/utils/global.d.ts:3 — packages/utils/global.d.ts:3 imports @excalidraw/excalidraw/css, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/utils/src/index.ts:2 — packages/utils/src/index.ts:2 imports @excalidraw/excalidraw/scene/export, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/utils/src/index.ts:14 — packages/utils/src/index.ts:14 imports @excalidraw/element, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/utils/src/index.ts:15 — packages/utils/src/index.ts:15 imports @excalidraw/element, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/utils/src/shape.ts:16 — packages/utils/src/shape.ts:16 imports @excalidraw/common, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • Boundary violation [package:undeclared-workspace-dep] packages/utils/src/shape.ts:17 — packages/utils/src/shape.ts:17 imports @excalidraw/math, a package this repository publishes, but this package's own REDACTED does not list it in dependencies (or peer/optional dependencies) — it resolves only through the workspace link, so an installed copy of this package is missing it. Add it to this package's dependencies.
  • + 7 more in this group — see findings.md.
D10 · Test Quality · Skipped test · ×27
  • Skipped test: normalize boundElements array packages/element/tests/sortElements.test.ts:385 — Skipped — switched off by it.skip
  • Skipped test: normalizeElementsOrder() perf packages/element/tests/sortElements.test.ts:413 — Skipped — switched off by it.skip
  • Skipped test: flips while resizing packages/element/tests/resize.test.tsx:750 — Skipped — switched off by it.skip
  • Skipped test: resizes from center packages/element/tests/resize.test.tsx:766 — Skipped — switched off by it.skip
  • Skipped test: should add elements packages/element/tests/frame.test.tsx:578 — Skipped — switched off by it.skip
  • Skipped test: should add elements when there are other other elements in between packages/element/tests/frame.test.tsx:589 — Skipped — switched off by it.skip
  • Skipped test: should add elements when there are other elements in between and the order is reversed packages/element/tests/frame.test.tsx:600 — Skipped — switched off by it.skip
  • Skipped test: resizing over text containers and labelled arrows packages/element/tests/frame.test.tsx:657 — Skipped — switched off by it.skip
  • Skipped test: should add arrow bound with text when frame is in a layer below packages/element/tests/frame.test.tsx:707 — Skipped — switched off by it.skip
  • Skipped test: should add arrow bound with text when frame is in an inner layer packages/element/tests/frame.test.tsx:727 — Skipped — switched off by it.skip
  • Skipped test: should add elements when frame is in a layer below packages/element/tests/frame.test.tsx:739 — Skipped — switched off by it.skip
  • Skipped test: should add elements when frame is in a layer above packages/element/tests/frame.test.tsx:750 — Skipped — switched off by it.skip
  • Skipped test: should add elements when frame is in an inner layer packages/element/tests/frame.test.tsx:761 — Skipped — switched off by it.skip
  • Skipped test: should drag element inside, duplicate it and keep it in frame packages/element/tests/frame.test.tsx:1143 — Skipped — switched off by it.skip
  • Skipped test: should drag element inside, duplicate it and remove it from frame packages/element/tests/frame.test.tsx:1157 — Skipped — switched off by it.skip
  • Skipped test: should create orbit binding when one of the cursor is inside rectangle packages/element/tests/binding.test.tsx:584 — Skipped — switched off by it.skip
  • Skipped test: checks nested containment against the current editing depth packages/excalidraw/tests/selection.test.tsx:1184 — Skipped — switched off by it.skip
  • Skipped test: should support undo and redo when escape unwinds nested group editing packages/excalidraw/tests/history.test.tsx:2976 — Skipped — switched off by it.skip
  • Skipped test: flips an unrotated arrow horizontally with line outside min/max points bounds packages/excalidraw/tests/flip.test.tsx:480 — Skipped — switched off by it.skip
  • Skipped test: flips a rotated arrow horizontally with line outside min/max points bounds packages/excalidraw/tests/flip.test.tsx:491 — Skipped — switched off by it.skip
  • Skipped test: flips an unrotated arrow vertically with line outside min/max points bounds packages/excalidraw/tests/flip.test.tsx:506 — Skipped — switched off by it.skip
  • Skipped test: flips a rotated arrow vertically with line outside min/max points bounds packages/excalidraw/tests/flip.test.tsx:515 — Skipped — switched off by it.skip
  • Skipped test: flips an unrotated line horizontally with line outside min/max points bounds packages/excalidraw/tests/flip.test.tsx:579 — Skipped — switched off by it.skip
  • Skipped test: flips an unrotated line vertically with line outside min/max points bounds packages/excalidraw/tests/flip.test.tsx:590 — Skipped — switched off by it.skip
  • Skipped test: flips a rotated line horizontally with line outside min/max points bounds packages/excalidraw/tests/flip.test.tsx:599 — Skipped — switched off by it.skip
  • + 2 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×26
  • No test reaches this file dev-docs/src/initialData.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/element/src/visualdebug.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/locales-coverage-description.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file dev-docs/sidebars.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/buildPackage.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/woff2/woff2-vite-plugins.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/updateChangelog.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file excalidraw-app/sentry.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/excalidraw/index-node.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file dev-docs/src/components/Homepage/index.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/buildUtils.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file dev-docs/src/components/Homepage/index.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/build-version.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/buildBase.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/build-node.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file dev-docs/src/theme/ReactLiveScope/index.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/build-locales-coverage.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file dev-docs/src/pages/index.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/excalidraw/components/ButtonIconCycle.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/buildDocs.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/excalidraw/env.cjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file excalidraw-app/index.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file dev-docs/src/components/Highlight.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 1 more in this group — see findings.md.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×21
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/css/styles.scss:79 — `.excalidraw:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/ConvertElementTypePopup.scss:15 — `.excalidraw .ConvertElementTypePopup:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/Modal.scss:78 — `.excalidraw .Modal__content:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/Popover.scss:5 — `.excalidraw .popover` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/Range.scss:27 — `.excalidraw .range-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/SearchMenu.scss:109 — `.excalidraw .layer-ui__result-item` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/TextField.scss:82 — `.excalidraw .ExcTextField__input input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/ToolPopover.scss:16 — `.excalidraw:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/UnlockPopup.scss:19 — `.excalidraw .UnlockPopup:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/hyperlink/Hyperlink.scss:37 — `.excalidraw-hyperlinkContainer-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/TopPicksDnD/TopPicksDnD.scss:118 — `.excalidraw .top-picks-dnd__context-menu-item` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/TTDDialog/TTDDialog.scss:108 — `.excalidraw .ttd-dialog-content` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/TTDDialog/TTDDialog.scss:242 — `.excalidraw .ttd-dialog-input--codemirror .cm-editor.cm-focused` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/TTDDialog/Chat/Chat.scss:119 — `.excalidraw .chat-interface__input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/Stats/DragInput.scss:44 — `.excalidraw .drag-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/Sidebar/Sidebar.scss:111 — `.excalidraw .sidebar-tabs-root [role="tabpanel"]` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/ColorPicker/ColorPicker.scss:12 — `.excalidraw .focus-visible-none:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/ColorPicker/ColorPicker.scss:121 — `.excalidraw .color-picker__button:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/ColorPicker/ColorPicker.scss:157 — `.excalidraw .color-picker__button--no-focus-visible:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/ColorPicker/ColorPicker.scss:261 — `.excalidraw .color-picker-content` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement packages/excalidraw/components/ColorPicker/ColorPicker.scss:383 — `.excalidraw .color-picker-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D3 · God Classes · MethodTooLong · ×20
  • MethodTooLong: App.onPointerUpFromPointerDownHandler REDACTED:9448 — MethodTooLong — onPointerUpFromPointerDownHandler runs 532 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 432 over it, 5.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.render REDACTED:2325 — MethodTooLong — render runs 364 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 264 over it, 3.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.onPointerMoveFromPointerDownHandler REDACTED:8990 — MethodTooLong — onPointerMoveFromPointerDownHandler runs 281 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 181 over it, 2.81× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.handleCanvasPointerDown REDACTED:7526 — MethodTooLong — handleCanvasPointerDown runs 249 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 149 over it, 2.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.handleLinearElementOnPointerDown REDACTED:8478 — MethodTooLong — handleLinearElementOnPointerDown runs 213 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 113 over it, 2.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.renderEmbeddables REDACTED:1798 — MethodTooLong — renderEmbeddables runs 209 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 109 over it, 2.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppText.startTextEditing packages/excalidraw/components/App.text.ts:615 — MethodTooLong — startTextEditing runs 190 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 90 over it, 1.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LinearElementEditor.handlePointDragging packages/element/src/linearElementEditor.ts:471 — MethodTooLong — handlePointDragging runs 185 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 85 over it, 1.85× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.addEventListeners REDACTED:3992 — MethodTooLong — addEventListeners runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppSelectionTool.handleSelectionDragOnPointerMove packages/excalidraw/components/App.selectionTool.ts:741 — MethodTooLong — handleSelectionDragOnPointerMove runs 165 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.handleCanvasDoubleClick REDACTED:6205 — MethodTooLong — handleCanvasDoubleClick runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LaserPointer.getStrokeOutline packages/laser-pointer/src/state.ts:119 — MethodTooLong — getStrokeOutline runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppClipboard.addTextFromPaste packages/excalidraw/components/App.clipboard.ts:427 — MethodTooLong — addTextFromPaste runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.handleDelayedBindModeChange REDACTED:1269 — MethodTooLong — handleDelayedBindModeChange runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.renderFrameNames REDACTED:2141 — MethodTooLong — renderFrameNames runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: LinearElementEditor.handlePointerMove packages/element/src/linearElementEditor.ts:311 — MethodTooLong — handlePointerMove runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.componentDidUpdate REDACTED:4293 — MethodTooLong — componentDidUpdate runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppClipboard.insertClipboardContent packages/excalidraw/components/App.clipboard.ts:112 — MethodTooLong — insertClipboardContent runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppPan.start packages/excalidraw/components/App.pan.ts:101 — MethodTooLong — start runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: App.initializeScene REDACTED:3568 — MethodTooLong — initializeScene runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×16
  • Animation without a prefers-reduced-motion guard packages/excalidraw/components/FilledButton.scss:50 — `.excalidraw .ExcButton .ExcButton__statusIcon` moves (`animation: successStatusAnimation 0.5s cubic-bezier(0.3, 1, 0.6, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard packages/excalidraw/components/LayerUI.scss:5 — `.excalidraw .layer-ui__wrapper.animate` moves (`transition: width 0.1s ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard packages/excalidraw/components/LibraryUnit.scss:169 — `.excalidraw .library-unit__adder` moves (`animation: library-unit__adder-animation 1s ease-in infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard packages/excalidraw/components/Modal.scss:64 — `.excalidraw .Modal__content` moves (`animation: Modal__content_fade-in 0.025s ease-out 0s forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard packages/excalidraw/components/PasteChartDialog.scss:26 — `.excalidraw .PasteChartDialog .PasteChartDialog__reshuffleBtn` moves (`transition: transform 120ms ease, background-color 120ms ease, color 120ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard packages/excalidraw/components/Spinner.scss:17 — `.excalidraw .Spinner svg` moves (`animation: rotate $duration linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard packages/excalidraw/components/UserList.scss:172 — `.excalidraw .UserList__collaborator-status-icon-speaking-indicator div:nth-of-type(1)` moves (`animation: speaking-indicator-anim 1s -0.45s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard packages/excalidraw/components/UserList.scss:176 — `.excalidraw .UserList__collaborator-status-icon-speaking-indicator div:nth-of-type(2)` moves (`animation: speaking-indicator-anim 1s -0.9s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard packages/excalidraw/components/UserList.scss:180 — `.excalidraw .UserList__collaborator-status-icon-speaking-indicator div:nth-of-type(3)` moves (`animation: speaking-indicator-anim 1s -0.15s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard packages/excalidraw/components/TopPicksDnD/TopPicksDnD.scss:21 — `.excalidraw .top-picks-dnd.is-dnd-active .top-picks-dnd__pick` moves (`transition: transform 0.14s ease, opacity 0.14s ease, box-shadow 0.14s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard packages/excalidraw/components/TopPicksDnD/TopPicksDnD.scss:67 — `.excalidraw .top-picks-dnd__pick.is-dnd-duplicate` moves (`animation: excalidraw-top-picks-dnd-duplicate 0.45s ease-in-out infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard packages/excalidraw/components/TopPicksDnD/TopPicksDnD.scss:156 — `.excalidraw-top-picks-dnd-ghost__content` moves (`transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard packages/excalidraw/components/TopPicksDnD/TopPicksDnD.scss:177 — `.excalidraw-top-picks-dnd-ghost--dropping` moves (`transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.3, 1), width 0.18s ease, height 0.18s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard packages/excalidraw/components/TopPicksDnD/TopPicksDnD.scss:147 — `.excalidraw-top-picks-dnd-ghost` moves (`transition: width 0.15s ease, height 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard packages/excalidraw/components/TTDDialog/Chat/Chat.scss:318 — `.excalidraw .chat-message__typing-indicator span` moves (`animation: typing 1.4s infinite ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard excalidraw-app/collab/CollabError.scss:15 — `.excalidraw .collab-errors-button-shake` moves (`animation: strong-shake 0.15s 6`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D10 · Test Quality · No assertions · ×15
  • No assertions: duplication z order with Cmd+D for the lowest z-ordered element should be +1 for the clone packages/element/tests/duplicate.test.tsx:551 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: duplication z order with Cmd+D for the highest z-ordered element should be +1 for the clone packages/element/tests/duplicate.test.tsx:583 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: duplication z order with alt+drag for the lowest z-ordered element should be +1 for the clone packages/element/tests/duplicate.test.tsx:615 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: duplication z order with alt+drag for the highest z-ordered element should be +1 for the clone packages/element/tests/duplicate.test.tsx:648 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: duplication z order with alt+drag for the lowest z-ordered element should be +1 for the clone packages/element/tests/duplicate.test.tsx:681 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: duplication z order with alt+drag with grouped elements should consider the group together when determining z-index packages/element/tests/duplicate.test.tsx:714 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: alt-duplicating text container (in-order) packages/element/tests/duplicate.test.tsx:752 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: alt-duplicating text container (out-of-order) packages/element/tests/duplicate.test.tsx:773 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: alt-duplicating labeled arrows (out-of-order) packages/element/tests/duplicate.test.tsx:819 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: advances the marker of a %s label %j packages/element/tests/duplicate.test.tsx:1027 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: undo reverts the marker before the duplication packages/element/tests/duplicate.test.tsx:1063 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: leaves the texts of a duplicated frame as they are packages/element/tests/duplicate.test.tsx:1166 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: shouldn't be user-dockable if `onDock` not supplied packages/excalidraw/components/Sidebar/Sidebar.test.tsx:242 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: shouldn't be user-dockable if `onDock` not supplied & `docked={true}` packages/excalidraw/components/Sidebar/Sidebar.test.tsx:254 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: shouldn't be user-dockable if `onDock` not supplied & docked={false}` packages/excalidraw/components/Sidebar/Sidebar.test.tsx:266 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D23 · Boundary Type-Coupling · Cross-context type ExcalidrawTextElement (element → excalidraw) · ×15
  • Cross-context type ExcalidrawTextElement (element → excalidraw) packages/excalidraw/fonts/Fonts.ts:164 — ExcalidrawTextElement (context element) is exposed in excalidraw's public surface via Fonts.loadSceneFonts — couples the contexts.
  • Cross-context type ExcalidrawTextElement (element → excalidraw) packages/excalidraw/actions/actionBoundText.tsx:204 — ExcalidrawTextElement (context element) is exposed in excalidraw's public surface via actionBoundText.getStickyNoteInk — couples the contexts.
  • Cross-context type ExcalidrawTextElement (element → excalidraw) packages/excalidraw/actions/actionBoundText.tsx:215 — ExcalidrawTextElement (context element) is exposed in excalidraw's public surface via actionBoundText.bindTextToContainer — couples the contexts.
  • Cross-context type ExcalidrawTextElement (element → excalidraw) packages/excalidraw/actions/actionBoundText.tsx:297 — ExcalidrawTextElement (context element) is exposed in excalidraw's public surface via actionBoundText.pushContainerBelowText — couples the contexts.
  • Cross-context type ExcalidrawTextElement (element → excalidraw) packages/excalidraw/actions/actionBoundText.tsx:343 — ExcalidrawTextElement (context element) is exposed in excalidraw's public surface via actionBoundText.wrapTextsInContainers — couples the contexts.
  • Cross-context type ExcalidrawTextElement (element → excalidraw) packages/excalidraw/components/App.arrowText.ts:118 — ExcalidrawTextElement (context element) is exposed in excalidraw's public surface via AppArrowText.bindText — couples the contexts.
  • Cross-context type ExcalidrawTextElement (element → excalidraw) packages/excalidraw/textAutoResizeHandle.ts:23 — ExcalidrawTextElement (context element) is exposed in excalidraw's public surface via textAutoResizeHandle.getTextAutoResizeHandle — couples the contexts.
  • Cross-context type ExcalidrawTextElement (element → excalidraw) packages/excalidraw/textAutoResizeHandle.ts:67 — ExcalidrawTextElement (context element) is exposed in excalidraw's public surface via textAutoResizeHandle.isPointHittingTextAutoResizeHandle — couples the contexts.
  • Cross-context type ExcalidrawTextElement (element → excalidraw) packages/excalidraw/wysiwyg/textWysiwyg.tsx:250 — ExcalidrawTextElement (context element) is exposed in excalidraw's public surface via textWysiwyg.textWysiwyg — couples the contexts.
  • Cross-context type ExcalidrawTextElement (element → excalidraw) packages/excalidraw/components/App.text.ts:168 — ExcalidrawTextElement (context element) is exposed in excalidraw's public surface via AppText.handleTextWysiwyg — couples the contexts.
  • Cross-context type ExcalidrawTextElement (element → excalidraw) packages/excalidraw/components/App.text.ts:456 — ExcalidrawTextElement (context element) is exposed in excalidraw's public surface via AppText.getTextElementAtPosition — couples the contexts.
  • Cross-context type ExcalidrawTextElement (element → excalidraw) packages/excalidraw/components/App.text.ts:615 — ExcalidrawTextElement (context element) is exposed in excalidraw's public surface via AppText.startTextEditing — couples the contexts.
  • Cross-context type ExcalidrawTextElement (element → excalidraw) packages/excalidraw/components/App.duplicate.ts:123 — ExcalidrawTextElement (context element) is exposed in excalidraw's public surface via AppDuplicate.handedOverTextId — couples the contexts.
  • Cross-context type ExcalidrawTextElement (element → excalidraw) packages/excalidraw/components/App.duplicate.ts:130 — ExcalidrawTextElement (context element) is exposed in excalidraw's public surface via AppDuplicate.handOverTextEditorPress — couples the contexts.
  • Cross-context type ExcalidrawTextElement (element → excalidraw) packages/excalidraw/types.ts:427 — ExcalidrawTextElement (context element) is exposed in excalidraw's public surface via AppState.editingTextElement — couples the contexts.
X3 · Exception handling · Swallowed exception (empty catch) · ×15
  • Swallowed exception (empty catch) excalidraw-app/CustomStats.tsx:69 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:199 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) excalidraw-app/share/ShareDialog.tsx:100 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/common/src/utils.ts:1232 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/common/src/editorInterface.ts:204 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/common/src/editorInterface.ts:217 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/element/src/embeddable.ts:502 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/element/src/elementLink.ts:101 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/excalidraw/clipboard.ts:552 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:1109 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/excalidraw/components/TTDDialog/TTDDialog.tsx:72 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) packages/excalidraw/components/TTDDialog/MermaidToExcalidraw.tsx:220 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/excalidraw/components/TTDDialog/hooks/useTextGeneration.ts:100 — `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:1040 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:4001 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D17 · Explicit Debt · FixmeComment · ×13
  • FixmeComment packages/common/src/colors.ts:166 — // FIXME can't put to utils.ts rn because of circular dependency — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment packages/element/src/textMeasurements.ts:36 — // FIXME rename to getApproxMinContainerWidth — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment packages/element/src/textMeasurements.ts:106 — // FIXME rename to getApproxMinContainerHeight — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment packages/element/src/selection.ts:121 — // FIXME move this into the editor instance to keep utility methods stateless — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment packages/element/tests/zindex.test.tsx:1322 — // FIXME incorrect, should put F1_1 after R3 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment packages/element/tests/zindex.test.tsx:1325 — // FIXME should be noop from previous step after it's fixed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment packages/element/tests/frame.test.tsx:694 — // FIXME failing in tests (it fails to add elements to frame for some — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment packages/excalidraw/index.tsx:124 — // FIXME normalize/set defaults in parent component so that the memo resolver — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment packages/excalidraw/actions/actionDuplicateSelection.test.tsx:488 — // FIXME shouldn't be selected (in selectGroupsForSelectedElements) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment packages/excalidraw/actions/actionDuplicateSelection.test.tsx:494 — // FIXME shouldn't be selected (in selectGroupsForSelectedElements) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment packages/excalidraw/actions/actionCanvas.tsx:66 — // FIXME move me to src/components/mainMenu/DefaultItems.tsx — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment packages/excalidraw/wysiwyg/textWysiwyg.tsx:1240 — // FIXME after we start emitting updates from Store for appState.theme — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment packages/excalidraw/wysiwyg/textWysiwyg.test.tsx:652 — // FIXME too flaky. No one knows why. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D23 · Boundary Type-Coupling · Cross-context type ElementOrToolType (excalidraw → element) · ×13
  • Cross-context type ElementOrToolType (excalidraw → element) packages/element/src/typeChecks.ts:159 — ElementOrToolType (context excalidraw) is exposed in element's public surface via typeChecks.isLinearElementType — couples the contexts.
  • Cross-context type ElementOrToolType (excalidraw → element) packages/element/src/typeChecks.ts:178 — ElementOrToolType (context excalidraw) is exposed in element's public surface via typeChecks.isBindingElementType — couples the contexts.
  • Cross-context type ElementOrToolType (excalidraw → element) packages/element/src/typeChecks.ts:413 — ElementOrToolType (context excalidraw) is exposed in element's public surface via typeChecks.isEligibleFrameChildType — couples the contexts.
  • Cross-context type ElementOrToolType (excalidraw → element) packages/element/src/comparisons.ts:3 — ElementOrToolType (context excalidraw) is exposed in element's public surface via comparisons.hasBackground — couples the contexts.
  • Cross-context type ElementOrToolType (excalidraw → element) packages/element/src/comparisons.ts:16 — ElementOrToolType (context excalidraw) is exposed in element's public surface via comparisons.hasFillStyle — couples the contexts.
  • Cross-context type ElementOrToolType (excalidraw → element) packages/element/src/comparisons.ts:19 — ElementOrToolType (context excalidraw) is exposed in element's public surface via comparisons.hasStrokeColor — couples the contexts.
  • Cross-context type ElementOrToolType (excalidraw → element) packages/element/src/comparisons.ts:31 — ElementOrToolType (context excalidraw) is exposed in element's public surface via comparisons.hasStrokeWidth — couples the contexts.
  • Cross-context type ElementOrToolType (excalidraw → element) packages/element/src/comparisons.ts:42 — ElementOrToolType (context excalidraw) is exposed in element's public surface via comparisons.hasStrokeStyle — couples the contexts.
  • Cross-context type ElementOrToolType (excalidraw → element) packages/element/src/comparisons.ts:52 — ElementOrToolType (context excalidraw) is exposed in element's public surface via comparisons.hasRoughness — couples the contexts.
  • Cross-context type ElementOrToolType (excalidraw → element) packages/element/src/comparisons.ts:55 — ElementOrToolType (context excalidraw) is exposed in element's public surface via comparisons.hasFreedrawMode — couples the contexts.
  • Cross-context type ElementOrToolType (excalidraw → element) packages/element/src/comparisons.ts:57 — ElementOrToolType (context excalidraw) is exposed in element's public surface via comparisons.canChangeRoundness — couples the contexts.
  • Cross-context type ElementOrToolType (excalidraw → element) packages/element/src/comparisons.ts:66 — ElementOrToolType (context excalidraw) is exposed in element's public surface via comparisons.toolIsArrow — couples the contexts.
  • Cross-context type ElementOrToolType (excalidraw → element) packages/element/src/comparisons.ts:68 — ElementOrToolType (context excalidraw) is exposed in element's public surface via comparisons.canHaveArrowheads — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type FileId (element → excalidraw-app) · ×9
  • Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/FileManager.ts:45 — FileId (context element) is exposed in excalidraw-app's public surface via FileManager.constructor — couples the contexts.
  • Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/FileManager.ts:70 — FileId (context element) is exposed in excalidraw-app's public surface via FileManager.isFileTracked — couples the contexts.
  • Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/FileManager.ts:139 — FileId (context element) is exposed in excalidraw-app's public surface via FileManager.getFiles — couples the contexts.
  • Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/FileManager.ts:228 — FileId (context element) is exposed in excalidraw-app's public surface via FileManager.encodeFilesForUpload — couples the contexts.
  • Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/FileManager.ts:272 — FileId (context element) is exposed in excalidraw-app's public surface via FileManager.updateStaleImageStatuses — couples the contexts.
  • Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/firebase.ts:144 — FileId (context element) is exposed in excalidraw-app's public surface via firebase.saveFilesToFirebase — couples the contexts.
  • Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/firebase.ts:277 — FileId (context element) is exposed in excalidraw-app's public surface via firebase.loadFilesFromFirebase — couples the contexts.
  • Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/fileStatusStore.ts:20 — FileId (context element) is exposed in excalidraw-app's public surface via FileStatusStore.updateStatuses — couples the contexts.
  • Cross-context type FileId (element → excalidraw-app) excalidraw-app/data/fileStatusStore.ts:37 — FileId (context element) is exposed in excalidraw-app's public surface via FileStatusStore.getPendingCount — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type LocalPoint (math → element) · ×9
  • Cross-context type LocalPoint (math → element) packages/element/src/elbowArrow.ts:907 — LocalPoint (context math) is exposed in element's public surface via elbowArrow.updateElbowArrowPoints — couples the contexts.
  • Cross-context type LocalPoint (math → element) packages/element/src/binding.ts:1972 — LocalPoint (context math) is exposed in element's public surface via binding.updateBoundPoint — couples the contexts.
  • Cross-context type LocalPoint (math → element) packages/element/src/linearElementEditor.ts:167 — LocalPoint (context math) is exposed in element's public surface via LinearElementEditor.lastUncommittedPoint — couples the contexts.
  • Cross-context type LocalPoint (math → element) packages/element/src/linearElementEditor.ts:168 — LocalPoint (context math) is exposed in element's public surface via LinearElementEditor.lastCommittedPoint — couples the contexts.
  • Cross-context type LocalPoint (math → element) packages/element/src/linearElementEditor.ts:1338 — LocalPoint (context math) is exposed in element's public surface via LinearElementEditor.getPointGlobalCoordinates — couples the contexts.
  • Cross-context type LocalPoint (math → element) packages/element/src/linearElementEditor.ts:1396 — LocalPoint (context math) is exposed in element's public surface via LinearElementEditor.pointFromAbsoluteCoords — couples the contexts.
  • Cross-context type LocalPoint (math → element) packages/element/src/linearElementEditor.ts:1461 — LocalPoint (context math) is exposed in element's public surface via LinearElementEditor.createPointAt — couples the contexts.
  • Cross-context type LocalPoint (math → element) packages/element/src/linearElementEditor.ts:1620 — LocalPoint (context math) is exposed in element's public surface via LinearElementEditor.addPoints — couples the contexts.
  • Cross-context type LocalPoint (math → element) packages/element/src/visualdebug.ts:224 — LocalPoint (context math) is exposed in element's public surface via visualdebug.debugDrawPoints — couples the contexts.
X1 · Async correctness · `async` Promise executor · ×9
  • `async` Promise executor packages/excalidraw/actions/actionExport.tsx:198 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor REDACTED:10456 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor packages/excalidraw/data/library.ts:269 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor packages/excalidraw/data/library.ts:307 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor packages/excalidraw/data/library.ts:369 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor packages/excalidraw/data/library.ts:554 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor packages/excalidraw/data/library.ts:725 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor packages/excalidraw/data/blob.ts:242 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
  • `async` Promise executor packages/excalidraw/subset/harfbuzz/harfbuzz-loader.ts:25 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
D23 · Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → excalidraw-app) · ×7
  • Cross-context type ExcalidrawElement (element → excalidraw-app) excalidraw-app/data/FileManager.ts:92 — ExcalidrawElement (context element) is exposed in excalidraw-app's public surface via FileManager.saveFiles — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw-app) excalidraw-app/data/FileManager.ts:189 — ExcalidrawElement (context element) is exposed in excalidraw-app's public surface via FileManager.shouldPreventUnload — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw-app) excalidraw-app/data/FileManager.ts:202 — ExcalidrawElement (context element) is exposed in excalidraw-app's public surface via FileManager.shouldUpdateImageElementStatus — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw-app) excalidraw-app/data/FileManager.ts:272 — ExcalidrawElement (context element) is exposed in excalidraw-app's public surface via FileManager.updateStaleImageStatuses — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw-app) excalidraw-app/data/firebase.ts:130 — ExcalidrawElement (context element) is exposed in excalidraw-app's public surface via firebase.isSavedToFirebase — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw-app) excalidraw-app/data/index.ts:248 — ExcalidrawElement (context element) is exposed in excalidraw-app's public surface via index.exportToBackend — couples the contexts.
  • Cross-context type ExcalidrawElement (element → excalidraw-app) excalidraw-app/data/LocalData.ts:144 — ExcalidrawElement (context element) is exposed in excalidraw-app's public surface via LocalData.save — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type GlobalPoint (math → excalidraw) · ×7
  • Cross-context type GlobalPoint (math → excalidraw) packages/excalidraw/components/hyperlink/helpers.ts:161 — GlobalPoint (context math) is exposed in excalidraw's public surface via helpers.isPointHittingLinkIcon — couples the contexts.
  • Cross-context type GlobalPoint (math → excalidraw) packages/excalidraw/components/hyperlink/helpers.ts:182 — GlobalPoint (context math) is exposed in excalidraw's public surface via helpers.isPointHittingLink — couples the contexts.
  • Cross-context type GlobalPoint (math → excalidraw) packages/excalidraw/snapping.ts:130 — GlobalPoint (context math) is exposed in excalidraw's public surface via SnapCache.setReferenceSnapPoints — couples the contexts.
  • Cross-context type GlobalPoint (math → excalidraw) packages/excalidraw/snapping.ts:198 — GlobalPoint (context math) is exposed in excalidraw's public surface via snapping.getElementsCorners — couples the contexts.
  • Cross-context type GlobalPoint (math → excalidraw) packages/excalidraw/lasso/utils.ts:37 — GlobalPoint (context math) is exposed in excalidraw's public surface via utils.getLassoSelectedElementIds — couples the contexts.
  • Cross-context type GlobalPoint (math → excalidraw) packages/excalidraw/drawShapeTrail.ts:62 — GlobalPoint (context math) is exposed in excalidraw's public surface via DrawShapeTrail.getCurrentPoints — couples the contexts.
  • Cross-context type GlobalPoint (math → excalidraw) packages/excalidraw/types.ts:388 — GlobalPoint (context math) is exposed in excalidraw's public surface via AppState.suggestedBinding — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type ExcalidrawFrameLikeElement (element → excalidraw) · ×7
  • Cross-context type ExcalidrawFrameLikeElement (element → excalidraw) packages/excalidraw/renderer/staticScene.ts:189 — ExcalidrawFrameLikeElement (context element) is exposed in excalidraw's public surface via staticScene.frameClip — couples the contexts.
  • Cross-context type ExcalidrawFrameLikeElement (element → excalidraw) packages/excalidraw/data/index.ts:99 — ExcalidrawFrameLikeElement (context element) is exposed in excalidraw's public surface via index.exportCanvas — couples the contexts.
  • Cross-context type ExcalidrawFrameLikeElement (element → excalidraw) packages/excalidraw/actions/actionFrame.ts:148 — ExcalidrawFrameLikeElement (context element) is exposed in excalidraw's public surface via actionFrame.getFrameToUnwrap — couples the contexts.
  • Cross-context type ExcalidrawFrameLikeElement (element → excalidraw) packages/excalidraw/actions/actionFrame.ts:184 — ExcalidrawFrameLikeElement (context element) is exposed in excalidraw's public surface via actionFrame.unwrapFrame — couples the contexts.
  • Cross-context type ExcalidrawFrameLikeElement (element → excalidraw) REDACTED:2781 — ExcalidrawFrameLikeElement (context element) is exposed in excalidraw's public surface via App.onExportImage — couples the contexts.
  • Cross-context type ExcalidrawFrameLikeElement (element → excalidraw) packages/excalidraw/types.ts:408 — ExcalidrawFrameLikeElement (context element) is exposed in excalidraw's public surface via AppState.frameToHighlight — couples the contexts.
  • Cross-context type ExcalidrawFrameLikeElement (element → excalidraw) packages/excalidraw/types.ts:418 — ExcalidrawFrameLikeElement (context element) is exposed in excalidraw's public surface via AppState.editingFrame — couples the contexts.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling · ×7
  • Change coupling: index.ts ↔ types.ts packages/excalidraw/actions/index.ts:1 — `packages/excalidraw/actions/index.ts` and `packages/excalidraw/actions/types.ts` change together 89% of the time (34 of the 38 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 34 shared commits counted here, the most recent 3 are `704db680` feat(editor): `w` to wrap/unwrap selection (#12264); `2d3707b8` feat(editor): add showHints to command palette (#12187); `c09e170b` feat(editor): deselect on esc (#11035) — run `git show` on any of them.
  • Change coupling: AppMainMenu.tsx ↔ AppWelcomeScreen.tsx excalidraw-app/components/AppMainMenu.tsx:1 — `excalidraw-app/components/AppMainMenu.tsx` and `excalidraw-app/components/AppWelcomeScreen.tsx` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `884225b1` fix(app): localize hardcoded "Sign up"/"Sign in" menu labels (#11893); `d1f37cc6` feat: tweak a few icons & add line editor button to side panel (#7990); `f597bd3e` fix: command palette tweaks and fixes (#7876) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ HintViewer.tsx REDACTED:1 — `REDACTED` and `packages/excalidraw/components/HintViewer.tsx` change together 68% of the time (25 of the 37 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 25 shared commits counted here, the most recent 3 are `53973c3a` feat(editor): alt-click to cycle the selection through overlapping el…; `5db42c3d` feat(editor): zen mode polish, hide toolbar hints preference & delaye…; `b2a729c4` feat(editor): dblclick to toggle arrowhead (#11615) — run `git show` on any of them.
  • Change coupling: Avatar.tsx ↔ types.ts packages/excalidraw/components/Avatar.tsx:1 — `packages/excalidraw/components/Avatar.tsx` and `packages/excalidraw/types.ts` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `068895db` feat: expose more collaborator status icons (#7777); `20e3acf7` feat: bump `socket.io-client` & collab tweaks (#7444); `aad8ab01` feat: follow mode (#6848) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ interactiveScene.ts REDACTED:1 — `REDACTED` and `packages/excalidraw/renderer/interactiveScene.ts` change together 51% of the time (72 of the 140 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 72 shared commits counted here, the most recent 3 are `c10499ee` feat(editor): text tool edits what you click, shows what a click will…; `4850bf33` fix(editor): Binding hit test based on distance (#10753); `1acf66ed` feat(editor): bind text to hovered arrow endpoint (#11777) — run `git show` on any of them.
  • Change coupling: LayerUI.tsx ↔ LibraryUnit.tsx packages/excalidraw/components/LayerUI.tsx:1 — `packages/excalidraw/components/LayerUI.tsx` and `packages/excalidraw/components/LibraryUnit.tsx` change together 50% of the time (12 of the 24 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `b1037b34` feat: make device breakpoints more specific (#7243) (at that commit the files were still `src/components/LayerUI.tsx` and `src/components/LibraryUnit.tsx`); `941b2d70` feat: render library into `Sidebar` on mobile (#5774) (at that commit the files were still `src/components/LayerUI.tsx` and `src/components/LibraryUnit.tsx`); `d2cc76e5` feat: support adding multiple library items on canvas (#5116) (at that commit the files were still `src/components/LayerUI.tsx` and `src/components/LibraryUnit.tsx`) — run `git show` on any of them.
  • Change coupling: MobileMenu.tsx ↔ Footer.tsx packages/excalidraw/components/MobileMenu.tsx:1 — `packages/excalidraw/components/MobileMenu.tsx` and `packages/excalidraw/components/footer/Footer.tsx` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `93dd5106` feat(packages/excalidraw): add `props.ui.enabled.zoom/scrollBackToCo…; `2423819e` feat(packages/excalidraw): interaction and UI control (#11605); `c99e8167` fix: mobile view ui issues (#10284) — run `git show` on any of them.
D29 · Static Analysis (SAST) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · ClassTooLong · ×6
  • ClassTooLong: LinearElementEditor packages/element/src/linearElementEditor.ts:143 — ClassTooLong — 1550 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 1150 over it, 3.88× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AppSelectionTool packages/excalidraw/components/App.selectionTool.ts:92 — ClassTooLong — 888 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 488 over it, 2.22× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ElementsDelta packages/element/src/delta.ts:1034 — ClassTooLong — 682 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 282 over it, 1.71× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Collab excalidraw-app/collab/Collab.tsx:140 — ClassTooLong — 594 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 194 over it, 1.49× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AppText packages/excalidraw/components/App.text.ts:83 — ClassTooLong — 514 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 114 over it, 1.29× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: LayerUI packages/excalidraw/components/LayerUI.tsx:1 — ClassTooLong — 457 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 57 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
X2 · Cancellation propagation · Async function without AbortSignal · ×6
  • Async function without AbortSignal: initializeScene REDACTED:217 — `initializeScene` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: importFromBackend excalidraw-app/data/index.ts:202 — `importFromBackend` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: exportToBackend excalidraw-app/data/index.ts:248 — `exportToBackend` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: loadFilesFromFirebase excalidraw-app/data/firebase.ts:277 — `loadFilesFromFirebase` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: importLibraryFromURL packages/excalidraw/data/library.ts:718 — `importLibraryFromURL` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: ImageURLToFile packages/excalidraw/data/blob.ts:424 — `ImageURLToFile` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
D17 · Explicit Debt · HackComment · ×5
  • HackComment excalidraw-app/collab/Collab.tsx:399 — // hack to ensure that we prefer we disregard any new browser state — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment packages/excalidraw/components/App.selectionTool.ts:1249 — // HACK: Disable transform handles for linear elements on mobile until a — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment packages/excalidraw/components/Popover.tsx:98 — // hack for StrictMode so this effect only runs once for — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment packages/excalidraw/hooks/useOutsideClick.ts:70 — // hack you can end up click on radix popups that outside the tree, — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment packages/excalidraw/tests/test-utils.ts:93 — // hack-awaiting app.initialScene() which solves some test race conditions — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D23 · Boundary Type-Coupling · Cross-context type ExcalidrawTextContainer (element → excalidraw) · ×5
  • Cross-context type ExcalidrawTextContainer (element → excalidraw) packages/excalidraw/actions/actionBoundText.tsx:215 — ExcalidrawTextContainer (context element) is exposed in excalidraw's public surface via actionBoundText.bindTextToContainer — couples the contexts.
  • Cross-context type ExcalidrawTextContainer (element → excalidraw) packages/excalidraw/components/ConvertElementTypePopup.tsx:372 — ExcalidrawTextContainer (context element) is exposed in excalidraw's public surface via ConvertElementTypePopup.adjustBoundTextSize — couples the contexts.
  • Cross-context type ExcalidrawTextContainer (element → excalidraw) packages/excalidraw/components/App.text.ts:419 — ExcalidrawTextContainer (context element) is exposed in excalidraw's public surface via AppText.getSelectedTextEditingContainerAtPosition — couples the contexts.
  • Cross-context type ExcalidrawTextContainer (element → excalidraw) packages/excalidraw/components/App.text.ts:615 — ExcalidrawTextContainer (context element) is exposed in excalidraw's public surface via AppText.startTextEditing — couples the contexts.
  • Cross-context type ExcalidrawTextContainer (element → excalidraw) packages/excalidraw/components/App.text.ts:879 — ExcalidrawTextContainer (context element) is exposed in excalidraw's public surface via AppText.getTextWysiwygSnappedToCenterPosition — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type NullableGridSize (excalidraw → element) · ×5
  • Cross-context type NullableGridSize (excalidraw → element) packages/element/src/dragElements.ts:40 — NullableGridSize (context excalidraw) is exposed in element's public surface via dragElements.dragSelectedElements — couples the contexts.
  • Cross-context type NullableGridSize (excalidraw → element) packages/element/src/arrows/focus.ts:211 — NullableGridSize (context excalidraw) is exposed in element's public surface via focus.handleFocusPointDrag — couples the contexts.
  • Cross-context type NullableGridSize (excalidraw → element) packages/element/src/binding.ts:151 — NullableGridSize (context excalidraw) is exposed in element's public surface via binding.bindOrUnbindBindingElement — couples the contexts.
  • Cross-context type NullableGridSize (excalidraw → element) packages/element/src/binding.ts:614 — NullableGridSize (context excalidraw) is exposed in element's public surface via binding.getBindingStrategyForDraggingBindingElementEndpoints — couples the contexts.
  • Cross-context type NullableGridSize (excalidraw → element) packages/element/src/linearElementEditor.ts:1461 — NullableGridSize (context excalidraw) is exposed in element's public surface via LinearElementEditor.createPointAt — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type LineSegment (math → element) · ×5
  • Cross-context type LineSegment (math → element) packages/element/src/utils.ts:64 — LineSegment (context math) is exposed in element's public surface via LinearPathSegment.LinearPathSegment — couples the contexts.
  • Cross-context type LineSegment (math → element) packages/element/src/collision.ts:495 — LineSegment (context math) is exposed in element's public surface via collision.intersectElementWithLineSegment — couples the contexts.
  • Cross-context type LineSegment (math → element) packages/element/src/binding.ts:1617 — LineSegment (context math) is exposed in element's public surface via binding.bindPointToSnapToElementOutline — couples the contexts.
  • Cross-context type LineSegment (math → element) packages/element/src/bounds.ts:299 — LineSegment (context math) is exposed in element's public surface via bounds.getElementLineSegments — couples the contexts.
  • Cross-context type LineSegment (math → element) packages/element/src/visualdebug.ts:111 — LineSegment (context math) is exposed in element's public surface via visualdebug.debugDrawLine — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type Ellipse (math → utils) · ×5
  • Cross-context type Ellipse (math → utils) packages/utils/src/shape.ts:461 — Ellipse (context math) is exposed in utils's public surface via shape.pointOnEllipse — couples the contexts.
  • Cross-context type Ellipse (math → utils) packages/utils/src/shape.ts:469 — Ellipse (context math) is exposed in utils's public surface via shape.pointInEllipse — couples the contexts.
  • Cross-context type Ellipse (math → utils) packages/utils/src/shape.ts:491 — Ellipse (context math) is exposed in utils's public surface via shape.ellipseAxes — couples the contexts.
  • Cross-context type Ellipse (math → utils) packages/utils/src/shape.ts:509 — Ellipse (context math) is exposed in utils's public surface via shape.ellipseFocusToCenter — couples the contexts.
  • Cross-context type Ellipse (math → utils) packages/utils/src/shape.ts:517 — Ellipse (context math) is exposed in utils's public surface via shape.ellipseExtremes — couples the contexts.
AC2 · Forms & labels · <TextField> field component without a label · ×4
  • <TextField> field component without a label packages/excalidraw/components/CommandPalette/CommandPalette.tsx:892 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <TextField> field component without a label packages/excalidraw/components/ElementLinkDialog.tsx:122 — This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <TextField> field component without a label packages/excalidraw/components/LibraryMenuItems.tsx:398 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <TextField> field component without a label packages/excalidraw/components/SearchMenu.tsx:348 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC4 · Keyboard semantics · Modal dialog does not manage focus · ×4
  • Modal dialog does not manage focus packages/excalidraw/components/ColorPicker/ColorPicker.tsx:419 — This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
  • Modal dialog does not manage focus packages/excalidraw/components/ColorPicker/Picker.tsx:152 — This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
  • Modal dialog does not manage focus packages/excalidraw/components/FontPicker/FontPicker.tsx:253 — This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
  • Modal dialog does not manage focus packages/excalidraw/components/Modal.tsx:49 — This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
IC1 · Incompleteness & stubs · Markup wires an event to an empty handler · ×4
  • Markup wires an event to an empty handler packages/excalidraw/actions/actionNavigate.tsx:109 — `onClick` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler packages/excalidraw/components/Actions.tsx:281 — `onClose` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler packages/excalidraw/components/Actions.tsx:393 — `onClose` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler packages/excalidraw/components/Actions.tsx:551 — `onClose` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
D23 · Boundary Type-Coupling · Cross-context type Curve (math → element) · ×3
  • Cross-context type Curve (math → element) packages/element/src/utils.ts:64 — Curve (context math) is exposed in element's public surface via LinearPathSegment.LinearPathSegment — couples the contexts.
  • Cross-context type Curve (math → element) packages/element/src/utils.ts:377 — Curve (context math) is exposed in element's public surface via utils.getDiamondBaseCorners — couples the contexts.
  • Cross-context type Curve (math → element) packages/element/src/visualdebug.ts:97 — Curve (context math) is exposed in element's public surface via visualdebug.debugDrawCubicBezier — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type ElementShape (excalidraw → element) · ×3
  • Cross-context type ElementShape (excalidraw → element) packages/element/src/utils.ts:129 — ElementShape (context excalidraw) is exposed in element's public surface via utils.deconstructLinearOrFreeDrawElement — couples the contexts.
  • Cross-context type ElementShape (excalidraw → element) packages/element/src/utils.ts:245 — ElementShape (context excalidraw) is exposed in element's public surface via utils.deconstructRectanguloidElement — couples the contexts.
  • Cross-context type ElementShape (excalidraw → element) packages/element/src/utils.ts:457 — ElementShape (context excalidraw) is exposed in element's public surface via utils.deconstructDiamondElement — couples the contexts.
D3 · God Classes · TooManyMethods · ×3
  • TooManyMethods: App REDACTED:583 — TooManyMethods — 176 methods. The bar is 30 methods; this is 146 over it, 5.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Collab excalidraw-app/collab/Collab.tsx:140 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: LinearElementEditor packages/element/src/linearElementEditor.ts:143 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
IC1 · Incompleteness & stubs · Both branches are identical · ×3
  • Both branches are identical — the condition decides nothing packages/element/src/binding.ts:453 — Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
  • Both branches are identical — the condition decides nothing packages/element/src/binding.ts:593 — Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
  • Both branches are identical — the condition decides nothing packages/excalidraw/components/ColorPicker/ColorPicker.tsx:472 — The `if` and its `else` contain the same statements, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body.
R10 · Code Duplication · Duplicated block (26 lines × 2 locations) · ×3
  • Duplicated block (26 lines × 2 locations) excalidraw-app/components/DebugCanvas.tsx:473 — excalidraw-app/components/DebugCanvas.tsx:473 · excalidraw-app/components/DebugCanvas.tsx:503 — 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 (26 lines × 2 locations) REDACTED:1221 — REDACTED:1221 · REDACTED:1343 — 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 (26 lines × 2 locations) REDACTED:4074 — REDACTED:4074 · REDACTED:4179 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (22 lines × 2 locations) · ×3
  • Duplicated block (22 lines × 2 locations) packages/element/src/binding.ts:1041 — packages/element/src/binding.ts:1041 · packages/element/src/binding.ts:1067 — 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 (22 lines × 2 locations) packages/excalidraw/actions/actionExport.tsx:303 — packages/excalidraw/actions/actionExport.tsx:303 · packages/excalidraw/actions/actionExport.tsx:355 — 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 (22 lines × 2 locations) packages/excalidraw/components/IconPicker.tsx:125 — packages/excalidraw/components/IconPicker.tsx:125 · packages/excalidraw/components/IconPicker.tsx:150 — 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.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×3
  • Untrusted text written into markup unescaped excalidraw-app/share/QRCode.tsx:53 — `svgData` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped packages/excalidraw/components/PublishLibrary.tsx:151 — `svg.outerHTML` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped packages/excalidraw/hooks/useLibraryItemSvg.ts:74 — `svg.outerHTML` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
AC2 · Forms & labels · <fieldset> without a <legend> · ×2
  • <fieldset> without a <legend> packages/excalidraw/actions/actionProperties.tsx:1698 — A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
  • <fieldset> without a <legend> packages/excalidraw/components/Actions.tsx:182 — A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
AC2 · Forms & labels · <RadioGroup> field component without a label · ×2
  • <RadioGroup> field component without a label packages/excalidraw/components/ImageExportDialog.tsx:294 — This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <RadioGroup> field component without a label packages/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.tsx:37 — This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
D1 · Cyclomatic Complexity · textWysiwyg.textWysiwyg · ×2
  • textWysiwyg.textWysiwyg::onPointerDown (cyclomatic 21) packages/excalidraw/wysiwyg/textWysiwyg.tsx:1168 — textWysiwyg.textWysiwyg::onPointerDown has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 2 other methods here (textWysiwyg.textWysiwyg, textWysiwyg.textWysiwyg::updateWysiwygStyle) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • textWysiwyg.textWysiwyg::updateWysiwygStyle (cyclomatic 19) packages/excalidraw/wysiwyg/textWysiwyg.tsx:337 — textWysiwyg.textWysiwyg::updateWysiwygStyle has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (textWysiwyg.textWysiwyg, textWysiwyg.textWysiwyg::onPointerDown) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · textWysiwyg.textWysiwyg · ×2
  • textWysiwyg.textWysiwyg::updateWysiwygStyle (cognitive 38) packages/excalidraw/wysiwyg/textWysiwyg.tsx:337 — textWysiwyg.textWysiwyg::updateWysiwygStyle has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (33 pts), boolean chains 5 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 2 other methods here (textWysiwyg.textWysiwyg, textWysiwyg.textWysiwyg::onPointerDown) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • textWysiwyg.textWysiwyg::onPointerDown (cognitive 16) packages/excalidraw/wysiwyg/textWysiwyg.tsx:1168 — textWysiwyg.textWysiwyg::onPointerDown has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (6 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 2 other methods here (textWysiwyg.textWysiwyg, textWysiwyg.textWysiwyg::updateWysiwygStyle) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D23 · Boundary Type-Coupling · Cross-context type SocketId (excalidraw → excalidraw-app) · ×2
  • Cross-context type SocketId (excalidraw → excalidraw-app) excalidraw-app/collab/Collab.tsx:886 — SocketId (context excalidraw) is exposed in excalidraw-app's public surface via Collab.setCollaborators — couples the contexts.
  • Cross-context type SocketId (excalidraw → excalidraw-app) excalidraw-app/collab/Collab.tsx:912 — SocketId (context excalidraw) is exposed in excalidraw-app's public surface via Collab.updateCollaborator — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type ToolType (excalidraw → common) · ×2
  • Cross-context type ToolType (excalidraw → common) packages/common/src/utils.ts:293 — ToolType (context excalidraw) is exposed in common's public surface via utils.isSelectionLikeTool — couples the contexts.
  • Cross-context type ToolType (excalidraw → common) packages/common/src/utils.ts:297 — ToolType (context excalidraw) is exposed in common's public surface via utils.updateActiveTool — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type GlobalPoint (math → common) · ×2
  • Cross-context type GlobalPoint (math → common) packages/common/src/points.ts:10 — GlobalPoint (context math) is exposed in common's public surface via points.getSizeFromPoints — couples the contexts.
  • Cross-context type GlobalPoint (math → common) packages/common/src/points.ts:69 — GlobalPoint (context math) is exposed in common's public surface via points.getGridPoint — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type ChartType (element → excalidraw) · ×2
  • Cross-context type ChartType (element → excalidraw) packages/excalidraw/charts/charts.helpers.ts:76 — ChartType (context element) is exposed in excalidraw's public surface via charts.helpers.isSpreadsheetValidForChartType — couples the contexts.
  • Cross-context type ChartType (element → excalidraw) packages/excalidraw/charts/index.ts:26 — ChartType (context element) is exposed in excalidraw's public surface via index.renderSpreadsheet — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type ElementsMapOrArray (element → excalidraw) · ×2
  • Cross-context type ElementsMapOrArray (element → excalidraw) packages/excalidraw/data/restore.ts:956 — ElementsMapOrArray (context element) is exposed in excalidraw's public surface via restore.restoreElements — couples the contexts.
  • Cross-context type ElementsMapOrArray (element → excalidraw) packages/excalidraw/data/restore.ts:1160 — ElementsMapOrArray (context element) is exposed in excalidraw's public surface via restore.bumpElementVersions — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type NormalizedZoomValue (excalidraw → element) · ×2
  • Cross-context type NormalizedZoomValue (excalidraw → element) packages/element/src/dragElements.ts:243 — NormalizedZoomValue (context excalidraw) is exposed in element's public surface via dragElements.dragNewTextElement — couples the contexts.
  • Cross-context type NormalizedZoomValue (excalidraw → element) packages/element/src/dragElements.ts:298 — NormalizedZoomValue (context excalidraw) is exposed in element's public surface via dragElements.dragNewElement — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type PointerType (element → excalidraw) · ×2
  • Cross-context type PointerType (element → excalidraw) packages/excalidraw/components/App.selectionTool.ts:1228 — PointerType (context element) is exposed in excalidraw's public surface via AppSelectionTool.getTransformHandleAt — couples the contexts.
  • Cross-context type PointerType (element → excalidraw) packages/excalidraw/types.ts:508 — PointerType (context element) is exposed in excalidraw's public surface via AppState.lastPointerDownWith — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type Arrowhead (element → excalidraw) · ×2
  • Cross-context type Arrowhead (element → excalidraw) packages/excalidraw/types.ts:464 — Arrowhead (context element) is exposed in excalidraw's public surface via AppState.currentItemStartArrowhead — couples the contexts.
  • Cross-context type Arrowhead (element → excalidraw) packages/excalidraw/types.ts:465 — Arrowhead (context element) is exposed in excalidraw's public surface via AppState.currentItemEndArrowhead — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type Radians (math → utils) · ×2
  • Cross-context type Radians (math → utils) packages/utils/src/shape.ts:214 — Radians (context math) is exposed in utils's public surface via shape.getCurveShape — couples the contexts.
  • Cross-context type Radians (math → utils) packages/utils/src/shape.ts:298 — Radians (context math) is exposed in utils's public surface via shape.getClosedCurveShape — couples the contexts.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
D5 · Coupling · Off the main sequence · ×2
  • Off the main sequence: @excalidraw/fractional-indexing — @excalidraw/fractional-indexing: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: @excalidraw/laser-pointer — @excalidraw/laser-pointer: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: App (LCOM4 7) REDACTED:583 — App's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Renderer (LCOM4 4) packages/excalidraw/scene/Renderer.ts:42 — Renderer's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
IC1 · Incompleteness & stubs · Fake-async · ×2
  • Fake-async — async method never awaits packages/common/src/utils.ts:164 — `nextAnimationFrame` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/excalidraw/workers.ts:98 — `clear` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
R10 · Code Duplication · Duplicated block (38 lines × 2 locations) · ×2
  • Duplicated block (38 lines × 2 locations) packages/element/src/linearElementEditor.ts:2537 — packages/element/src/linearElementEditor.ts:2537 · packages/element/src/linearElementEditor.ts:2577 — 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 (38 lines × 2 locations) packages/element/src/utils.ts:335 — packages/element/src/utils.ts:335 · packages/element/src/utils.ts:467 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (28 lines × 2 locations) · ×2
  • Duplicated block (28 lines × 2 locations) packages/element/src/elbowArrow.ts:762 — packages/element/src/elbowArrow.ts:762 · packages/element/src/elbowArrow.ts:834 — 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 (28 lines × 2 locations) packages/element/src/linearElementEditor.ts:337 — packages/element/src/linearElementEditor.ts:337 · packages/element/src/linearElementEditor.ts:542 — 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 (24 lines × 2 locations) · ×2
  • Duplicated block (24 lines × 2 locations) packages/excalidraw/components/Actions.tsx:597 — packages/excalidraw/components/Actions.tsx:597 · packages/excalidraw/components/Actions.tsx:715 — 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 (24 lines × 2 locations) packages/excalidraw/components/icons.tsx:991 — packages/excalidraw/components/icons.tsx:991 · packages/excalidraw/components/icons.tsx:1023 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Duplicated block (23 lines × 2 locations) · ×2
  • Duplicated block (23 lines × 2 locations) packages/excalidraw/actions/actionCanvas.tsx:155 — packages/excalidraw/actions/actionCanvas.tsx:155 · packages/excalidraw/actions/actionCanvas.tsx:209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (23 lines × 2 locations) packages/excalidraw/actions/actionZindex.tsx:86 — packages/excalidraw/actions/actionZindex.tsx:86 · packages/excalidraw/actions/actionZindex.tsx:123 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block with local edits (22 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (22 matched lines × 2 locations) packages/excalidraw/components/Stats/FontSize.tsx:59 — packages/excalidraw/components/Stats/FontSize.tsx:59 · packages/excalidraw/components/Stats/MultiFontSize.tsx:108 — the two spans are one implementation copied and then locally edited — 91 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (22 matched lines × 2 locations) packages/math/src/ellipse.ts:109 — packages/math/src/ellipse.ts:109 · packages/utils/src/shape.ts:422 — the two spans are one implementation copied and then locally edited — 236 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
AC1 · Text alternatives · <canvas> without a text alternative · ×1
  • <canvas> without a text alternative packages/excalidraw/components/canvases/NewElementCanvas.tsx:49 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC3 · Page structure · Page without a main landmark · ×1
  • Page without a main landmark excalidraw-app/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 205 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · App.onPointerUpFromPointerDownHandler (cyclomatic 133) · ×1
  • App.onPointerUpFromPointerDownHandler (cyclomatic 133) REDACTED:9448 — App.onPointerUpFromPointerDownHandler has cyclomatic complexity 133 (threshold 15). Most of this is not in the body itself: 1 of the 133 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 9451, 10203, 9584). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · App.handleCanvasPointerMove (cyclomatic 94) · ×1
  • App.handleCanvasPointerMove (cyclomatic 94) REDACTED:6848 — App.handleCanvasPointerMove has cyclomatic complexity 94 (threshold 15). Of this number, 90 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · staticSvgScene.renderElementToSvg (cyclomatic 93) · ×1
  • staticSvgScene.renderElementToSvg (cyclomatic 93) REDACTED:97 — staticSvgScene.renderElementToSvg has cyclomatic complexity 93 (threshold 15). Of this number, 83 points are the body's own statements and 10 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · App.ExcalidrawWrapper (cyclomatic 92) · ×1
  • App.ExcalidrawWrapper (cyclomatic 92) REDACTED:375 — App.ExcalidrawWrapper has cyclomatic complexity 92 (threshold 15). Of this number, 18 points are the body's own statements and 74 belong to 26 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · bucketFill.buildFaces (cyclomatic 80) · ×1
  • bucketFill.buildFaces (cyclomatic 80) packages/element/src/bucketFill.ts:717 — bucketFill.buildFaces has cyclomatic complexity 80 (threshold 15). Of this number, 67 points are the body's own statements and 13 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · interactiveScene._renderInteractiveScene (cyclomatic 79) · ×1
  • interactiveScene._renderInteractiveScene (cyclomatic 79) packages/excalidraw/renderer/interactiveScene.ts:1614 — interactiveScene._renderInteractiveScene has cyclomatic complexity 79 (threshold 15). Of this number, 69 points are the body's own statements and 10 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · App.handleCanvasPointerDown (cyclomatic 77) · ×1
  • App.handleCanvasPointerDown (cyclomatic 77) REDACTED:7526 — App.handleCanvasPointerDown has cyclomatic complexity 77 (threshold 15). Of this number, 73 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · transform.convertToExcalidrawElements (cyclomatic 74) · ×1
  • transform.convertToExcalidrawElements (cyclomatic 74) packages/element/src/transform.ts:579 — transform.convertToExcalidrawElements has cyclomatic complexity 74 (threshold 15). Of this number, 71 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · resizeElements.resizeMultipleElements (cyclomatic 73) · ×1
  • resizeElements.resizeMultipleElements (cyclomatic 73) packages/element/src/resizeElements.ts:1234 — resizeElements.resizeMultipleElements has cyclomatic complexity 73 (threshold 15). Of this number, 68 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CommandPalette.CommandPaletteInner (cyclomatic 68) · ×1
  • CommandPalette.CommandPaletteInner (cyclomatic 68) packages/excalidraw/components/CommandPalette/CommandPalette.tsx:200 — CommandPalette.CommandPaletteInner has cyclomatic complexity 68 (threshold 15). Most of this is not in the body itself: 6 of the 68 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 693, a function literal at line 816, a function literal at line 250, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · binding.getBindingStrategyForDraggingBindingElementEndpoints_simple (cyclomatic 66) · ×1
  • binding.getBindingStrategyForDraggingBindingElementEndpoints_simple (cyclomatic 66) packages/element/src/binding.ts:654 — binding.getBindingStrategyForDraggingBindingElementEndpoints_simple has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · linearElementEditor.pointDraggingUpdates (cyclomatic 66) · ×1
  • linearElementEditor.pointDraggingUpdates (cyclomatic 66) packages/element/src/linearElementEditor.ts:2377 — linearElementEditor.pointDraggingUpdates has cyclomatic complexity 66 (threshold 15). Of this number, 64 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · topPicksDnD.useTopPicksDnD (cyclomatic 65) · ×1
  • topPicksDnD.useTopPicksDnD (cyclomatic 65) packages/excalidraw/components/TopPicksDnD/topPicksDnD.tsx:140 — topPicksDnD.useTopPicksDnD has cyclomatic complexity 65 (threshold 15). Most of this is not in the body itself: 1 of the 65 points is its own statement and the rest belongs to 20 function literals inside it that branch (lines 283, 468, 525, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · HintViewer.getHints (cyclomatic 65) · ×1
  • HintViewer.getHints (cyclomatic 65) packages/excalidraw/components/HintViewer.tsx:43 — HintViewer.getHints has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · App.onPointerMoveFromPointerDownHandler (cyclomatic 62) · ×1
  • App.onPointerMoveFromPointerDownHandler (cyclomatic 62) REDACTED:8990 — App.onPointerMoveFromPointerDownHandler has cyclomatic complexity 62 (threshold 15). Most of this is not in the body itself: 1 of the 62 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 8993, 9172). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · export.configExportDimension (cyclomatic 58) · ×1
  • export.configExportDimension (cyclomatic 58) REDACTED:549 — export.configExportDimension has cyclomatic complexity 58 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppText.startTextEditing (cyclomatic 58) · ×1
  • AppText.startTextEditing (cyclomatic 58) packages/excalidraw/components/App.text.ts:615 — AppText.startTextEditing has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · App.render (cyclomatic 54) · ×1
  • App.render (cyclomatic 54) REDACTED:2325 — App.render has cyclomatic complexity 54 (threshold 15). Of this number, 52 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AppSelectionTool.handleSelectionOnPointerDown (cyclomatic 52) · ×1
  • AppSelectionTool.handleSelectionOnPointerDown (cyclomatic 52) packages/excalidraw/components/App.selectionTool.ts:104 — AppSelectionTool.handleSelectionOnPointerDown has cyclomatic complexity 52 (threshold 15). Of this number, 49 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · elbowArrow.handleSegmentMove (cyclomatic 51) · ×1
  • elbowArrow.handleSegmentMove (cyclomatic 51) packages/element/src/elbowArrow.ts:465 — elbowArrow.handleSegmentMove has cyclomatic complexity 51 (threshold 15). Of this number, 45 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · App.handleDelayedBindModeChange (cyclomatic 50) · ×1
  • App.handleDelayedBindModeChange (cyclomatic 50) REDACTED:1269 — App.handleDelayedBindModeChange has cyclomatic complexity 50 (threshold 15). Of this number, 37 points are the body's own statements and 13 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · elbowArrow.estimateSegmentCount (cyclomatic 49) · ×1
  • elbowArrow.estimateSegmentCount (cyclomatic 49) packages/element/src/elbowArrow.ts:1924 — elbowArrow.estimateSegmentCount has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Hyperlink.Hyperlink (cyclomatic 48) · ×1
  • Hyperlink.Hyperlink (cyclomatic 48) packages/excalidraw/components/hyperlink/Hyperlink.tsx:118 — Hyperlink.Hyperlink has cyclomatic complexity 48 (threshold 15). Most of this is not in the body itself: 15 of the 48 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 150, 239, 328, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · elbowArrow.handleEndpointDrag (cyclomatic 48) · ×1
  • elbowArrow.handleEndpointDrag (cyclomatic 48) packages/element/src/elbowArrow.ts:706 — elbowArrow.handleEndpointDrag has cyclomatic complexity 48 (threshold 15). Of this number, 46 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · elbowArrow.generateDynamicAABBs (cyclomatic 48) · ×1
  • elbowArrow.generateDynamicAABBs (cyclomatic 48) packages/element/src/elbowArrow.ts:1666 — elbowArrow.generateDynamicAABBs has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · elbowArrow.updateElbowArrowPoints (cyclomatic 47) · ×1
  • elbowArrow.updateElbowArrowPoints (cyclomatic 47) packages/element/src/elbowArrow.ts:907 — elbowArrow.updateElbowArrowPoints has cyclomatic complexity 47 (threshold 15). Of this number, 44 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · App.componentDidUpdate (cyclomatic 47) · ×1
  • App.componentDidUpdate (cyclomatic 47) REDACTED:4293 — App.componentDidUpdate has cyclomatic complexity 47 (threshold 15). Of this number, 44 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LinearElementEditor.handlePointDragging (cyclomatic 45) · ×1
  • LinearElementEditor.handlePointDragging (cyclomatic 45) packages/element/src/linearElementEditor.ts:471 — LinearElementEditor.handlePointDragging has cyclomatic complexity 45 (threshold 15). Of this number, 43 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SearchMenu.SearchMenu (cyclomatic 45) · ×1
  • SearchMenu.SearchMenu (cyclomatic 45) packages/excalidraw/components/SearchMenu.tsx:83 — SearchMenu.SearchMenu has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 8 of the 45 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 276, a function literal at line 195, a function literal at line 104, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · App.handleCanvasDoubleClick (cyclomatic 45) · ×1
  • App.handleCanvasDoubleClick (cyclomatic 45) REDACTED:6205 — App.handleCanvasDoubleClick has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LibraryMenuItems.LibraryMenuItems (cyclomatic 44) · ×1
  • LibraryMenuItems.LibraryMenuItems (cyclomatic 44) packages/excalidraw/components/LibraryMenuItems.tsx:60 — LibraryMenuItems.LibraryMenuItems has cyclomatic complexity 44 (threshold 15). Of this number, 26 points are the body's own statements and 18 belong to 11 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppSelectionTool.handleSelectionDragOnPointerMove (cyclomatic 43) · ×1
  • AppSelectionTool.handleSelectionDragOnPointerMove (cyclomatic 43) packages/excalidraw/components/App.selectionTool.ts:741 — AppSelectionTool.handleSelectionDragOnPointerMove has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · transform.bindLinearElementToElement (cyclomatic 41) · ×1
  • transform.bindLinearElementToElement (cyclomatic 41) packages/element/src/transform.ts:306 — transform.bindLinearElementToElement has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · resizeElements.resizeSingleElement (cyclomatic 40) · ×1
  • resizeElements.resizeSingleElement (cyclomatic 40) packages/element/src/resizeElements.ts:748 — resizeElements.resizeSingleElement has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · binding.getBindingSideMidPoint (cyclomatic 39) · ×1
  • binding.getBindingSideMidPoint (cyclomatic 39) packages/element/src/binding.ts:2913 — binding.getBindingSideMidPoint has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · restore.restoreElement (cyclomatic 38) · ×1
  • restore.restoreElement (cyclomatic 38) packages/excalidraw/data/restore.ts:537 — restore.restoreElement has cyclomatic complexity 38 (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 · restore.restoreElements (cyclomatic 38) · ×1
  • restore.restoreElements (cyclomatic 38) packages/excalidraw/data/restore.ts:956 — restore.restoreElements has cyclomatic complexity 38 (threshold 15). Of this number, 20 points are the body's own statements and 18 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · bucketFill.computeBucketFillPolygon (cyclomatic 38) · ×1
  • bucketFill.computeBucketFillPolygon (cyclomatic 38) packages/element/src/bucketFill.ts:1470 — bucketFill.computeBucketFillPolygon has cyclomatic complexity 38 (threshold 15). Of this number, 33 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · binding.updateBoundPoint (cyclomatic 38) · ×1
  • binding.updateBoundPoint (cyclomatic 38) packages/element/src/binding.ts:1972 — binding.updateBoundPoint has cyclomatic complexity 38 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · bounds.elementsOverlappingBBox (cyclomatic 38) · ×1
  • bounds.elementsOverlappingBBox (cyclomatic 38) packages/element/src/bounds.ts:1273 — bounds.elementsOverlappingBBox has cyclomatic complexity 38 (threshold 15). Of this number, 32 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · renderElement.drawElementOnCanvas (cyclomatic 38) · ×1
  • renderElement.drawElementOnCanvas (cyclomatic 38) packages/element/src/renderElement.ts:460 — renderElement.drawElementOnCanvas has cyclomatic complexity 38 (threshold 15). Of this number, 18 points are the body's own statements and 20 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · staticScene._renderStaticScene (cyclomatic 37) · ×1
  • staticScene._renderStaticScene (cyclomatic 37) packages/excalidraw/renderer/staticScene.ts:333 — staticScene._renderStaticScene has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 5 of the 37 points are its own statements and the rest belongs to 8 function items inside it that branch (clipElementToFrame, a function literal at line 531, a function literal at line 469, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · MobileToolbar.MobileToolbar (cyclomatic 37) · ×1
  • MobileToolbar.MobileToolbar (cyclomatic 37) packages/excalidraw/components/MobileToolbar.tsx:49 — MobileToolbar.MobileToolbar has cyclomatic complexity 37 (threshold 15). Of this number, 22 points are the body's own statements and 15 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Dimension.handleDimensionChange (cyclomatic 36) · ×1
  • Dimension.handleDimensionChange (cyclomatic 36) packages/excalidraw/components/Stats/Dimension.tsx:45 — Dimension.handleDimensionChange has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LayerUI.LayerUI (cyclomatic 36) · ×1
  • LayerUI.LayerUI (cyclomatic 36) packages/excalidraw/components/LayerUI.tsx:147 — LayerUI.LayerUI has cyclomatic complexity 36 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (LayerUI.LayerUI::renderFixedSideContainer) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · duplicate.duplicateElements (cyclomatic 35) · ×1
  • duplicate.duplicateElements (cyclomatic 35) packages/element/src/duplicate.ts:136 — duplicate.duplicateElements has cyclomatic complexity 35 (threshold 15). Of this number, 22 points are the body's own statements and 13 belong to 8 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.areEqual (cyclomatic 35) · ×1
  • index.areEqual (cyclomatic 35) packages/excalidraw/index.tsx:271 — index.areEqual has cyclomatic complexity 35 (threshold 15). Of this number, 30 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · renderElement.drawElement (cyclomatic 34) · ×1
  • renderElement.drawElement (cyclomatic 34) packages/element/src/renderElement.ts:1068 — renderElement.drawElement has cyclomatic complexity 34 (threshold 15). Of this number, 27 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppClipboard.insertClipboardContent (cyclomatic 34) · ×1
  • AppClipboard.insertClipboardContent (cyclomatic 34) packages/excalidraw/components/App.clipboard.ts:112 — AppClipboard.insertClipboardContent has cyclomatic complexity 34 (threshold 15). Of this number, 31 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MultiDimension.handleDimensionChange (cyclomatic 34) · ×1
  • MultiDimension.handleDimensionChange (cyclomatic 34) packages/excalidraw/components/Stats/MultiDimension.tsx:192 — MultiDimension.handleDimensionChange has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · App.handleLinearElementOnPointerDown (cyclomatic 34) · ×1
  • App.handleLinearElementOnPointerDown (cyclomatic 34) REDACTED:8478 — App.handleLinearElementOnPointerDown has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LaserPointer.getStrokeOutline (cyclomatic 34) · ×1
  • LaserPointer.getStrokeOutline (cyclomatic 34) packages/laser-pointer/src/state.ts:119 — LaserPointer.getStrokeOutline has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · elbowArrow.getElbowArrowData (cyclomatic 33) · ×1
  • elbowArrow.getElbowArrowData (cyclomatic 33) packages/element/src/elbowArrow.ts:1192 — elbowArrow.getElbowArrowData has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppSelectionTool.handleSelectionOnPointerUp (cyclomatic 33) · ×1
  • AppSelectionTool.handleSelectionOnPointerUp (cyclomatic 33) packages/excalidraw/components/App.selectionTool.ts:1299 — AppSelectionTool.handleSelectionOnPointerUp has cyclomatic complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · interactiveScene.renderBindingHighlightForBindableElement_simple (cyclomatic 33) · ×1
  • interactiveScene.renderBindingHighlightForBindableElement_simple (cyclomatic 33) packages/excalidraw/renderer/interactiveScene.ts:258 — interactiveScene.renderBindingHighlightForBindableElement_simple has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FontPickerList.FontPickerList (cyclomatic 32) · ×1
  • FontPickerList.FontPickerList (cyclomatic 32) packages/excalidraw/components/FontPicker/FontPickerList.tsx:106 — FontPickerList.FontPickerList has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 6 of the 32 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 189, a function literal at line 220, FontPickerListItem, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · AppPan.start (cyclomatic 32) · ×1
  • AppPan.start (cyclomatic 32) packages/excalidraw/components/App.pan.ts:101 — AppPan.start has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 14 of the 32 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 223, 148, 242). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · keyboardNavHandlers.colorPickerKeyNavHandler (cyclomatic 31) · ×1
  • keyboardNavHandlers.colorPickerKeyNavHandler (cyclomatic 31) packages/excalidraw/components/ColorPicker/keyboardNavHandlers.ts:138 — keyboardNavHandlers.colorPickerKeyNavHandler has cyclomatic complexity 31 (threshold 15). Of this number, 28 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · binding.bindingStrategyForSimpleArrowEndpointDragging_complex (cyclomatic 31) · ×1
  • binding.bindingStrategyForSimpleArrowEndpointDragging_complex (cyclomatic 31) packages/element/src/binding.ts:487 — binding.bindingStrategyForSimpleArrowEndpointDragging_complex has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppText.handleTextWysiwyg (cyclomatic 31) · ×1
  • AppText.handleTextWysiwyg (cyclomatic 31) packages/excalidraw/components/App.text.ts:168 — AppText.handleTextWysiwyg has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 6 of the 31 points are its own statements and the rest belongs to 4 function items inside it that branch (updateElement, a function literal at line 300, a function literal at line 214, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · binding.bindingStrategyForNewSimpleArrowEndpointDragging (cyclomatic 30) · ×1
  • binding.bindingStrategyForNewSimpleArrowEndpointDragging (cyclomatic 30) packages/element/src/binding.ts:319 — binding.bindingStrategyForNewSimpleArrowEndpointDragging has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · App.renderEmbeddables (cyclomatic 30) · ×1
  • App.renderEmbeddables (cyclomatic 30) REDACTED:1798 — App.renderEmbeddables has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 1814, 1806). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · embeddable.getEmbedLink (cyclomatic 29) · ×1
  • embeddable.getEmbedLink (cyclomatic 29) packages/element/src/embeddable.ts:179 — embeddable.getEmbedLink has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LinearElementEditor.handlePointerDown (cyclomatic 29) · ×1
  • LinearElementEditor.handlePointerDown (cyclomatic 29) packages/element/src/linearElementEditor.ts:1048 — LinearElementEditor.handlePointerDown has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mutateElement.mutateElement (cyclomatic 29) · ×1
  • mutateElement.mutateElement (cyclomatic 29) packages/element/src/mutateElement.ts:40 — mutateElement.mutateElement has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChatMessage.ChatMessage (cyclomatic 29) · ×1
  • ChatMessage.ChatMessage (cyclomatic 29) packages/excalidraw/components/TTDDialog/Chat/ChatMessage.tsx:21 — ChatMessage.ChatMessage has cyclomatic complexity 29 (threshold 15). Of this number, 24 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · App.handleAppOnDrop (cyclomatic 29) · ×1
  • App.handleAppOnDrop (cyclomatic 29) REDACTED:10768 — App.handleAppOnDrop has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConvertElementTypePopup.convertElementTypes (cyclomatic 28) · ×1
  • ConvertElementTypePopup.convertElementTypes (cyclomatic 28) packages/excalidraw/components/ConvertElementTypePopup.tsx:424 — ConvertElementTypePopup.convertElementTypes has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · library.useHandleLibrary (cyclomatic 28) · ×1
  • library.useHandleLibrary (cyclomatic 28) packages/excalidraw/data/library.ts:677 — library.useHandleLibrary has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 710, 944, 718, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · AppStateDelta.filterInvisibleChanges (cyclomatic 28) · ×1
  • AppStateDelta.filterInvisibleChanges (cyclomatic 28) packages/element/src/delta.ts:723 — AppStateDelta.filterInvisibleChanges has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dragElements.dragSelectedElements (cyclomatic 27) · ×1
  • dragElements.dragSelectedElements (cyclomatic 27) packages/element/src/dragElements.ts:40 — dragElements.dragSelectedElements has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 118, 59). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · shape._generateElementShape (cyclomatic 27) · ×1
  • shape._generateElementShape (cyclomatic 27) packages/element/src/shape.ts:770 — shape._generateElementShape has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MermaidToExcalidraw.MermaidToExcalidraw (cyclomatic 27) · ×1
  • MermaidToExcalidraw.MermaidToExcalidraw (cyclomatic 27) packages/excalidraw/components/TTDDialog/MermaidToExcalidraw.tsx:69 — MermaidToExcalidraw.MermaidToExcalidraw has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 173, a function literal at line 104, a function literal at line 152, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · focus.handleFocusPointDrag (cyclomatic 26) · ×1
  • focus.handleFocusPointDrag (cyclomatic 26) packages/element/src/arrows/focus.ts:211 — focus.handleFocusPointDrag has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppWrap.rewrap (cyclomatic 26) · ×1
  • AppWrap.rewrap (cyclomatic 26) packages/excalidraw/components/App.wrap.ts:275 — AppWrap.rewrap has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · interactiveScene.renderLinearPointHandles (cyclomatic 26) · ×1
  • interactiveScene.renderLinearPointHandles (cyclomatic 26) packages/excalidraw/renderer/interactiveScene.ts:1056 — interactiveScene.renderLinearPointHandles has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 5 of the 26 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1081, 1158, 1163, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · App.handleIframeLikeCenterClick (cyclomatic 26) · ×1
  • App.handleIframeLikeCenterClick (cyclomatic 26) REDACTED:1550 — App.handleIframeLikeCenterClick has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · App.handleInteractionStateChange (cyclomatic 26) · ×1
  • App.handleInteractionStateChange (cyclomatic 26) REDACTED:3384 — App.handleInteractionStateChange has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · duplicate.reconcileDuplicatedElements (cyclomatic 25) · ×1
  • duplicate.reconcileDuplicatedElements (cyclomatic 25) packages/element/src/duplicate.ts:505 — duplicate.reconcileDuplicatedElements has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DragInput.StatsDragInput (cyclomatic 25) · ×1
  • DragInput.StatsDragInput (cyclomatic 25) packages/excalidraw/components/Stats/DragInput.tsx:73 — DragInput.StatsDragInput has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to 7 function items inside it that branch (handleInputValue, a function literal at line 270, a function literal at line 240, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Toolbar.ExtraToolsDropdown (cyclomatic 25) · ×1
  • Toolbar.ExtraToolsDropdown (cyclomatic 25) packages/excalidraw/components/Toolbar.tsx:54 — Toolbar.ExtraToolsDropdown has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LayerUI.LayerUI · ×1
  • LayerUI.LayerUI::renderFixedSideContainer (cyclomatic 25) packages/excalidraw/components/LayerUI.tsx:301 — LayerUI.LayerUI::renderFixedSideContainer has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (LayerUI.LayerUI) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · charts.parse.tryParseCells (cyclomatic 24) · ×1
  • charts.parse.tryParseCells (cyclomatic 24) packages/excalidraw/charts/charts.parse.ts:21 — charts.parse.tryParseCells has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ElementsDelta.applyTo (cyclomatic 24) · ×1
  • ElementsDelta.applyTo (cyclomatic 24) packages/element/src/delta.ts:1390 — ElementsDelta.applyTo has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · binding.updateBoundElements (cyclomatic 24) · ×1
  • binding.updateBoundElements (cyclomatic 24) packages/element/src/binding.ts:1321 — binding.updateBoundElements has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to 2 function items inside it that branch (visitor, a function literal at line 1383). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · AppSelectionTool.maybeHandleResize (cyclomatic 24) · ×1
  • AppSelectionTool.maybeHandleResize (cyclomatic 24) packages/excalidraw/components/App.selectionTool.ts:563 — AppSelectionTool.maybeHandleResize has cyclomatic complexity 24 (threshold 15). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · App.initializeScene (cyclomatic 24) · ×1
  • App.initializeScene (cyclomatic 24) REDACTED:3568 — App.initializeScene has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · charts.helpers.getCartesianAxisLabelSpec (cyclomatic 23) · ×1
  • charts.helpers.getCartesianAxisLabelSpec (cyclomatic 23) packages/excalidraw/charts/charts.helpers.ts:608 — charts.helpers.getCartesianAxisLabelSpec has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · App.selection.getSelectionStateAddingElements (cyclomatic 23) · ×1
  • App.selection.getSelectionStateAddingElements (cyclomatic 23) packages/excalidraw/components/App.selection.ts:348 — App.selection.getSelectionStateAddingElements has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · focus.focusPointUpdate (cyclomatic 23) · ×1
  • focus.focusPointUpdate (cyclomatic 23) packages/element/src/arrows/focus.ts:103 — focus.focusPointUpdate has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · shape.getArrowheadShapes (cyclomatic 23) · ×1
  • shape.getArrowheadShapes (cyclomatic 23) packages/element/src/shape.ts:371 — shape.getArrowheadShapes has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · App.setActiveTool (cyclomatic 23) · ×1
  • App.setActiveTool (cyclomatic 23) REDACTED:5751 — App.setActiveTool has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · App.handleHoverSelectedLinearElement (cyclomatic 23) · ×1
  • App.handleHoverSelectedLinearElement (cyclomatic 23) REDACTED:7397 — App.handleHoverSelectedLinearElement has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · colorTargets.resolveColorTarget (cyclomatic 22) · ×1
  • colorTargets.resolveColorTarget (cyclomatic 22) packages/excalidraw/actions/colorTargets.ts:103 — colorTargets.resolveColorTarget has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ConvertElementTypePopup.convertLineToElbow (cyclomatic 22) · ×1
  • ConvertElementTypePopup.convertLineToElbow (cyclomatic 22) packages/excalidraw/components/ConvertElementTypePopup.tsx:719 — ConvertElementTypePopup.convertLineToElbow has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Actions.SelectedShapeActions (cyclomatic 22) · ×1
  • Actions.SelectedShapeActions (cyclomatic 22) packages/excalidraw/components/Actions.tsx:129 — Actions.SelectedShapeActions has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · heading.headingForPointFromDiamondElement (cyclomatic 22) · ×1
  • heading.headingForPointFromDiamondElement (cyclomatic 22) packages/element/src/heading.ts:69 — heading.headingForPointFromDiamondElement has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · bucketFill.computeBucketFillPolygon.collectSegments (cyclomatic 22) · ×1
  • bucketFill.computeBucketFillPolygon.collectSegments (cyclomatic 22) packages/element/src/bucketFill.ts:1492 — bucketFill.computeBucketFillPolygon.collectSegments has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (collect, a function literal at line 1502, a function literal at line 1511, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · elbowArrow.handleSegmentRelease (cyclomatic 22) · ×1
  • elbowArrow.handleSegmentRelease (cyclomatic 22) packages/element/src/elbowArrow.ts:282 — elbowArrow.handleSegmentRelease has cyclomatic complexity 22 (threshold 15). Of this number, 13 points are the body's own statements and 9 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · bounds.getArrowheadPoints (cyclomatic 22) · ×1
  • bounds.getArrowheadPoints (cyclomatic 22) packages/element/src/bounds.ts:746 — bounds.getArrowheadPoints has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · snapping.getGapSnaps (cyclomatic 22) · ×1
  • snapping.getGapSnaps (cyclomatic 22) packages/excalidraw/snapping.ts:446 — snapping.getGapSnaps has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TTDDialogOutput.TTDDialogOutput (cyclomatic 22) · ×1
  • TTDDialogOutput.TTDDialogOutput (cyclomatic 22) packages/excalidraw/components/TTDDialog/TTDDialogOutput.tsx:30 — TTDDialogOutput.TTDDialogOutput has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useTextGeneration.useTextGeneration.onGenerate (cyclomatic 22) · ×1
  • useTextGeneration.useTextGeneration.onGenerate (cyclomatic 22) packages/excalidraw/components/TTDDialog/hooks/useTextGeneration.ts:132 — useTextGeneration.useTextGeneration.onGenerate has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Position.handlePositionChange (cyclomatic 22) · ×1
  • Position.handlePositionChange (cyclomatic 22) packages/excalidraw/components/Stats/Position.tsx:30 — Position.handlePositionChange has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · interactiveScene.renderBindingHighlightForBindableElement_complex (cyclomatic 22) · ×1
  • interactiveScene.renderBindingHighlightForBindableElement_complex (cyclomatic 22) packages/excalidraw/renderer/interactiveScene.ts:525 — interactiveScene.renderBindingHighlightForBindableElement_complex has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TTDStreamFetch.TTDStreamFetch (cyclomatic 22) · ×1
  • TTDStreamFetch.TTDStreamFetch (cyclomatic 22) packages/excalidraw/components/TTDDialog/utils/TTDStreamFetch.ts:84 — TTDStreamFetch.TTDStreamFetch has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · App.initializeScene (cyclomatic 21) · ×1
  • App.initializeScene (cyclomatic 21) REDACTED:217 — App.initializeScene has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IconButton.IconButton (cyclomatic 21) · ×1
  • IconButton.IconButton (cyclomatic 21) packages/excalidraw/components/IconButton.tsx:64 — IconButton.IconButton has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ColorPicker.ColorPickerComponent (cyclomatic 21) · ×1
  • ColorPicker.ColorPickerComponent (cyclomatic 21) packages/excalidraw/components/ColorPicker/ColorPicker.tsx:350 — ColorPicker.ColorPickerComponent has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · IconPicker.Picker · ×1
  • IconPicker.Picker::handleKeyDown (cyclomatic 21) packages/excalidraw/components/IconPicker.tsx:91 — IconPicker.Picker::handleKeyDown has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LibraryUnit.LibraryUnit (cyclomatic 21) · ×1
  • LibraryUnit.LibraryUnit (cyclomatic 21) packages/excalidraw/components/LibraryUnit.tsx:17 — LibraryUnit.LibraryUnit has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · shapeActionPredicates.getShapeActionPredicates (cyclomatic 21) · ×1
  • shapeActionPredicates.getShapeActionPredicates (cyclomatic 21) packages/excalidraw/components/shapeActionPredicates.ts:88 — shapeActionPredicates.getShapeActionPredicates has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · utils.projectFixedPointOntoDiagonal (cyclomatic 21) · ×1
  • utils.projectFixedPointOntoDiagonal (cyclomatic 21) packages/element/src/utils.ts:810 — utils.projectFixedPointOntoDiagonal has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · collision.hitElementItself (cyclomatic 21) · ×1
  • collision.hitElementItself (cyclomatic 21) packages/element/src/collision.ts:137 — collision.hitElementItself has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · LinearElementEditor.handlePointerMove (cyclomatic 21) · ×1
  • LinearElementEditor.handlePointerMove (cyclomatic 21) packages/element/src/linearElementEditor.ts:311 — LinearElementEditor.handlePointerMove has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · textWysiwyg.textWysiwyg (cyclomatic 21) · ×1
  • textWysiwyg.textWysiwyg (cyclomatic 21) packages/excalidraw/wysiwyg/textWysiwyg.tsx:250 — textWysiwyg.textWysiwyg has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (textWysiwyg.textWysiwyg::updateWysiwygStyle, textWysiwyg.textWysiwyg::onPointerDown) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · FileDropOverlay.FileDropOverlay (cyclomatic 21) · ×1
  • FileDropOverlay.FileDropOverlay (cyclomatic 21) packages/excalidraw/components/FileDropOverlay.tsx:21 — FileDropOverlay.FileDropOverlay has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 40, 59, 71, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useMermaidRenderer.useMermaidRenderer (cyclomatic 21) · ×1
  • useMermaidRenderer.useMermaidRenderer (cyclomatic 21) packages/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.ts:28 — useMermaidRenderer.useMermaidRenderer has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 65, 105, 164, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Collab.startCollaboration (cyclomatic 20) · ×1
  • Collab.startCollaboration (cyclomatic 20) excalidraw-app/collab/Collab.tsx:492 — Collab.startCollaboration has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 591, 563, 698). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · editorInterface.isMobileOrTablet (cyclomatic 20) · ×1
  • editorInterface.isMobileOrTablet (cyclomatic 20) packages/common/src/editorInterface.ts:89 — editorInterface.isMobileOrTablet has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · restore.restoreElementWithProperties (cyclomatic 20) · ×1
  • restore.restoreElementWithProperties (cyclomatic 20) packages/excalidraw/data/restore.ts:450 — restore.restoreElementWithProperties has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ColorPicker.ColorPickerPopupContent (cyclomatic 20) · ×1
  • ColorPicker.ColorPickerPopupContent (cyclomatic 20) packages/excalidraw/components/ColorPicker/ColorPicker.tsx:72 — ColorPicker.ColorPickerPopupContent has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 136, 217, 203, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ConvertElementTypePopup.Panel (cyclomatic 20) · ×1
  • ConvertElementTypePopup.Panel (cyclomatic 20) packages/excalidraw/components/ConvertElementTypePopup.tsx:196 — ConvertElementTypePopup.Panel has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 333, 285, 233, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · transformHandles.getTransformHandles (cyclomatic 20) · ×1
  • transformHandles.getTransformHandles (cyclomatic 20) packages/element/src/transformHandles.ts:272 — transformHandles.getTransformHandles has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fractionalIndex.getInvalidIndicesGroups (cyclomatic 20) · ×1
  • fractionalIndex.getInvalidIndicesGroups (cyclomatic 20) packages/element/src/fractionalIndex.ts:296 — fractionalIndex.getInvalidIndicesGroups has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 2 function items inside it that branch (getUpperBound, getLowerBound). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · frame.isElementInFrame (cyclomatic 20) · ×1
  • frame.isElementInFrame (cyclomatic 20) packages/element/src/frame.ts:843 — frame.isElementInFrame has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · elbowArrow.routeElbowArrow (cyclomatic 20) · ×1
  • elbowArrow.routeElbowArrow (cyclomatic 20) packages/element/src/elbowArrow.ts:1437 — elbowArrow.routeElbowArrow has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · zindex.shiftElementsToEnd (cyclomatic 20) · ×1
  • zindex.shiftElementsToEnd (cyclomatic 20) packages/element/src/zindex.ts:431 — zindex.shiftElementsToEnd has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · stickyNote.relayoutStickyNotes (cyclomatic 20) · ×1
  • stickyNote.relayoutStickyNotes (cyclomatic 20) packages/element/src/stickyNote.ts:926 — stickyNote.relayoutStickyNotes has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · binding.bindPointToSnapToElementOutline (cyclomatic 20) · ×1
  • binding.bindPointToSnapToElementOutline (cyclomatic 20) packages/element/src/binding.ts:1617 — binding.bindPointToSnapToElementOutline has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EraserTrail.updateElementsToBeErased (cyclomatic 20) · ×1
  • EraserTrail.updateElementsToBeErased (cyclomatic 20) packages/excalidraw/eraser/index.ts:84 — EraserTrail.updateElementsToBeErased has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Popover.Popover (cyclomatic 20) · ×1
  • Popover.Popover (cyclomatic 20) packages/excalidraw/components/Popover.tsx:25 — Popover.Popover has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 93, 52, 37, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · MobileMenu.MobileMenu (cyclomatic 20) · ×1
  • MobileMenu.MobileMenu (cyclomatic 20) packages/excalidraw/components/MobileMenu.tsx:47 — MobileMenu.MobileMenu has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ChatInterface.ChatInterface (cyclomatic 20) · ×1
  • ChatInterface.ChatInterface (cyclomatic 20) packages/excalidraw/components/TTDDialog/Chat/ChatInterface.tsx:17 — ChatInterface.ChatInterface has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · App.renderFrameNames (cyclomatic 20) · ×1
  • App.renderFrameNames (cyclomatic 20) REDACTED:2141 — App.renderFrameNames has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 2162, 2222). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · actionDeleteSelected.deleteSelectedElements.elements (cyclomatic 19) · ×1
  • actionDeleteSelected.deleteSelectedElements.elements (cyclomatic 19) packages/excalidraw/actions/actionDeleteSelected.tsx:81 — actionDeleteSelected.deleteSelectedElements.elements has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · clients.renderRemoteCursors (cyclomatic 19) · ×1
  • clients.renderRemoteCursors (cyclomatic 19) packages/excalidraw/clients.ts:56 — clients.renderRemoteCursors has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · elbowArrow.astar (cyclomatic 19) · ×1
  • elbowArrow.astar (cyclomatic 19) packages/element/src/elbowArrow.ts:1535 — elbowArrow.astar has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · snapping.snapResizingElements (cyclomatic 19) · ×1
  • snapping.snapResizingElements (cyclomatic 19) packages/excalidraw/snapping.ts:1108 — snapping.snapResizingElements 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 · AppClipboard.addTextFromPaste (cyclomatic 19) · ×1
  • AppClipboard.addTextFromPaste (cyclomatic 19) packages/excalidraw/components/App.clipboard.ts:427 — AppClipboard.addTextFromPaste has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppCursor.applyForTool (cyclomatic 19) · ×1
  • AppCursor.applyForTool (cyclomatic 19) packages/excalidraw/components/App.cursor.ts:95 — AppCursor.applyForTool has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TextToDiagram.TextToDiagramContent (cyclomatic 19) · ×1
  • TextToDiagram.TextToDiagramContent (cyclomatic 19) packages/excalidraw/components/TTDDialog/TextToDiagram.tsx:36 — TextToDiagram.TextToDiagramContent has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (handleInsertMessage, handleAiRepairClick, handleRetry, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index.StatsInner (cyclomatic 19) · ×1
  • index.StatsInner (cyclomatic 19) packages/excalidraw/components/Stats/index.tsx:116 — index.StatsInner has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ElementLinkDialog.ElementLinkDialog (cyclomatic 19) · ×1
  • ElementLinkDialog.ElementLinkDialog (cyclomatic 19) packages/excalidraw/components/ElementLinkDialog.tsx:25 — ElementLinkDialog.ElementLinkDialog has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 70, 91, 44, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · AI.AIComponents (cyclomatic 18) · ×1
  • AI.AIComponents (cyclomatic 18) excalidraw-app/components/AI.tsx:19 — AI.AIComponents has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 27). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · restore.repairBinding (cyclomatic 18) · ×1
  • restore.repairBinding (cyclomatic 18) packages/excalidraw/data/restore.ts:318 — restore.repairBinding has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · restore.restoreAppState (cyclomatic 18) · ×1
  • restore.restoreAppState (cyclomatic 18) packages/excalidraw/data/restore.ts:1264 — restore.restoreAppState has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Picker.Picker (cyclomatic 18) · ×1
  • Picker.Picker (cyclomatic 18) packages/excalidraw/components/ColorPicker/Picker.tsx:53 — Picker.Picker has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 97, 80, 128, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.exportCanvas (cyclomatic 18) · ×1
  • index.exportCanvas (cyclomatic 18) packages/excalidraw/data/index.ts:99 — index.exportCanvas has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LibraryMenuHeaderContent.LibraryDropdownMenuButton (cyclomatic 18) · ×1
  • LibraryMenuHeaderContent.LibraryDropdownMenuButton (cyclomatic 18) packages/excalidraw/components/LibraryMenuHeaderContent.tsx:47 — LibraryMenuHeaderContent.LibraryDropdownMenuButton has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 6 function items inside it that branch (renderLibraryMenu, renderRemoveLibAlert, onLibraryImport, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · elbowArrow.handleSegmentRenormalization (cyclomatic 18) · ×1
  • elbowArrow.handleSegmentRenormalization (cyclomatic 18) packages/element/src/elbowArrow.ts:113 — elbowArrow.handleSegmentRenormalization has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 180, 126, 168, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · zindex.getTargetIndex (cyclomatic 18) · ×1
  • zindex.getTargetIndex (cyclomatic 18) packages/element/src/zindex.ts:193 — zindex.getTargetIndex has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppDuplicate.duplicateDraggedSelection (cyclomatic 18) · ×1
  • AppDuplicate.duplicateDraggedSelection (cyclomatic 18) packages/excalidraw/components/App.duplicate.ts:354 — AppDuplicate.duplicateDraggedSelection has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 451, 408, 516, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · AppViewport.getOffsets (cyclomatic 18) · ×1
  • AppViewport.getOffsets (cyclomatic 18) packages/excalidraw/components/App.viewport.ts:629 — AppViewport.getOffsets has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · staticScene.strokeGrid (cyclomatic 17) · ×1
  • staticScene.strokeGrid (cyclomatic 17) packages/excalidraw/renderer/staticScene.ts:92 — staticScene.strokeGrid has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Actions.CombinedShapeProperties (cyclomatic 17) · ×1
  • Actions.CombinedShapeProperties (cyclomatic 17) packages/excalidraw/components/Actions.tsx:219 — Actions.CombinedShapeProperties has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · frame.getElementsInResizingFrame (cyclomatic 17) · ×1
  • frame.getElementsInResizingFrame (cyclomatic 17) packages/element/src/frame.ts:309 — frame.getElementsInResizingFrame has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dragElements.dragNewElement (cyclomatic 17) · ×1
  • dragElements.dragNewElement (cyclomatic 17) packages/element/src/dragElements.ts:298 — dragElements.dragNewElement has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · textElement.handleBindTextResize (cyclomatic 17) · ×1
  • textElement.handleBindTextResize (cyclomatic 17) packages/element/src/textElement.ts:164 — textElement.handleBindTextResize has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · utils.getSnappedMidpointForElbowArrow (cyclomatic 17) · ×1
  • utils.getSnappedMidpointForElbowArrow (cyclomatic 17) packages/element/src/utils.ts:640 — utils.getSnappedMidpointForElbowArrow has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LinearElementEditor.handlePointerUp (cyclomatic 17) · ×1
  • LinearElementEditor.handlePointerUp (cyclomatic 17) packages/element/src/linearElementEditor.ts:719 — LinearElementEditor.handlePointerUp has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · bounds.getElementLineSegments (cyclomatic 17) · ×1
  • bounds.getElementLineSegments (cyclomatic 17) packages/element/src/bounds.ts:299 — bounds.getElementLineSegments has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · shape.generateRoughOptions (cyclomatic 17) · ×1
  • shape.generateRoughOptions (cyclomatic 17) packages/element/src/shape.ts:195 — shape.generateRoughOptions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppBucketFill.fill (cyclomatic 17) · ×1
  • AppBucketFill.fill (cyclomatic 17) packages/excalidraw/components/App.bucketFill.ts:155 — AppBucketFill.fill has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppSelectionTool.handleBoxSelectionOnPointerMove (cyclomatic 17) · ×1
  • AppSelectionTool.handleBoxSelectionOnPointerMove (cyclomatic 17) packages/excalidraw/components/App.selectionTool.ts:1020 — AppSelectionTool.handleBoxSelectionOnPointerMove has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 1073). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · App.onWindowMessage (cyclomatic 17) · ×1
  • App.onWindowMessage (cyclomatic 17) REDACTED:1098 — App.onWindowMessage has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · woff2-esbuild-plugins.woff2ServerPlugin.setup (cyclomatic 17) · ×1
  • woff2-esbuild-plugins.woff2ServerPlugin.setup (cyclomatic 17) REDACTED:23 — woff2-esbuild-plugins.woff2ServerPlugin.setup has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 95, 37, 151, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · DebugCanvas.renderBindings (cyclomatic 16) · ×1
  • DebugCanvas.renderBindings (cyclomatic 16) excalidraw-app/components/DebugCanvas.tsx:211 — DebugCanvas.renderBindings has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 218, 265). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · export.exportToSvg (cyclomatic 16) · ×1
  • export.exportToSvg (cyclomatic 16) REDACTED:962 — export.exportToSvg has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · clipboard.readSystemClipboard (cyclomatic 16) · ×1
  • clipboard.readSystemClipboard (cyclomatic 16) packages/excalidraw/clipboard.ts:257 — clipboard.readSystemClipboard has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UserList.UserList (cyclomatic 16) · ×1
  • UserList.UserList (cyclomatic 16) packages/excalidraw/components/UserList.tsx:122 — UserList.UserList has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · fractionalIndex.validateFractionalIndices (cyclomatic 16) · ×1
  • fractionalIndex.validateFractionalIndices (cyclomatic 16) packages/element/src/fractionalIndex.ts:49 — fractionalIndex.validateFractionalIndices has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · frame.addElementsToFrame (cyclomatic 16) · ×1
  • frame.addElementsToFrame (cyclomatic 16) packages/element/src/frame.ts:570 — frame.addElementsToFrame has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · duplicate._deepCopyElement (cyclomatic 16) · ×1
  • duplicate._deepCopyElement (cyclomatic 16) packages/element/src/duplicate.ts:627 — duplicate._deepCopyElement has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · flowchart.placeCluster (cyclomatic 16) · ×1
  • flowchart.placeCluster (cyclomatic 16) packages/element/src/flowchart.ts:161 — flowchart.placeCluster has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · textElement.redrawTextBoundingBox (cyclomatic 16) · ×1
  • textElement.redrawTextBoundingBox (cyclomatic 16) packages/element/src/textElement.ts:54 — textElement.redrawTextBoundingBox has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · stickyNote.getStickyNoteResizeIntent (cyclomatic 16) · ×1
  • stickyNote.getStickyNoteResizeIntent (cyclomatic 16) packages/element/src/stickyNote.ts:790 — stickyNote.getStickyNoteResizeIntent has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.eraserTest (cyclomatic 16) · ×1
  • index.eraserTest (cyclomatic 16) packages/excalidraw/eraser/index.ts:196 — index.eraserTest has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AppFlowchart.resolveKeyboardEventToOperation (cyclomatic 16) · ×1
  • AppFlowchart.resolveKeyboardEventToOperation (cyclomatic 16) packages/excalidraw/components/App.flowchart.ts:97 — AppFlowchart.resolveKeyboardEventToOperation has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · App.viewport.resolveViewportTarget (cyclomatic 16) · ×1
  • App.viewport.resolveViewportTarget (cyclomatic 16) packages/excalidraw/components/App.viewport.ts:119 — App.viewport.resolveViewportTarget has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.generateKeyBetween (cyclomatic 16) · ×1
  • index.generateKeyBetween (cyclomatic 16) packages/fractional-indexing/src/index.ts:212 — index.generateKeyBetween 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.
D12 · Dependency Hygiene · Deprecated · ×1
  • Deprecated: @types/socket.io-client REDACTED:19 — @types/socket.io-client 3.0.0, declared in REDACTED, is marked deprecated by its publisher: "This is a stub types definition. socket.io-client provides its own type definitions, so you do not need this installed.". Replace it with the package or version that message names, or record why this one must stay.
D2 · Cognitive Complexity · bucketFill.buildFaces (cognitive 191) · ×1
  • bucketFill.buildFaces (cognitive 191) packages/element/src/bucketFill.ts:717 — bucketFill.buildFaces has cognitive complexity 191 (threshold 15). Drivers by points: if/else 46 (122 pts), loops 25 (58 pts), boolean chains 10, ternaries 1 (nesting depth added 109). Of this number, 170 points are the body's own statements and 21 belong to 6 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · App.onPointerUpFromPointerDownHandler (cognitive 161) · ×1
  • App.onPointerUpFromPointerDownHandler (cognitive 161) REDACTED:9448 — App.onPointerUpFromPointerDownHandler has cognitive complexity 161 (threshold 15). Drivers by points: if/else 69 (109 pts), boolean chains 38, ternaries 5 (12 pts), loops 1 (2 pts) (nesting depth added 48). None of this is in the body itself: all 161 points belong to 3 function literals inside it that branch (lines 9451, 10203, 9584). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · staticSvgScene.renderElementToSvg (cognitive 155) · ×1
  • staticSvgScene.renderElementToSvg (cognitive 155) REDACTED:97 — staticSvgScene.renderElementToSvg has cognitive complexity 155 (threshold 15). Drivers by points: if/else 39 (83 pts), boolean chains 34, ternaries 7 (25 pts), loops 4 (12 pts), match/switch 1 (nesting depth added 70). Of this number, 141 points are the body's own statements and 14 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resizeElements.resizeMultipleElements (cognitive 136) · ×1
  • resizeElements.resizeMultipleElements (cognitive 136) packages/element/src/resizeElements.ts:1234 — resizeElements.resizeMultipleElements has cognitive complexity 136 (threshold 15). Drivers by points: if/else 38 (93 pts), ternaries 8 (20 pts), boolean chains 19, loops 2 (4 pts) (nesting depth added 69). Of this number, 129 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AppSelectionTool.handleSelectionOnPointerDown (cognitive 128) · ×1
  • AppSelectionTool.handleSelectionOnPointerDown (cognitive 128) packages/excalidraw/components/App.selectionTool.ts:104 — AppSelectionTool.handleSelectionOnPointerDown has cognitive complexity 128 (threshold 15). Drivers by points: if/else 32 (105 pts), boolean chains 15, ternaries 2 (8 pts) (nesting depth added 79). Of this number, 119 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · App.handleCanvasPointerMove (cognitive 127) · ×1
  • App.handleCanvasPointerMove (cognitive 127) REDACTED:6848 — App.handleCanvasPointerMove has cognitive complexity 127 (threshold 15). Drivers by points: if/else 55 (92 pts), boolean chains 28, ternaries 3 (7 pts) (nesting depth added 41). Of this number, 120 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · interactiveScene._renderInteractiveScene (cognitive 124) · ×1
  • interactiveScene._renderInteractiveScene (cognitive 124) packages/excalidraw/renderer/interactiveScene.ts:1614 — interactiveScene._renderInteractiveScene has cognitive complexity 124 (threshold 15). Drivers by points: if/else 37 (72 pts), boolean chains 24, ternaries 6 (20 pts), loops 2 (6 pts), error handling 1 (2 pts) (nesting depth added 54). Of this number, 110 points are the body's own statements and 14 belong to 5 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · App.ExcalidrawWrapper (cognitive 122) · ×1
  • App.ExcalidrawWrapper (cognitive 122) REDACTED:375 — App.ExcalidrawWrapper has cognitive complexity 122 (threshold 15). Drivers by points: if/else 51 (84 pts), boolean chains 30, ternaries 4, error handling 2 (3 pts), loops 1 (nesting depth added 34). Most of this is not in the body itself: 14 of the 122 points are its own statements and the rest belongs to 26 function items inside it that branch (a function literal at line 479, a function literal at line 597, onExportToBackend, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · MultiDimension.handleDimensionChange (cognitive 118) · ×1
  • MultiDimension.handleDimensionChange (cognitive 118) packages/excalidraw/components/Stats/MultiDimension.tsx:192 — MultiDimension.handleDimensionChange has cognitive complexity 118 (threshold 15). Drivers by points: if/else 27 (84 pts), ternaries 8 (29 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 79). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · transform.convertToExcalidrawElements (cognitive 114) · ×1
  • transform.convertToExcalidrawElements (cognitive 114) packages/element/src/transform.ts:579 — transform.convertToExcalidrawElements has cognitive complexity 114 (threshold 15). Drivers by points: if/else 20 (61 pts), boolean chains 26, ternaries 4 (16 pts), match/switch 3 (8 pts), loops 3 (nesting depth added 58). Of this number, 108 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CommandPalette.CommandPaletteInner (cognitive 94) · ×1
  • CommandPalette.CommandPaletteInner (cognitive 94) packages/excalidraw/components/CommandPalette/CommandPalette.tsx:200 — CommandPalette.CommandPaletteInner has cognitive complexity 94 (threshold 15). Drivers by points: if/else 33 (57 pts), boolean chains 18, ternaries 11 (18 pts), loops 1 (nesting depth added 31). Most of this is not in the body itself: 5 of the 94 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 693, a function literal at line 816, a function literal at line 250, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · App.onPointerMoveFromPointerDownHandler (cognitive 92) · ×1
  • App.onPointerMoveFromPointerDownHandler (cognitive 92) REDACTED:8990 — App.onPointerMoveFromPointerDownHandler has cognitive complexity 92 (threshold 15). Drivers by points: if/else 41 (73 pts), boolean chains 12, ternaries 3 (7 pts) (nesting depth added 36). None of this is in the body itself: all 92 points belong to 2 function literals inside it that branch (lines 8993, 9172). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ConvertElementTypePopup.convertElementTypes (cognitive 85) · ×1
  • ConvertElementTypePopup.convertElementTypes (cognitive 85) packages/excalidraw/components/ConvertElementTypePopup.tsx:424 — ConvertElementTypePopup.convertElementTypes has cognitive complexity 85 (threshold 15). Drivers by points: if/else 18 (54 pts), loops 6 (21 pts), ternaries 4 (8 pts), boolean chains 2 (nesting depth added 55). Of this number, 83 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · HintViewer.getHints (cognitive 85) · ×1
  • HintViewer.getHints (cognitive 85) packages/excalidraw/components/HintViewer.tsx:43 — HintViewer.getHints has cognitive complexity 85 (threshold 15). Drivers by points: if/else 32 (57 pts), boolean chains 17, ternaries 3 (11 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · linearElementEditor.pointDraggingUpdates (cognitive 83) · ×1
  • linearElementEditor.pointDraggingUpdates (cognitive 83) packages/element/src/linearElementEditor.ts:2377 — linearElementEditor.pointDraggingUpdates has cognitive complexity 83 (threshold 15). Drivers by points: if/else 20 (34 pts), ternaries 20 (33 pts), boolean chains 16 (nesting depth added 27). Of this number, 80 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Hyperlink.Hyperlink (cognitive 80) · ×1
  • Hyperlink.Hyperlink (cognitive 80) packages/excalidraw/components/hyperlink/Hyperlink.tsx:118 — Hyperlink.Hyperlink has cognitive complexity 80 (threshold 15). Drivers by points: if/else 21 (37 pts), ternaries 9 (30 pts), boolean chains 13 (nesting depth added 37). Most of this is not in the body itself: 12 of the 80 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 150, 328, 345, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · elbowArrow.estimateSegmentCount (cognitive 80) · ×1
  • elbowArrow.estimateSegmentCount (cognitive 80) packages/element/src/elbowArrow.ts:1924 — elbowArrow.estimateSegmentCount has cognitive complexity 80 (threshold 15). Drivers by points: if/else 24 (64 pts), boolean chains 8, match/switch 4 (8 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · topPicksDnD.useTopPicksDnD (cognitive 79) · ×1
  • topPicksDnD.useTopPicksDnD (cognitive 79) packages/excalidraw/components/TopPicksDnD/topPicksDnD.tsx:140 — topPicksDnD.useTopPicksDnD has cognitive complexity 79 (threshold 15). Drivers by points: if/else 50 (66 pts), boolean chains 11, loops 2 (nesting depth added 16). None of this is in the body itself: all 79 points belong to 20 function literals inside it that branch (lines 283, 468, 525, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Dimension.handleDimensionChange (cognitive 77) · ×1
  • Dimension.handleDimensionChange (cognitive 77) packages/excalidraw/components/Stats/Dimension.tsx:45 — Dimension.handleDimensionChange has cognitive complexity 77 (threshold 15). Drivers by points: if/else 18 (39 pts), ternaries 12 (35 pts), boolean chains 3 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · App.handleCanvasPointerDown (cognitive 76) · ×1
  • App.handleCanvasPointerDown (cognitive 76) REDACTED:7526 — App.handleCanvasPointerDown has cognitive complexity 76 (threshold 15). Drivers by points: if/else 42 (52 pts), boolean chains 20, ternaries 2 (4 pts) (nesting depth added 12). Of this number, 71 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · elbowArrow.generateDynamicAABBs (cognitive 71) · ×1
  • elbowArrow.generateDynamicAABBs (cognitive 71) packages/element/src/elbowArrow.ts:1666 — elbowArrow.generateDynamicAABBs has cognitive complexity 71 (threshold 15). Drivers by points: ternaries 24 (40 pts), if/else 9 (18 pts), boolean chains 13 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderElement.drawElementOnCanvas (cognitive 71) · ×1
  • renderElement.drawElementOnCanvas (cognitive 71) packages/element/src/renderElement.ts:460 — renderElement.drawElementOnCanvas has cognitive complexity 71 (threshold 15). Drivers by points: if/else 15 (36 pts), ternaries 6 (18 pts), loops 3 (10 pts), boolean chains 6, match/switch 1 (nesting depth added 40). Of this number, 18 points are the body's own statements and 53 belong to 4 function literals inside it that branch. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · transform.bindLinearElementToElement (cognitive 70) · ×1
  • transform.bindLinearElementToElement (cognitive 70) packages/element/src/transform.ts:306 — transform.bindLinearElementToElement has cognitive complexity 70 (threshold 15). Drivers by points: if/else 23 (47 pts), boolean chains 11, match/switch 2 (8 pts), ternaries 2 (4 pts) (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MobileToolbar.MobileToolbar (cognitive 69) · ×1
  • MobileToolbar.MobileToolbar (cognitive 69) packages/excalidraw/components/MobileToolbar.tsx:49 — MobileToolbar.MobileToolbar has cognitive complexity 69 (threshold 15). Drivers by points: ternaries 9 (45 pts), boolean chains 17, if/else 7 (nesting depth added 36). Of this number, 56 points are the body's own statements and 13 belong to 6 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · elbowArrow.handleSegmentMove (cognitive 66) · ×1
  • elbowArrow.handleSegmentMove (cognitive 66) packages/element/src/elbowArrow.ts:465 — elbowArrow.handleSegmentMove has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 20 (41 pts), if/else 12 (14 pts), boolean chains 9, loops 1 (2 pts) (nesting depth added 24). Of this number, 61 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · elbowArrow.handleEndpointDrag (cognitive 66) · ×1
  • elbowArrow.handleEndpointDrag (cognitive 66) packages/element/src/elbowArrow.ts:706 — elbowArrow.handleEndpointDrag has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 18 (33 pts), if/else 12 (22 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 29). Of this number, 63 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · binding.getBindingStrategyForDraggingBindingElementEndpoints_simple (cognitive 65) · ×1
  • binding.getBindingStrategyForDraggingBindingElementEndpoints_simple (cognitive 65) packages/element/src/binding.ts:654 — binding.getBindingStrategyForDraggingBindingElementEndpoints_simple has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 20 (36 pts), boolean chains 17, if/else 11 (12 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LaserPointer.getStrokeOutline (cognitive 65) · ×1
  • LaserPointer.getStrokeOutline (cognitive 65) packages/laser-pointer/src/state.ts:119 — LaserPointer.getStrokeOutline has cognitive complexity 65 (threshold 15). Drivers by points: loops 11 (29 pts), if/else 19 (28 pts), ternaries 3 (5 pts), boolean chains 3 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SearchMenu.SearchMenu (cognitive 63) · ×1
  • SearchMenu.SearchMenu (cognitive 63) packages/excalidraw/components/SearchMenu.tsx:83 — SearchMenu.SearchMenu has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (35 pts), ternaries 8 (17 pts), boolean chains 11 (nesting depth added 23). Most of this is not in the body itself: 4 of the 63 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 276, a function literal at line 195, a function literal at line 104, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · bounds.elementsOverlappingBBox (cognitive 62) · ×1
  • bounds.elementsOverlappingBBox (cognitive 62) packages/element/src/bounds.ts:1273 — bounds.elementsOverlappingBBox has cognitive complexity 62 (threshold 15). Drivers by points: if/else 20 (42 pts), ternaries 6 (10 pts), boolean chains 9, loops 1 (nesting depth added 26). Of this number, 52 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppSelectionTool.handleSelectionDragOnPointerMove (cognitive 61) · ×1
  • AppSelectionTool.handleSelectionDragOnPointerMove (cognitive 61) packages/excalidraw/components/App.selectionTool.ts:741 — AppSelectionTool.handleSelectionDragOnPointerMove has cognitive complexity 61 (threshold 15). Drivers by points: if/else 14 (40 pts), boolean chains 15, ternaries 2 (6 pts) (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · keyboardNavHandlers.colorPickerKeyNavHandler (cognitive 60) · ×1
  • keyboardNavHandlers.colorPickerKeyNavHandler (cognitive 60) packages/excalidraw/components/ColorPicker/keyboardNavHandlers.ts:138 — keyboardNavHandlers.colorPickerKeyNavHandler has cognitive complexity 60 (threshold 15). Drivers by points: if/else 22 (39 pts), ternaries 6 (17 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 30). Of this number, 54 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · export.configExportDimension (cognitive 58) · ×1
  • export.configExportDimension (cognitive 58) REDACTED:549 — export.configExportDimension has cognitive complexity 58 (threshold 15). Drivers by points: if/else 30 (42 pts), boolean chains 13, ternaries 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EraserTrail.updateElementsToBeErased (cognitive 58) · ×1
  • EraserTrail.updateElementsToBeErased (cognitive 58) packages/excalidraw/eraser/index.ts:84 — EraserTrail.updateElementsToBeErased has cognitive complexity 58 (threshold 15). Drivers by points: if/else 13 (44 pts), loops 3 (11 pts), boolean chains 3 (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · binding.bindingStrategyForNewSimpleArrowEndpointDragging (cognitive 57) · ×1
  • binding.bindingStrategyForNewSimpleArrowEndpointDragging (cognitive 57) packages/element/src/binding.ts:319 — binding.bindingStrategyForNewSimpleArrowEndpointDragging has cognitive complexity 57 (threshold 15). Drivers by points: ternaries 8 (25 pts), if/else 13 (24 pts), boolean chains 8 (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · snapping.getGapSnaps (cognitive 57) · ×1
  • snapping.getGapSnaps (cognitive 57) packages/excalidraw/snapping.ts:446 — snapping.getGapSnaps has cognitive complexity 57 (threshold 15). Drivers by points: if/else 17 (51 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · App.handleCanvasDoubleClick (cognitive 56) · ×1
  • App.handleCanvasDoubleClick (cognitive 56) REDACTED:6205 — App.handleCanvasDoubleClick has cognitive complexity 56 (threshold 15). Drivers by points: if/else 19 (33 pts), boolean chains 16, ternaries 2 (7 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bucketFill.computeBucketFillPolygon (cognitive 54) · ×1
  • bucketFill.computeBucketFillPolygon (cognitive 54) packages/element/src/bucketFill.ts:1470 — bucketFill.computeBucketFillPolygon has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 10, loops 6 (9 pts), ternaries 2 (nesting depth added 20). Of this number, 53 points are the body's own statements and 1 belongs to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · duplicate.duplicateElements (cognitive 54) · ×1
  • duplicate.duplicateElements (cognitive 54) packages/element/src/duplicate.ts:136 — duplicate.duplicateElements has cognitive complexity 54 (threshold 15). Drivers by points: if/else 19 (34 pts), boolean chains 9, ternaries 4 (6 pts), loops 3 (5 pts) (nesting depth added 19). Of this number, 39 points are the body's own statements and 15 belong to 8 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resizeElements.resizeSingleElement (cognitive 53) · ×1
  • resizeElements.resizeSingleElement (cognitive 53) packages/element/src/resizeElements.ts:748 — resizeElements.resizeSingleElement has cognitive complexity 53 (threshold 15). Drivers by points: if/else 24 (41 pts), boolean chains 10, ternaries 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppStateDelta.filterInvisibleChanges (cognitive 53) · ×1
  • AppStateDelta.filterInvisibleChanges (cognitive 53) packages/element/src/delta.ts:723 — AppStateDelta.filterInvisibleChanges has cognitive complexity 53 (threshold 15). Drivers by points: if/else 16 (40 pts), boolean chains 8, match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppText.startTextEditing (cognitive 53) · ×1
  • AppText.startTextEditing (cognitive 53) packages/excalidraw/components/App.text.ts:615 — AppText.startTextEditing has cognitive complexity 53 (threshold 15). Drivers by points: boolean chains 20, ternaries 9 (18 pts), if/else 12 (15 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConvertElementTypePopup.convertLineToElbow (cognitive 52) · ×1
  • ConvertElementTypePopup.convertLineToElbow (cognitive 52) packages/excalidraw/components/ConvertElementTypePopup.tsx:719 — ConvertElementTypePopup.convertLineToElbow has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 5 (15 pts), boolean chains 7 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · App.handleLinearElementOnPointerDown (cognitive 52) · ×1
  • App.handleLinearElementOnPointerDown (cognitive 52) REDACTED:8478 — App.handleLinearElementOnPointerDown has cognitive complexity 52 (threshold 15). Drivers by points: ternaries 11 (27 pts), if/else 9 (15 pts), boolean chains 10 (nesting depth added 22). Of this number, 47 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderElement.drawElement (cognitive 51) · ×1
  • renderElement.drawElement (cognitive 51) packages/element/src/renderElement.ts:1068 — renderElement.drawElement has cognitive complexity 51 (threshold 15). Drivers by points: if/else 18 (43 pts), boolean chains 4, ternaries 1 (3 pts), match/switch 1 (nesting depth added 27). Of this number, 34 points are the body's own statements and 17 belong to 2 function literals inside it that branch. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · App.componentDidUpdate (cognitive 48) · ×1
  • App.componentDidUpdate (cognitive 48) REDACTED:4293 — App.componentDidUpdate has cognitive complexity 48 (threshold 15). Drivers by points: if/else 23 (26 pts), boolean chains 18, loops 1 (3 pts), ternaries 1 (nesting depth added 5). Of this number, 42 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mutateElement.mutateElement (cognitive 47) · ×1
  • mutateElement.mutateElement (cognitive 47) packages/element/src/mutateElement.ts:40 — mutateElement.mutateElement has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (32 pts), boolean chains 9, loops 2 (6 pts) (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · App.handleAppOnDrop (cognitive 47) · ×1
  • App.handleAppOnDrop (cognitive 47) REDACTED:10768 — App.handleAppOnDrop has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 7, error handling 2 (5 pts), ternaries 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinearElementEditor.handlePointDragging (cognitive 46) · ×1
  • LinearElementEditor.handlePointDragging (cognitive 46) packages/element/src/linearElementEditor.ts:471 — LinearElementEditor.handlePointDragging has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 11 (17 pts), boolean chains 16, if/else 10 (13 pts) (nesting depth added 9). Of this number, 43 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LibraryMenuItems.LibraryMenuItems (cognitive 45) · ×1
  • LibraryMenuItems.LibraryMenuItems (cognitive 45) packages/excalidraw/components/LibraryMenuItems.tsx:60 — LibraryMenuItems.LibraryMenuItems has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 22, if/else 13 (18 pts), ternaries 5 (nesting depth added 5). Of this number, 20 points are the body's own statements and 25 belong to 11 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · elbowArrow.updateElbowArrowPoints (cognitive 44) · ×1
  • elbowArrow.updateElbowArrowPoints (cognitive 44) packages/element/src/elbowArrow.ts:907 — elbowArrow.updateElbowArrowPoints has cognitive complexity 44 (threshold 15). Drivers by points: boolean chains 22, ternaries 6 (12 pts), if/else 10 (nesting depth added 6). Of this number, 36 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AppClipboard.insertClipboardContent (cognitive 44) · ×1
  • AppClipboard.insertClipboardContent (cognitive 44) packages/excalidraw/components/App.clipboard.ts:112 — AppClipboard.insertClipboardContent has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 10, ternaries 4 (9 pts), error handling 1 (2 pts), loops 1 (2 pts) (nesting depth added 13). Of this number, 41 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LayerUI.LayerUI (cognitive 44) · ×1
  • LayerUI.LayerUI (cognitive 44) packages/excalidraw/components/LayerUI.tsx:147 — LayerUI.LayerUI has cognitive complexity 44 (threshold 15). Drivers by points: boolean chains 37, ternaries 4, if/else 3. Of this number, 23 points are the body's own statements and 21 belong to 10 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · restore.restoreElements (cognitive 43) · ×1
  • restore.restoreElements (cognitive 43) packages/excalidraw/data/restore.ts:956 — restore.restoreElements has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 12, error handling 1, loops 1, ternaries 1 (nesting depth added 12). Of this number, 26 points are the body's own statements and 17 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElementsDelta.applyTo (cognitive 43) · ×1
  • ElementsDelta.applyTo (cognitive 43) packages/element/src/delta.ts:1390 — ElementsDelta.applyTo has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 5 (11 pts), boolean chains 5, ternaries 2 (4 pts), error handling 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · binding.getBindingSideMidPoint (cognitive 43) · ×1
  • binding.getBindingSideMidPoint (cognitive 43) packages/element/src/binding.ts:2913 — binding.getBindingSideMidPoint has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (36 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · interactiveScene.renderBindingHighlightForBindableElement_simple (cognitive 41) · ×1
  • interactiveScene.renderBindingHighlightForBindableElement_simple (cognitive 41) packages/excalidraw/renderer/interactiveScene.ts:258 — interactiveScene.renderBindingHighlightForBindableElement_simple has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 15, loops 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · charts.parse.tryParseCells (cognitive 40) · ×1
  • charts.parse.tryParseCells (cognitive 40) packages/excalidraw/charts/charts.parse.ts:21 — charts.parse.tryParseCells has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 10 (22 pts), if/else 9 (14 pts), boolean chains 4 (nesting depth added 17). Of this number, 36 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · App.selection.getSelectionStateAddingElements (cognitive 40) · ×1
  • App.selection.getSelectionStateAddingElements (cognitive 40) packages/excalidraw/components/App.selection.ts:348 — App.selection.getSelectionStateAddingElements has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 7 (14 pts), boolean chains 5 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · actionDeleteSelected.deleteSelectedElements (cognitive 39) · ×1
  • actionDeleteSelected.deleteSelectedElements (cognitive 39) packages/excalidraw/actions/actionDeleteSelected.tsx:38 — actionDeleteSelected.deleteSelectedElements has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (33 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AppWrap.rewrap (cognitive 39) · ×1
  • AppWrap.rewrap (cognitive 39) packages/excalidraw/components/App.wrap.ts:275 — AppWrap.rewrap has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 8 (20 pts), if/else 3 (8 pts), boolean chains 6, loops 4 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · elbowArrow.handleSegmentRenormalization (cognitive 38) · ×1
  • elbowArrow.handleSegmentRenormalization (cognitive 38) packages/element/src/elbowArrow.ts:113 — elbowArrow.handleSegmentRenormalization has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (29 pts), ternaries 3 (7 pts), boolean chains 2 (nesting depth added 21). Most of this is not in the body itself: 5 of the 38 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 180, 126, 168, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · binding.bindingStrategyForSimpleArrowEndpointDragging_complex (cognitive 38) · ×1
  • binding.bindingStrategyForSimpleArrowEndpointDragging_complex (cognitive 38) packages/element/src/binding.ts:487 — binding.bindingStrategyForSimpleArrowEndpointDragging_complex has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 7 (15 pts), boolean chains 7 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Toolbar.ExtraToolsDropdown (cognitive 38) · ×1
  • Toolbar.ExtraToolsDropdown (cognitive 38) packages/excalidraw/components/Toolbar.tsx:54 — Toolbar.ExtraToolsDropdown has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 7 (28 pts), boolean chains 10 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · FontPickerList.FontPickerList (cognitive 37) · ×1
  • FontPickerList.FontPickerList (cognitive 37) packages/excalidraw/components/FontPicker/FontPickerList.tsx:106 — FontPickerList.FontPickerList has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 10, ternaries 4 (nesting depth added 4). Most of this is not in the body itself: 5 of the 37 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 189, a function literal at line 220, a function literal at line 304, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · library.useHandleLibrary (cognitive 37) · ×1
  • library.useHandleLibrary (cognitive 37) packages/excalidraw/data/library.ts:677 — library.useHandleLibrary has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (19 pts), error handling 5 (9 pts), boolean chains 8, ternaries 1 (nesting depth added 9). None of this is in the body itself: all 37 points belong to 8 function literals inside it that branch (lines 710, 944, 718, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · MermaidToExcalidraw.MermaidToExcalidraw (cognitive 37) · ×1
  • MermaidToExcalidraw.MermaidToExcalidraw (cognitive 37) packages/excalidraw/components/TTDDialog/MermaidToExcalidraw.tsx:69 — MermaidToExcalidraw.MermaidToExcalidraw has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 4, error handling 3 (4 pts), loops 2 (4 pts) (nesting depth added 13). None of this is in the body itself: all 37 points belong to 7 function items inside it that branch (a function literal at line 173, a function literal at line 104, a function literal at line 152, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · clipboard.readSystemClipboard (cognitive 36) · ×1
  • clipboard.readSystemClipboard (cognitive 36) packages/excalidraw/clipboard.ts:257 — clipboard.readSystemClipboard has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (22 pts), error handling 3 (6 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · duplicate.reconcileDuplicatedElements (cognitive 36) · ×1
  • duplicate.reconcileDuplicatedElements (cognitive 36) packages/element/src/duplicate.ts:505 — duplicate.reconcileDuplicatedElements has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 5, loops 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shape._generateElementShape (cognitive 36) · ×1
  • shape._generateElementShape (cognitive 36) packages/element/src/shape.ts:770 — shape._generateElementShape has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (32 pts), ternaries 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · frame.getElementsInResizingFrame (cognitive 35) · ×1
  • frame.getElementsInResizingFrame (cognitive 35) packages/element/src/frame.ts:309 — frame.getElementsInResizingFrame has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 7 (14 pts), boolean chains 1 (nesting depth added 19). Of this number, 34 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dragElements.dragSelectedElements (cognitive 35) · ×1
  • dragElements.dragSelectedElements (cognitive 35) packages/element/src/dragElements.ts:40 — dragElements.dragSelectedElements has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 8, ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 12). Most of this is not in the body itself: 13 of the 35 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 118, 59). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · AppSelectionTool.handleBoxSelectionOnPointerMove (cognitive 35) · ×1
  • AppSelectionTool.handleBoxSelectionOnPointerMove (cognitive 35) packages/excalidraw/components/App.selectionTool.ts:1020 — AppSelectionTool.handleBoxSelectionOnPointerMove has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (20 pts), ternaries 3 (9 pts), boolean chains 6 (nesting depth added 17). Of this number, 17 points are the body's own statements and 18 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AppSelectionTool.handleSelectionOnPointerUp (cognitive 35) · ×1
  • AppSelectionTool.handleSelectionOnPointerUp (cognitive 35) packages/excalidraw/components/App.selectionTool.ts:1299 — AppSelectionTool.handleSelectionOnPointerUp has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 12, ternaries 2 (5 pts) (nesting depth added 10). Of this number, 30 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · elbowArrow.getElbowArrowData (cognitive 33) · ×1
  • elbowArrow.getElbowArrowData (cognitive 33) packages/element/src/elbowArrow.ts:1192 — elbowArrow.getElbowArrowData has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 13 (19 pts), boolean chains 12, if/else 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · elbowArrow.astar (cognitive 33) · ×1
  • elbowArrow.astar (cognitive 33) packages/element/src/elbowArrow.ts:1535 — elbowArrow.astar has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiPosition.handlePositionChange (cognitive 33) · ×1
  • MultiPosition.handlePositionChange (cognitive 33) packages/excalidraw/components/Stats/MultiPosition.tsx:127 — MultiPosition.handlePositionChange has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 7 (21 pts), if/else 4 (9 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · App.handleDelayedBindModeChange (cognitive 33) · ×1
  • App.handleDelayedBindModeChange (cognitive 33) REDACTED:1269 — App.handleDelayedBindModeChange has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 20, if/else 12 (17 pts), ternaries 7 (12 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (App.handleDelayedBindModeChange::effector) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · restore.restoreElement (cognitive 32) · ×1
  • restore.restoreElement (cognitive 32) packages/excalidraw/data/restore.ts:537 — restore.restoreElement has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 5 (12 pts), boolean chains 11, if/else 4 (8 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · IconPicker.Picker · ×1
  • IconPicker.Picker::handleKeyDown (cognitive 32) packages/excalidraw/components/IconPicker.tsx:91 — IconPicker.Picker::handleKeyDown has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 3 (10 pts), boolean chains 5, match/switch 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resizeElements.rotateMultipleElements (cognitive 32) · ×1
  • resizeElements.rotateMultipleElements (cognitive 32) packages/element/src/resizeElements.ts:430 — resizeElements.rotateMultipleElements has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (27 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · focus.focusPointUpdate (cognitive 32) · ×1
  • focus.focusPointUpdate (cognitive 32) packages/element/src/arrows/focus.ts:103 — focus.focusPointUpdate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 5 (8 pts), boolean chains 7 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · binding.updateBoundPoint (cognitive 32) · ×1
  • binding.updateBoundPoint (cognitive 32) packages/element/src/binding.ts:1972 — binding.updateBoundPoint has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 18, ternaries 7 (9 pts), if/else 5 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DragInput.StatsDragInput (cognitive 32) · ×1
  • DragInput.StatsDragInput (cognitive 32) packages/excalidraw/components/Stats/DragInput.tsx:73 — DragInput.StatsDragInput has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (nesting depth added 9). Most of this is not in the body itself: 4 of the 32 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 270, handleInputValue, a function literal at line 240, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · index.exportCanvas (cognitive 31) · ×1
  • index.exportCanvas (cognitive 31) packages/excalidraw/data/index.ts:99 — index.exportCanvas has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (17 pts), error handling 2 (5 pts), ternaries 2 (5 pts), boolean chains 4 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · focus.handleFocusPointDrag (cognitive 31) · ×1
  • focus.handleFocusPointDrag (cognitive 31) packages/element/src/arrows/focus.ts:211 — focus.handleFocusPointDrag has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 7 (10 pts), boolean chains 9 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinearElementEditor.handlePointerUp (cognitive 31) · ×1
  • LinearElementEditor.handlePointerUp (cognitive 31) packages/element/src/linearElementEditor.ts:719 — LinearElementEditor.handlePointerUp has cognitive complexity 31 (threshold 15). Drivers by points: if/else 5 (14 pts), ternaries 4 (10 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · staticScene._renderStaticScene (cognitive 30) · ×1
  • staticScene._renderStaticScene (cognitive 30) packages/excalidraw/renderer/staticScene.ts:333 — staticScene._renderStaticScene has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 14, if/else 12, error handling 3, ternaries 1. Most of this is not in the body itself: 4 of the 30 points are its own statements and the rest belongs to 8 function items inside it that branch (clipElementToFrame, a function literal at line 531, a function literal at line 469, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · actionDeleteSelected.deleteSelectedElements.elements (cognitive 30) · ×1
  • actionDeleteSelected.deleteSelectedElements.elements (cognitive 30) packages/excalidraw/actions/actionDeleteSelected.tsx:81 — actionDeleteSelected.deleteSelectedElements.elements has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 3 (10 pts), boolean chains 6 (nesting depth added 13). Of this number, 18 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · binding.bindPointToSnapToElementOutline (cognitive 30) · ×1
  • binding.bindPointToSnapToElementOutline (cognitive 30) packages/element/src/binding.ts:1617 — binding.bindPointToSnapToElementOutline has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 10 (19 pts), if/else 6 (8 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Position.handlePositionChange (cognitive 30) · ×1
  • Position.handlePositionChange (cognitive 30) packages/excalidraw/components/Stats/Position.tsx:30 — Position.handlePositionChange has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 8 (12 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · App.renderEmbeddables (cognitive 30) · ×1
  • App.renderEmbeddables (cognitive 30) REDACTED:1798 — App.renderEmbeddables has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 11, ternaries 7 (nesting depth added 3). None of this is in the body itself: all 30 points belong to 2 function literals inside it that branch (lines 1814, 1806). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · App.initializeScene (cognitive 29) · ×1
  • App.initializeScene (cognitive 29) REDACTED:217 — App.initializeScene has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 7, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bounds.getElementLineSegments (cognitive 29) · ×1
  • bounds.getElementLineSegments (cognitive 29) packages/element/src/bounds.ts:299 — bounds.getElementLineSegments has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 4 (12 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · App.handleInteractionStateChange (cognitive 29) · ×1
  • App.handleInteractionStateChange (cognitive 29) REDACTED:3384 — App.handleInteractionStateChange has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 8 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · App.handleHoverSelectedLinearElement (cognitive 29) · ×1
  • App.handleHoverSelectedLinearElement (cognitive 29) REDACTED:7397 — App.handleHoverSelectedLinearElement has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 10, ternaries 1 (2 pts) (nesting depth added 7). Of this number, 26 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TTDStreamFetch.TTDStreamFetch (cognitive 29) · ×1
  • TTDStreamFetch.TTDStreamFetch (cognitive 29) packages/excalidraw/components/TTDDialog/utils/TTDStreamFetch.ts:84 — TTDStreamFetch.TTDStreamFetch has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (19 pts), error handling 3 (4 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DebugCanvas.renderBindings (cognitive 28) · ×1
  • DebugCanvas.renderBindings (cognitive 28) excalidraw-app/components/DebugCanvas.tsx:211 — DebugCanvas.renderBindings has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 2 (6 pts), boolean chains 3 (nesting depth added 13). None of this is in the body itself: all 28 points belong to 2 function literals inside it that branch (lines 218, 265). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ColorPicker.ColorPickerPopupContent (cognitive 28) · ×1
  • ColorPicker.ColorPickerPopupContent (cognitive 28) packages/excalidraw/components/ColorPicker/ColorPicker.tsx:72 — ColorPicker.ColorPickerPopupContent has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 6, ternaries 3 (5 pts) (nesting depth added 7). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 136, 217, 203, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · bounds.getArrowheadPoints (cognitive 28) · ×1
  • bounds.getArrowheadPoints (cognitive 28) packages/element/src/bounds.ts:746 — bounds.getArrowheadPoints has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 10 (11 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · App.render (cognitive 28) · ×1
  • App.render (cognitive 28) REDACTED:2325 — App.render has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 21, ternaries 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · clients.renderRemoteCursors (cognitive 27) · ×1
  • clients.renderRemoteCursors (cognitive 27) packages/excalidraw/clients.ts:56 — clients.renderRemoteCursors has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 4, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · frame.filterElementsEligibleAsFrameChildren (cognitive 27) · ×1
  • frame.filterElementsEligibleAsFrameChildren (cognitive 27) packages/element/src/frame.ts:476 — frame.filterElementsEligibleAsFrameChildren has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElementsDelta.calculate (cognitive 27) · ×1
  • ElementsDelta.calculate (cognitive 27) packages/element/src/delta.ts:1165 — ElementsDelta.calculate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 2, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · zindex.shiftElementsToEnd (cognitive 27) · ×1
  • zindex.shiftElementsToEnd (cognitive 27) packages/element/src/zindex.ts:431 — zindex.shiftElementsToEnd has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 7). Of this number, 26 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stickyNote.relayoutStickyNotes (cognitive 27) · ×1
  • stickyNote.relayoutStickyNotes (cognitive 27) packages/element/src/stickyNote.ts:926 — stickyNote.relayoutStickyNotes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 5, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · snapping.getPointSnaps (cognitive 27) · ×1
  • snapping.getPointSnaps (cognitive 27) packages/excalidraw/snapping.ts:636 — snapping.getPointSnaps has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Popover.Popover (cognitive 27) · ×1
  • Popover.Popover (cognitive 27) packages/excalidraw/components/Popover.tsx:25 — Popover.Popover has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 4 (nesting depth added 7). None of this is in the body itself: all 27 points belong to 5 function literals inside it that branch (lines 52, 93, 37, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · woff2-esbuild-plugins.woff2ServerPlugin.setup (cognitive 27) · ×1
  • woff2-esbuild-plugins.woff2ServerPlugin.setup (cognitive 27) REDACTED:23 — woff2-esbuild-plugins.woff2ServerPlugin.setup has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 3 (5 pts), ternaries 2 (3 pts), error handling 1 (nesting depth added 9). None of this is in the body itself: all 27 points belong to 4 function literals inside it that branch (lines 95, 37, 151, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ConvertElementTypePopup.Panel (cognitive 26) · ×1
  • ConvertElementTypePopup.Panel (cognitive 26) packages/excalidraw/components/ConvertElementTypePopup.tsx:196 — ConvertElementTypePopup.Panel has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 6 (8 pts), boolean chains 4, loops 2 (nesting depth added 6). Most of this is not in the body itself: 6 of the 26 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 285, 333, 233, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · LinearElementEditor.handlePointerDown (cognitive 26) · ×1
  • LinearElementEditor.handlePointerDown (cognitive 26) packages/element/src/linearElementEditor.ts:1048 — LinearElementEditor.handlePointerDown has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (8 pts), ternaries 4 (7 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppPan.start (cognitive 26) · ×1
  • AppPan.start (cognitive 26) packages/excalidraw/components/App.pan.ts:101 — AppPan.start has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 13, if/else 10 (11 pts), ternaries 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 148, 223, 242). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · interactiveScene.renderBindingHighlightForBindableElement_complex (cognitive 26) · ×1
  • interactiveScene.renderBindingHighlightForBindableElement_complex (cognitive 26) packages/excalidraw/renderer/interactiveScene.ts:525 — interactiveScene.renderBindingHighlightForBindableElement_complex has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 8, match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · App.onWindowMessage (cognitive 26) · ×1
  • App.onWindowMessage (cognitive 26) REDACTED:1098 — App.onWindowMessage has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (3 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · restore.restoreStickyNotes (cognitive 25) · ×1
  • restore.restoreStickyNotes (cognitive 25) packages/excalidraw/data/restore.ts:908 — restore.restoreStickyNotes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IconButton.IconButton (cognitive 25) · ×1
  • IconButton.IconButton (cognitive 25) packages/excalidraw/components/IconButton.tsx:64 — IconButton.IconButton has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 5 (8 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 5). Of this number, 14 points are the body's own statements and 11 belong to 2 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · Picker.Picker (cognitive 25) · ×1
  • Picker.Picker (cognitive 25) packages/excalidraw/components/ColorPicker/Picker.tsx:53 — Picker.Picker has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 6 (15 pts), boolean chains 5, if/else 5 (nesting depth added 9). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 97, 80, 128, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · fractionalIndex.getInvalidIndicesGroups (cognitive 25) · ×1
  • fractionalIndex.getInvalidIndicesGroups (cognitive 25) packages/element/src/fractionalIndex.ts:296 — fractionalIndex.getInvalidIndicesGroups has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 7, loops 3 (5 pts), ternaries 2 (nesting depth added 7). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 2 function items inside it that branch (getUpperBound, getLowerBound). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · dragElements.dragNewElement (cognitive 25) · ×1
  • dragElements.dragNewElement (cognitive 25) packages/element/src/dragElements.ts:298 — dragElements.dragNewElement has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 4 (7 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · image.normalizeSVG (cognitive 25) · ×1
  • image.normalizeSVG (cognitive 25) packages/element/src/image.ts:116 — image.normalizeSVG has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 6 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · useMermaidRenderer.useMermaidRenderer (cognitive 25) · ×1
  • useMermaidRenderer.useMermaidRenderer (cognitive 25) packages/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.ts:28 — useMermaidRenderer.useMermaidRenderer has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 3 (nesting depth added 5). None of this is in the body itself: all 25 points belong to 6 function literals inside it that branch (lines 195, 65, 105, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · App.setActiveTool (cognitive 25) · ×1
  • App.setActiveTool (cognitive 25) REDACTED:5751 — App.setActiveTool has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11, ternaries 6 (9 pts), boolean chains 5 (nesting depth added 3). Of this number, 18 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · charts.helpers.getCartesianAxisLabelSpec (cognitive 24) · ×1
  • charts.helpers.getCartesianAxisLabelSpec (cognitive 24) packages/excalidraw/charts/charts.helpers.ts:608 — charts.helpers.getCartesianAxisLabelSpec has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 7, loops 2 (nesting depth added 5). Of this number, 21 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · restore.repairBinding (cognitive 24) · ×1
  • restore.repairBinding (cognitive 24) packages/excalidraw/data/restore.ts:318 — restore.repairBinding has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 6 (8 pts), boolean chains 4, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · clipboard.createPasteEvent (cognitive 24) · ×1
  • clipboard.createPasteEvent (cognitive 24) packages/excalidraw/clipboard.ts:90 — clipboard.createPasteEvent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2 (6 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · heading.headingForPointFromDiamondElement (cognitive 24) · ×1
  • heading.headingForPointFromDiamondElement (cognitive 24) packages/element/src/heading.ts:69 — heading.headingForPointFromDiamondElement has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, if/else 8, ternaries 4 (7 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · elbowArrow.handleSegmentRelease (cognitive 24) · ×1
  • elbowArrow.handleSegmentRelease (cognitive 24) packages/element/src/elbowArrow.ts:282 — elbowArrow.handleSegmentRelease has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (4 pts), boolean chains 3, ternaries 2 (nesting depth added 7). Of this number, 12 points are the body's own statements and 12 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · embeddable.getEmbedLink (cognitive 24) · ×1
  • embeddable.getEmbedLink (cognitive 24) packages/element/src/embeddable.ts:179 — embeddable.getEmbedLink has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (16 pts), ternaries 2 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · binding.updateBoundElements (cognitive 24) · ×1
  • binding.updateBoundElements (cognitive 24) packages/element/src/binding.ts:1321 — binding.updateBoundElements has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 7, ternaries 4 (7 pts) (nesting depth added 4). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 2 function items inside it that branch (visitor, a function literal at line 1383). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · binding.fixDuplicatedBindingsAfterDuplication (cognitive 24) · ×1
  • binding.fixDuplicatedBindingsAfterDuplication (cognitive 24) packages/element/src/binding.ts:2249 — binding.fixDuplicatedBindingsAfterDuplication has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), ternaries 2 (6 pts), boolean chains 4, loops 1 (nesting depth added 11). Of this number, 21 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.clipSegmentsToBounds (cognitive 24) · ×1
  • utils.clipSegmentsToBounds (cognitive 24) packages/excalidraw/lasso/utils.ts:210 — utils.clipSegmentsToBounds has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppViewport.getOffsets (cognitive 24) · ×1
  • AppViewport.getOffsets (cognitive 24) packages/excalidraw/components/App.viewport.ts:629 — AppViewport.getOffsets has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (4 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileDropOverlay.FileDropOverlay (cognitive 24) · ×1
  • FileDropOverlay.FileDropOverlay (cognitive 24) packages/excalidraw/components/FileDropOverlay.tsx:21 — FileDropOverlay.FileDropOverlay has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 7 (10 pts), boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 7 of the 24 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 40, 71, 59, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ChatMessage.ChatMessage (cognitive 24) · ×1
  • ChatMessage.ChatMessage (cognitive 24) packages/excalidraw/components/TTDDialog/Chat/ChatMessage.tsx:21 — ChatMessage.ChatMessage has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 13, ternaries 4 (7 pts), if/else 4 (nesting depth added 3). Of this number, 19 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · useTextGeneration.useTextGeneration.onGenerate (cognitive 24) · ×1
  • useTextGeneration.useTextGeneration.onGenerate (cognitive 24) packages/excalidraw/components/TTDDialog/hooks/useTextGeneration.ts:132 — useTextGeneration.useTextGeneration.onGenerate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 6, error handling 2, ternaries 1 (2 pts) (nesting depth added 4). Of this number, 18 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transformHandles.getTransformHandles (cognitive 23) · ×1
  • transformHandles.getTransformHandles (cognitive 23) packages/element/src/transformHandles.ts:272 — transformHandles.getTransformHandles has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7, ternaries 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · duplicate._deepCopyElement (cognitive 23) · ×1
  • duplicate._deepCopyElement (cognitive 23) packages/element/src/duplicate.ts:627 — duplicate._deepCopyElement has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · embeddable.embeddableURLValidator (cognitive 23) · ×1
  • embeddable.embeddableURLValidator (cognitive 23) packages/element/src/embeddable.ts:536 — embeddable.embeddableURLValidator has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · listMarker.advanceDuplicatedListMarkers (cognitive 23) · ×1
  • listMarker.advanceDuplicatedListMarkers (cognitive 23) packages/element/src/listMarker.ts:241 — listMarker.advanceDuplicatedListMarkers has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 3 (7 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LaserTrails.updateCollabTrails (cognitive 23) · ×1
  • LaserTrails.updateCollabTrails (cognitive 23) packages/excalidraw/laserTrails.ts:79 — LaserTrails.updateCollabTrails has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 6, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDrawShape.bindRecognizedArrow (cognitive 23) · ×1
  • AppDrawShape.bindRecognizedArrow (cognitive 23) packages/excalidraw/components/App.drawshape.ts:90 — AppDrawShape.bindRecognizedArrow has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 5 (8 pts), boolean chains 2, loops 2 (nesting depth added 9). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppFlowchart.resolveKeyboardEventToOperation (cognitive 23) · ×1
  • AppFlowchart.resolveKeyboardEventToOperation (cognitive 23) packages/excalidraw/components/App.flowchart.ts:97 — AppFlowchart.resolveKeyboardEventToOperation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 5, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatInterface.ChatInterface (cognitive 23) · ×1
  • ChatInterface.ChatInterface (cognitive 23) packages/excalidraw/components/TTDDialog/Chat/ChatInterface.tsx:17 — ChatInterface.ChatInterface has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 7 (11 pts), boolean chains 6, if/else 5 (6 pts) (nesting depth added 5). Of this number, 14 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InteractiveCanvas.InteractiveCanvas (cognitive 23) · ×1
  • InteractiveCanvas.InteractiveCanvas (cognitive 23) packages/excalidraw/components/canvases/InteractiveCanvas.tsx:86 — InteractiveCanvas.InteractiveCanvas has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 9). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 120, 184, 103). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · App.initializeScene (cognitive 23) · ×1
  • App.initializeScene (cognitive 23) REDACTED:3568 — App.initializeScene has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 8, error handling 1 (nesting depth added 2). Of this number, 20 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AI.AIComponents (cognitive 22) · ×1
  • AI.AIComponents (cognitive 22) excalidraw-app/components/AI.tsx:19 — AI.AIComponents has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 2, match/switch 1 (2 pts), loops 1, ternaries 1 (nesting depth added 7). None of this is in the body itself: all 22 points belong to one function literal inside it that branches (line 27). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · frame.isElementInFrame (cognitive 22) · ×1
  • frame.isElementInFrame (cognitive 22) packages/element/src/frame.ts:843 — frame.isElementInFrame has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 3, ternaries 1 (nesting depth added 4). Of this number, 20 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElementsDelta.squash (cognitive 22) · ×1
  • ElementsDelta.squash (cognitive 22) packages/element/src/delta.ts:1556 — ElementsDelta.squash has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 3, boolean chains 2 (nesting depth added 5). Of this number, 20 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · shape.generateLinearCollisionShape (cognitive 22) · ×1
  • shape.generateLinearCollisionShape (cognitive 22) packages/element/src/shape.ts:621 — shape.generateLinearCollisionShape has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 5 (9 pts), boolean chains 1, match/switch 1 (nesting depth added 10). Of this number, 15 points are the body's own statements and 7 belong to 3 function literals inside it that branch. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · AnimationController.tick (cognitive 22) · ×1
  • AnimationController.tick (cognitive 22) packages/excalidraw/renderer/animation.ts:158 — AnimationController.tick has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.eraserTest (cognitive 22) · ×1
  • index.eraserTest (cognitive 22) packages/excalidraw/eraser/index.ts:196 — index.eraserTest has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, loops 2 (4 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextToDiagram.TextToDiagramContent (cognitive 22) · ×1
  • TextToDiagram.TextToDiagramContent (cognitive 22) packages/excalidraw/components/TTDDialog/TextToDiagram.tsx:36 — TextToDiagram.TextToDiagramContent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7, ternaries 2 (4 pts) (nesting depth added 4). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 6 function items inside it that branch (handleInsertMessage, handleRetry, handleAiRepairClick, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · editorInterface.isMobileOrTablet (cognitive 21) · ×1
  • editorInterface.isMobileOrTablet (cognitive 21) packages/common/src/editorInterface.ts:89 — editorInterface.isMobileOrTablet has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · restore.restoreElementWithProperties (cognitive 21) · ×1
  • restore.restoreElementWithProperties (cognitive 21) packages/excalidraw/data/restore.ts:450 — restore.restoreElementWithProperties has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, ternaries 6 (9 pts), if/else 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · staticScene.renderLinkIcon (cognitive 21) · ×1
  • staticScene.renderLinkIcon (cognitive 21) packages/excalidraw/renderer/staticScene.ts:230 — staticScene.renderLinkIcon has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · blob.parseFileContents (cognitive 21) · ×1
  • blob.parseFileContents (cognitive 21) packages/excalidraw/data/blob.ts:34 — blob.parseFileContents has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), error handling 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · colorTargets.resolveColorTarget (cognitive 21) · ×1
  • colorTargets.resolveColorTarget (cognitive 21) packages/excalidraw/actions/colorTargets.ts:103 — colorTargets.resolveColorTarget has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 11 (15 pts), boolean chains 3, if/else 3 (nesting depth added 4). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LibraryUnit.LibraryUnit (cognitive 21) · ×1
  • LibraryUnit.LibraryUnit (cognitive 21) packages/excalidraw/components/LibraryUnit.tsx:17 — LibraryUnit.LibraryUnit has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, ternaries 6 (7 pts), if/else 4 (6 pts) (nesting depth added 3). Of this number, 11 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Actions.SelectedShapeActions (cognitive 21) · ×1
  • Actions.SelectedShapeActions (cognitive 21) packages/excalidraw/components/Actions.tsx:129 — Actions.SelectedShapeActions has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 20, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · fractionalIndex.validateFractionalIndices (cognitive 21) · ×1
  • fractionalIndex.validateFractionalIndices (cognitive 21) packages/element/src/fractionalIndex.ts:49 — fractionalIndex.validateFractionalIndices has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElementsDelta.redrawTextBoundingBoxes (cognitive 21) · ×1
  • ElementsDelta.redrawTextBoundingBoxes (cognitive 21) packages/element/src/delta.ts:2059 — ElementsDelta.redrawTextBoundingBoxes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 2 (6 pts), loops 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.projectFixedPointOntoDiagonal (cognitive 21) · ×1
  • utils.projectFixedPointOntoDiagonal (cognitive 21) packages/element/src/utils.ts:810 — utils.projectFixedPointOntoDiagonal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 8, ternaries 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · collision.getBindingCandidates (cognitive 21) · ×1
  • collision.getBindingCandidates (cognitive 21) packages/element/src/collision.ts:363 — collision.getBindingCandidates has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · snapping.getVisibleGaps (cognitive 21) · ×1
  • snapping.getVisibleGaps (cognitive 21) packages/excalidraw/snapping.ts:328 — snapping.getVisibleGaps has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 10). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · snapping.createGapSnapLines (cognitive 21) · ×1
  • snapping.createGapSnapLines (cognitive 21) packages/excalidraw/snapping.ts:915 — snapping.createGapSnapLines has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.getLassoSelectedElementIds (cognitive 21) · ×1
  • utils.getLassoSelectedElementIds (cognitive 21) packages/excalidraw/lasso/utils.ts:37 — utils.getLassoSelectedElementIds has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 8). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppClipboard.addTextFromPaste (cognitive 21) · ×1
  • AppClipboard.addTextFromPaste (cognitive 21) packages/excalidraw/components/App.clipboard.ts:427 — AppClipboard.addTextFromPaste has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 5 (7 pts), boolean chains 3 (nesting depth added 4). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 464, pasteWithin, a function literal at line 549). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · textWysiwyg.textWysiwyg (cognitive 21) · ×1
  • textWysiwyg.textWysiwyg (cognitive 21) packages/excalidraw/wysiwyg/textWysiwyg.tsx:250 — textWysiwyg.textWysiwyg has cognitive complexity 21 (threshold 15). Drivers by points: if/else 53 (77 pts), boolean chains 48, ternaries 10 (14 pts), loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (textWysiwyg.textWysiwyg::updateWysiwygStyle, textWysiwyg.textWysiwyg::onPointerDown) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · AppText.handleTextWysiwyg (cognitive 21) · ×1
  • AppText.handleTextWysiwyg (cognitive 21) packages/excalidraw/components/App.text.ts:168 — AppText.handleTextWysiwyg has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 9, ternaries 2 (nesting depth added 2). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 4 function items inside it that branch (updateElement, a function literal at line 214, a function literal at line 294, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · App.renderFrameNames (cognitive 21) · ×1
  • App.renderFrameNames (cognitive 21) REDACTED:2141 — App.renderFrameNames has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 7 (8 pts), boolean chains 5 (nesting depth added 3). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 2162, 2222). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Collab.startCollaboration (cognitive 20) · ×1
  • Collab.startCollaboration (cognitive 20) excalidraw-app/collab/Collab.tsx:492 — Collab.startCollaboration has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 2, error handling 1, match/switch 1 (nesting depth added 4). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 591, 563, 698). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · staticScene.strokeGrid (cognitive 20) · ×1
  • staticScene.strokeGrid (cognitive 20) packages/excalidraw/renderer/staticScene.ts:92 — staticScene.strokeGrid has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 3 (5 pts), boolean chains 4, loops 2 (nesting depth added 6). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · zindex.getTargetIndex (cognitive 20) · ×1
  • zindex.getTargetIndex (cognitive 20) packages/element/src/zindex.ts:193 — zindex.getTargetIndex has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 4 (6 pts), boolean chains 3 (nesting depth added 3). Of this number, 17 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · convertToShape.convertToShapeHandlePointerMoveFromPointerDown (cognitive 20) · ×1
  • convertToShape.convertToShapeHandlePointerMoveFromPointerDown (cognitive 20) packages/element/src/convertToShape.ts:767 — convertToShape.convertToShapeHandlePointerMoveFromPointerDown has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (8 pts), boolean chains 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LinearElementEditor.handlePointerMove (cognitive 20) · ×1
  • LinearElementEditor.handlePointerMove (cognitive 20) packages/element/src/linearElementEditor.ts:311 — LinearElementEditor.handlePointerMove has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, ternaries 3 (5 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · snapping.createPointSnapLines (cognitive 20) · ×1
  • snapping.createPointSnapLines (cognitive 20) packages/excalidraw/snapping.ts:828 — snapping.createPointSnapLines has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · snapping.getSnapLinesAtPointer (cognitive 20) · ×1
  • snapping.getSnapLinesAtPointer (cognitive 20) packages/excalidraw/snapping.ts:1318 — snapping.getSnapLinesAtPointer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), ternaries 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · App.viewport.resolveViewportTarget (cognitive 20) · ×1
  • App.viewport.resolveViewportTarget (cognitive 20) packages/excalidraw/components/App.viewport.ts:119 — App.viewport.resolveViewportTarget has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 4 (7 pts), boolean chains 3 (nesting depth added 5). Of this number, 16 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TTDDialogOutput.TTDDialogOutput (cognitive 20) · ×1
  • TTDDialogOutput.TTDDialogOutput (cognitive 20) packages/excalidraw/components/TTDDialog/TTDDialogOutput.tsx:30 — TTDDialogOutput.TTDDialogOutput has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9 (13 pts), boolean chains 7 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiAngle.handleDegreeChange (cognitive 20) · ×1
  • MultiAngle.handleDegreeChange (cognitive 20) packages/excalidraw/components/Stats/MultiAngle.tsx:33 — MultiAngle.handleDegreeChange has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 8). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · interactiveScene.renderLinearPointHandles (cognitive 20) · ×1
  • interactiveScene.renderLinearPointHandles (cognitive 20) packages/excalidraw/renderer/interactiveScene.ts:1056 — interactiveScene.renderLinearPointHandles has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (9 pts), ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1081, 1158, 1163, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · App.handleElementLinkClick (cognitive 20) · ×1
  • App.handleElementLinkClick (cognitive 20) REDACTED:6502 — App.handleElementLinkClick has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · polyfill.polyfill (cognitive 20) · ×1
  • polyfill.polyfill (cognitive 20) packages/excalidraw/polyfill.ts:1 — polyfill.polyfill has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 6, 48, 69). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · utils.isShallowEqual (cognitive 19) · ×1
  • utils.isShallowEqual (cognitive 19) packages/common/src/utils.ts:774 — utils.isShallowEqual has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 1 (2 pts), ternaries 1 (nesting depth added 7). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · actionBoundText.wrapTextsInContainers (cognitive 19) · ×1
  • actionBoundText.wrapTextsInContainers (cognitive 19) packages/excalidraw/actions/actionBoundText.tsx:343 — actionBoundText.wrapTextsInContainers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), ternaries 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 10). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 393). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · LibraryMenuHeaderContent.LibraryDropdownMenuButton (cognitive 19) · ×1
  • LibraryMenuHeaderContent.LibraryDropdownMenuButton (cognitive 19) packages/excalidraw/components/LibraryMenuHeaderContent.tsx:47 — LibraryMenuHeaderContent.LibraryDropdownMenuButton has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (5 pts), ternaries 5, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (renderLibraryMenu, onLibraryImport, renderRemoveLibAlert, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · frame.addElementsToFrame (cognitive 19) · ×1
  • frame.addElementsToFrame (cognitive 19) packages/element/src/frame.ts:570 — frame.addElementsToFrame has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, loops 3, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · textElement.handleBindTextResize (cognitive 19) · ×1
  • textElement.handleBindTextResize (cognitive 19) packages/element/src/textElement.ts:164 — textElement.handleBindTextResize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppSelectionTool.maybeHandleResize (cognitive 19) · ×1
  • AppSelectionTool.maybeHandleResize (cognitive 19) packages/excalidraw/components/App.selectionTool.ts:563 — AppSelectionTool.maybeHandleResize has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 2 (3 pts) (nesting depth added 2). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · interactiveScene.renderTextToolHover (cognitive 19) · ×1
  • interactiveScene.renderTextToolHover (cognitive 19) packages/excalidraw/renderer/interactiveScene.ts:1511 — interactiveScene.renderTextToolHover has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (10 pts), if/else 4 (7 pts), boolean chains 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · App.eraseElements (cognitive 19) · ×1
  • App.eraseElements (cognitive 19) REDACTED:10306 — App.eraseElements has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3 (nesting depth added 7). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 10311, 10337, 10369). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.generateKeyBetween (cognitive 19) · ×1
  • index.generateKeyBetween (cognitive 19) packages/fractional-indexing/src/index.ts:212 — index.generateKeyBetween has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 5). 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 · export.exportToSvg (cognitive 18) · ×1
  • export.exportToSvg (cognitive 18) REDACTED:962 — export.exportToSvg has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (2 pts), ternaries 2 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · arrowEndpointText.getUnboundArrowEndpointAtPoint (cognitive 18) · ×1
  • arrowEndpointText.getUnboundArrowEndpointAtPoint (cognitive 18) packages/element/src/arrowEndpointText.ts:61 — arrowEndpointText.getUnboundArrowEndpointAtPoint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · bucketFill.computeBucketFillPolygon.collectSegments · ×1
  • bucketFill.computeBucketFillPolygon.collectSegments::collect (cognitive 18) packages/element/src/bucketFill.ts:1515 — bucketFill.computeBucketFillPolygon.collectSegments::collect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, loops 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Delta.diffArrays (cognitive 18) · ×1
  • Delta.diffArrays (cognitive 18) packages/element/src/delta.ts:263 — Delta.diffArrays has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 4 (5 pts), boolean chains 3 (nesting depth added 7). Of this number, 12 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · elbowArrow.routeElbowArrow (cognitive 18) · ×1
  • elbowArrow.routeElbowArrow (cognitive 18) packages/element/src/elbowArrow.ts:1437 — elbowArrow.routeElbowArrow has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, ternaries 7, if/else 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · binding.reanchorBindingsToOutline (cognitive 18) · ×1
  • binding.reanchorBindingsToOutline (cognitive 18) packages/element/src/binding.ts:1219 — binding.reanchorBindingsToOutline has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 6). None of this is in the body itself: all 18 points belong to one function literal inside it that branches (line 1228). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · shape.generateElbowArrowShape (cognitive 18) · ×1
  • shape.generateElbowArrowShape (cognitive 18) packages/element/src/shape.ts:1018 — shape.generateElbowArrowShape has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppBucketFill.fill (cognitive 18) · ×1
  • AppBucketFill.fill (cognitive 18) packages/excalidraw/components/App.bucketFill.ts:155 — AppBucketFill.fill has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 5 (7 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppDuplicate.duplicateDraggedSelection (cognitive 18) · ×1
  • AppDuplicate.duplicateDraggedSelection (cognitive 18) packages/excalidraw/components/App.duplicate.ts:354 — AppDuplicate.duplicateDraggedSelection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7 (nesting depth added 3). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 451, 408, 516, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · SearchMenu.getMatchedLines (cognitive 18) · ×1
  • SearchMenu.getMatchedLines (cognitive 18) packages/excalidraw/components/SearchMenu.tsx:630 — SearchMenu.getMatchedLines has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 1 (4 pts), boolean chains 2, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderNewElementScene._renderNewElementScene (cognitive 18) · ×1
  • renderNewElementScene._renderNewElementScene (cognitive 18) packages/excalidraw/renderer/renderNewElementScene.ts:20 — renderNewElementScene._renderNewElementScene has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4 (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · App.handleIframeLikeCenterClick (cognitive 18) · ×1
  • App.handleIframeLikeCenterClick (cognitive 18) REDACTED:1550 — App.handleIframeLikeCenterClick has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · App.initializeImage (cognitive 18) · ×1
  • App.initializeImage (cognitive 18) REDACTED:10390 — App.initializeImage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 3 (5 pts), boolean chains 3 (nesting depth added 4). Of this number, 12 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index.areEqual (cognitive 18) · ×1
  • index.areEqual (cognitive 18) packages/excalidraw/index.tsx:271 — index.areEqual has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 8 (9 pts) (nesting depth added 1). Of this number, 13 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · App.selection.getFramesSelectedViaGroups (cognitive 17) · ×1
  • App.selection.getFramesSelectedViaGroups (cognitive 17) packages/excalidraw/components/App.selection.ts:233 — App.selection.getFramesSelectedViaGroups has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ShadeList.ShadeList (cognitive 17) · ×1
  • ShadeList.ShadeList (cognitive 17) packages/excalidraw/components/ColorPicker/ShadeList.tsx:30 — ShadeList.ShadeList has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (9 pts), boolean chains 4, if/else 3 (4 pts) (nesting depth added 7). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 63, 49). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ColorPicker.ColorPickerComponent (cognitive 17) · ×1
  • ColorPicker.ColorPickerComponent (cognitive 17) packages/excalidraw/components/ColorPicker/ColorPicker.tsx:350 — ColorPicker.ColorPickerComponent has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 5, ternaries 5. Of this number, 12 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Trans.getTransChildren (cognitive 17) · ×1
  • Trans.getTransChildren (cognitive 17) packages/excalidraw/components/Trans.tsx:20 — Trans.getTransChildren has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (17 pts) (nesting depth added 5). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 36). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · NodeStore.getOrCreate (cognitive 17) · ×1
  • NodeStore.getOrCreate (cognitive 17) packages/element/src/bucketFill.ts:483 — NodeStore.getOrCreate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resizeElements.transformElements (cognitive 17) · ×1
  • resizeElements.transformElements (cognitive 17) packages/element/src/resizeElements.ts:97 — resizeElements.transformElements has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sortElements.normalizeBoundElementsOrder (cognitive 17) · ×1
  • sortElements.normalizeBoundElementsOrder (cognitive 17) packages/element/src/sortElements.ts:65 — sortElements.normalizeBoundElementsOrder has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · zindex.getTargetIndexAccountingForBinding (cognitive 17) · ×1
  • zindex.getTargetIndexAccountingForBinding (cognitive 17) packages/element/src/zindex.ts:88 — zindex.getTargetIndexAccountingForBinding has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AppText.getTextBindableContainerAtPosition (cognitive 17) · ×1
  • AppText.getTextBindableContainerAtPosition (cognitive 17) packages/excalidraw/components/App.text.ts:534 — AppText.getTextBindableContainerAtPosition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, ternaries 2 (4 pts), loops 1 (nesting depth added 6). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElementLinkDialog.ElementLinkDialog (cognitive 17) · ×1
  • ElementLinkDialog.ElementLinkDialog (cognitive 17) packages/excalidraw/components/ElementLinkDialog.tsx:25 — ElementLinkDialog.ElementLinkDialog has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8 (nesting depth added 1). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 70, 44, 91, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · App.handleSkipBindMode (cognitive 17) · ×1
  • App.handleSkipBindMode (cognitive 17) REDACTED:1161 — App.handleSkipBindMode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · App.addEventListeners (cognitive 17) · ×1
  • App.addEventListeners (cognitive 17) REDACTED:3992 — App.addEventListeners has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · App.getElementAtPosition (cognitive 17) · ×1
  • App.getElementAtPosition (cognitive 17) REDACTED:5983 — App.getElementAtPosition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 1 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · release.getArguments (cognitive 17) · ×1
  • release.getArguments (cognitive 17) REDACTED:31 — release.getArguments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · restore.restoreAppState (cognitive 16) · ×1
  • restore.restoreAppState (cognitive 16) packages/excalidraw/data/restore.ts:1264 — restore.restoreAppState has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (7 pts), if/else 3 (4 pts), boolean chains 3, loops 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · manager.trackAction (cognitive 16) · ×1
  • manager.trackAction (cognitive 16) packages/excalidraw/actions/manager.tsx:22 — manager.trackAction has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 2 (7 pts), if/else 3 (6 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · UserList.UserList (cognitive 16) · ×1
  • UserList.UserList (cognitive 16) packages/excalidraw/components/UserList.tsx:122 — UserList.UserList has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6, boolean chains 4, if/else 3 (4 pts), loops 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 155, 208, 168). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · zindex.shiftElementsAccountingForFrames (cognitive 16) · ×1
  • zindex.shiftElementsAccountingForFrames (cognitive 16) packages/element/src/zindex.ts:543 — zindex.shiftElementsAccountingForFrames has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · focus.handleFocusPointPointerDown (cognitive 16) · ×1
  • focus.handleFocusPointPointerDown (cognitive 16) packages/element/src/arrows/focus.ts:342 — focus.handleFocusPointPointerDown has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (focus.handleFocusPointHover) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · focus.handleFocusPointHover (cognitive 16) · ×1
  • focus.handleFocusPointHover (cognitive 16) packages/element/src/arrows/focus.ts:504 — focus.handleFocusPointHover has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (focus.handleFocusPointPointerDown) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · convertToShape.cornerTurnShare (cognitive 16) · ×1
  • convertToShape.cornerTurnShare (cognitive 16) packages/element/src/convertToShape.ts:288 — convertToShape.cornerTurnShare has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · textElement.redrawTextBoundingBox (cognitive 16) · ×1
  • textElement.redrawTextBoundingBox (cognitive 16) packages/element/src/textElement.ts:54 — textElement.redrawTextBoundingBox has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stickyNote.getStickyNoteResizeIntent (cognitive 16) · ×1
  • stickyNote.getStickyNoteResizeIntent (cognitive 16) packages/element/src/stickyNote.ts:790 — stickyNote.getStickyNoteResizeIntent has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 4, if/else 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · binding.avoidRectangularCorner (cognitive 16) · ×1
  • binding.avoidRectangularCorner (cognitive 16) packages/element/src/binding.ts:1765 — binding.avoidRectangularCorner has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · renderElement.drawElementFromCanvas (cognitive 16) · ×1
  • renderElement.drawElementFromCanvas (cognitive 16) packages/element/src/renderElement.ts:809 — renderElement.drawElementFromCanvas has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 4, if/else 4 (nesting depth added 4). None of this is in the body itself: all 16 points belong to one function literal inside it that branches (line 829). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · AppCursor.applyForTool (cognitive 16) · ×1
  • AppCursor.applyForTool (cognitive 16) packages/excalidraw/components/App.cursor.ts:95 — AppCursor.applyForTool has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, ternaries 3 (4 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AppWrap.toggle (cognitive 16) · ×1
  • AppWrap.toggle (cognitive 16) packages/excalidraw/components/App.wrap.ts:94 — AppWrap.toggle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · App.handleDelayedBindModeChange · ×1
  • App.handleDelayedBindModeChange::effector (cognitive 16) REDACTED:1277 — App.handleDelayedBindModeChange::effector has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (App.handleDelayedBindModeChange) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · index.midpoint (cognitive 16) · ×1
  • index.midpoint (cognitive 16) packages/fractional-indexing/src/index.ts:19 — index.midpoint has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, loops 1 (2 pts), ternaries 2 (nesting depth added 2). 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.
D22 · Internal API Consistency · Redundant utility methods that duplicate native Array.prototype.findIndex and Array.prototype.findLastIndex. While these might exist for older environment support, exposing them in a general utility namespace alongside native-like names creates confusion about whether to use the native method or the utility. · ×1
  • Redundant utility methods that duplicate native Array.prototype.findIndex and Array.prototype.findLastIndex. While these might exist for older environment support, exposing them in a general utility namespace alongside native-like names creates confusion about whether to use the native method or the utility. — Remove these from the public API surface unless strictly necessary for polyfilling in a context where the API is consumed by environments without these methods. If kept, rename to `polyfillFindIndex` to distinguish from standard operations. (signatures: utils.findIndex(array: readonly T[], cb: (element: T, index: number, array: readonly T[]) => boolean, fromIndex?: number) | utils.findLastIndex(array: readonly T[], cb: (element: T, index: number, array: readonly T[]) => boolean, fromIndex?: number))
D22 · Internal API Consistency · Naming inconsistency and potential overlap. `arrayToMap` accepts an existing Map, suggesting it might be a converter or merger, while `arrayToMapWithIndex` implies creating a map from an array. The distinction between 'Map' (key-value) and 'Map with Index' (index-keyed) is unclear, and `arrayToMap`'s behavior with an input Map is ambiguous compared to the explicit `arrayToMapWithIndex`. · ×1
  • Naming inconsistency and potential overlap. `arrayToMap` accepts an existing Map, suggesting it might be a converter or merger, while `arrayToMapWithIndex` implies creating a map from an array. The distinction between 'Map' (key-value) and 'Map with Index' (index-keyed) is unclear, and `arrayToMap`'s behavior with an input Map is ambiguous compared to the explicit `arrayToMapWithIndex`. — Clarify the intent. If `arrayToMap` is for converting arrays to key-value maps, rename to `arrayToKeyValueMap`. If it merges, rename to `mergeMaps`. Ensure `arrayToMapWithIndex` is clearly distinct (e.g., `arrayToIndexMap`). (signatures: utils.arrayToMap(items: readonly T[] | Map<string, T>) | utils.arrayToMapWithIndex(elements: readonly T[]))
D22 · Internal API Consistency · Semantic overlap between `isWritableElement` and `isInputLike`. Both check for editable input elements. `isInputLike` includes `HTMLSelectElement` while `isWritableElement` does not, but the naming convention is inconsistent (`Writable` vs `InputLike`) and the distinction is subtle and domain-specific, potentially confusing consumers who just want to know if an element is an 'input'. · ×1
  • Semantic overlap between `isWritableElement` and `isInputLike`. Both check for editable input elements. `isInputLike` includes `HTMLSelectElement` while `isWritableElement` does not, but the naming convention is inconsistent (`Writable` vs `InputLike`) and the distinction is subtle and domain-specific, potentially confusing consumers who just want to know if an element is an 'input'. — Unify under a single naming convention. If `isInputLike` is the broader check, consider renaming `isWritableElement` to `isEditableElement` or merging them if the select element distinction is not critical for the primary use case. (signatures: utils.isWritableElement(target: Element | EventTarget | null): target is | HTMLInputElement | HTMLTextAreaElement | HTMLBRElement | HTMLDivElement | utils.isInputLike(target: Element | EventTarget | null): target is | HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | HTMLBRElement | HTMLDivElement)
D23 · Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → common) · ×1
  • Cross-context type ExcalidrawElement (element → common) REDACTED:506 — ExcalidrawElement (context element) is exposed in common's public surface via constants.getStrokeWidthByKey — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type ActiveTool (excalidraw → common) · ×1
  • Cross-context type ActiveTool (excalidraw → common) packages/common/src/utils.ts:297 — ActiveTool (context excalidraw) is exposed in common's public surface via utils.updateActiveTool — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type ExcalidrawTextElement (element → common) · ×1
  • Cross-context type ExcalidrawTextElement (element → common) packages/common/src/font-metadata.ts:155 — ExcalidrawTextElement (context element) is exposed in common's public surface via font-metadata.getVerticalOffset — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type LocalPoint (math → common) · ×1
  • Cross-context type LocalPoint (math → common) packages/common/src/points.ts:10 — LocalPoint (context math) is exposed in common's public surface via points.getSizeFromPoints — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type NullableGridSize (excalidraw → common) · ×1
  • Cross-context type NullableGridSize (excalidraw → common) packages/common/src/points.ts:69 — NullableGridSize (context excalidraw) is exposed in common's public surface via points.getGridPoint — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type Radians (math → excalidraw) · ×1
  • Cross-context type Radians (math → excalidraw) packages/excalidraw/components/hyperlink/helpers.ts:129 — Radians (context math) is exposed in excalidraw's public surface via helpers.getLinkHandleFromCoords — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type FileId (element → excalidraw) · ×1
  • Cross-context type FileId (element → excalidraw) packages/excalidraw/data/blob.ts:263 — FileId (context element) is exposed in excalidraw's public surface via blob.generateIdFromFile — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type ConvertibleTypes (element → excalidraw) · ×1
  • Cross-context type ConvertibleTypes (element → excalidraw) packages/excalidraw/components/ConvertElementTypePopup.tsx:424 — ConvertibleTypes (context element) is exposed in excalidraw's public surface via ConvertElementTypePopup.convertElementTypes — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type Vector (math → element) · ×1
  • Cross-context type Vector (math → element) packages/element/src/heading.ts:37 — Vector (context math) is exposed in element's public surface via heading.vectorToHeading — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type Radians (math → element) · ×1
  • Cross-context type Radians (math → element) packages/element/src/transformHandles.ts:133 — Radians (context math) is exposed in element's public surface via transformHandles.getTransformHandlesFromCoords — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type BoxSelectionMode (excalidraw → element) · ×1
  • Cross-context type BoxSelectionMode (excalidraw → element) packages/element/src/selection.ts:66 — BoxSelectionMode (context excalidraw) is exposed in element's public surface via selection.getElementsWithinSelection — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type DataURL (excalidraw → element) · ×1
  • Cross-context type DataURL (excalidraw → element) packages/element/src/image.ts:22 — DataURL (context excalidraw) is exposed in element's public surface via image.loadHTMLImageElement — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type Degrees (math → element) · ×1
  • Cross-context type Degrees (math → element) packages/element/src/bounds.ts:735 — Degrees (context math) is exposed in element's public surface via bounds.getArrowheadAngle — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type GeometricShape (utils → element) · ×1
  • Cross-context type GeometricShape (utils → element) packages/element/src/shape.ts:1087 — GeometricShape (context utils) is exposed in element's public surface via shape.getElementShape — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type MaybeTransformHandleType (element → excalidraw) · ×1
  • Cross-context type MaybeTransformHandleType (element → excalidraw) packages/excalidraw/snapping.ts:1108 — MaybeTransformHandleType (context element) is exposed in excalidraw's public surface via snapping.snapResizingElements — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type TransformHandleType (element → excalidraw) · ×1
  • Cross-context type TransformHandleType (element → excalidraw) packages/excalidraw/components/App.selectionTool.ts:1228 — TransformHandleType (context element) is exposed in excalidraw's public surface via AppSelectionTool.getTransformHandleAt — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type TransformHandleDirection (element → excalidraw) · ×1
  • Cross-context type TransformHandleDirection (element → excalidraw) REDACTED:715 — TransformHandleDirection (context element) is exposed in excalidraw's public surface via App.activeResizeHandle — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type ExcalidrawBindableElement (element → excalidraw) · ×1
  • Cross-context type ExcalidrawBindableElement (element → excalidraw) packages/excalidraw/types.ts:388 — ExcalidrawBindableElement (context element) is exposed in excalidraw's public surface via AppState.suggestedBinding — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type StrokeVariability (element → excalidraw) · ×1
  • Cross-context type StrokeVariability (element → excalidraw) packages/excalidraw/types.ts:459 — StrokeVariability (context element) is exposed in excalidraw's public surface via AppState.currentItemStrokeVariability — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type StrokeRoundness (element → excalidraw) · ×1
  • Cross-context type StrokeRoundness (element → excalidraw) packages/excalidraw/types.ts:467 — StrokeRoundness (context element) is exposed in excalidraw's public surface via AppState.currentItemRoundness — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type BindMode (element → excalidraw) · ×1
  • Cross-context type BindMode (element → excalidraw) packages/excalidraw/types.ts:573 — BindMode (context element) is exposed in excalidraw's public surface via AppState.bindMode — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type ExcalidrawElement (element → utils) · ×1
  • Cross-context type ExcalidrawElement (element → utils) packages/utils/src/shape.ts:153 — ExcalidrawElement (context element) is exposed in utils's public surface via shape.getSelectionBoxShape — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type ExcalidrawBindableElement (element → utils) · ×1
  • Cross-context type ExcalidrawBindableElement (element → utils) packages/utils/src/shape.ts:364 — ExcalidrawBindableElement (context element) is exposed in utils's public surface via shape.segmentIntersectRectangleElement — couples the contexts.
D23 · Boundary Type-Coupling · Cross-context type LineSegment (math → utils) · ×1
  • Cross-context type LineSegment (math → utils) packages/utils/src/shape.ts:364 — LineSegment (context math) is exposed in utils's public surface via shape.segmentIntersectRectangleElement — couples the contexts.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×1
  • REDACTED
D31 · IaC & Container Security · Medium IaC · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
IC1 · Incompleteness & stubs · Guard cannot change the result · ×1
  • Guard cannot change the result — returns what the code already falls through to packages/common/src/editorInterface.ts:139 — The guard above `return false;` also returns `false`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
M1 · Documentation (README) · README may be stale · ×1
  • README may be stale — 296 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
P2 · Observability · No structured logging · ×1
  • No structured logging — No logging call was found in the 510 JavaScript/TypeScript production file(s) this check read across 10 module(s). Each was searched for its ecosystem's logging libraries (JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
R10 · Code Duplication · Duplication concentrated across 5 sibling directories (13 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (13 clone groups) packages/math/src/ellipse.ts:109 — 13 duplicated blocks under packages/ have copies in at least two of the sibling directories common, element, excalidraw, math, utils — 7 of them are reported below, and 6 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 13 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 13 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 13 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 7 sibling directories (8 clone groups) · ×1
  • Duplication concentrated across 7 sibling directories (8 clone groups) packages/excalidraw/components/main-menu/DefaultItems.tsx:197 — 8 duplicated blocks under packages/excalidraw/components/ have copies in at least two of the sibling directories ColorPicker, FontPicker, Sidebar, TTDDialog, dropdownMenu, main-menu (+1 more sibling(s) not listed) — 3 of them are reported below, and 5 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 8 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 2 sibling directories (6 clone groups) · ×1
  • Duplication concentrated across 2 sibling directories (6 clone groups) excalidraw-app/share/ShareDialog.tsx:77 — 6 of the duplicated blocks reported below have copies in at least two of the sibling directories excalidraw-app, packages under the repository root. That concentration is one structural fact, not 6 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 6 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (97 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (97 matched lines × 2 locations) packages/excalidraw/components/Stats/Dimension.tsx:196 — packages/excalidraw/components/Stats/Dimension.tsx:196 · packages/excalidraw/components/Stats/MultiDimension.tsx:288 — the two spans are one implementation copied and then locally edited — 433 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (68 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (68 matched lines × 2 locations) packages/excalidraw/components/MobileToolbar.tsx:299 — packages/excalidraw/components/MobileToolbar.tsx:299 · packages/excalidraw/components/Toolbar.tsx:136 — the two spans are one implementation copied and then locally edited — 492 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (60 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (60 matched lines × 2 locations) packages/excalidraw/charts/charts.bar.ts:22 — packages/excalidraw/charts/charts.bar.ts:22 · packages/excalidraw/charts/charts.line.ts:26 — the two spans are one implementation copied and then locally edited — 313 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (57 lines × 2 locations) · ×1
  • Duplicated block (57 lines × 2 locations) packages/element/src/transform.ts:327 — packages/element/src/transform.ts:327 · packages/element/src/transform.ts:406 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (41 lines × 2 locations) · ×1
  • Duplicated block (41 lines × 2 locations) packages/element/src/transform.ts:105 — packages/element/src/transform.ts:105 · packages/element/src/transform.ts:146 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (40 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (40 matched lines × 2 locations) packages/excalidraw/components/Stats/Angle.tsx:23 — packages/excalidraw/components/Stats/Angle.tsx:23 · packages/excalidraw/components/Stats/MultiAngle.tsx:23 — the two spans are one implementation copied and then locally edited — 226 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (37 lines × 2 locations) · ×1
  • Duplicated block (37 lines × 2 locations) packages/excalidraw/renderer/interactiveScene.ts:633 — packages/excalidraw/renderer/interactiveScene.ts:633 · packages/excalidraw/renderer/interactiveScene.ts:675 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (36 lines × 2 locations) · ×1
  • Duplicated block (36 lines × 2 locations) packages/excalidraw/renderer/interactiveScene.ts:354 — packages/excalidraw/renderer/interactiveScene.ts:354 · packages/excalidraw/renderer/interactiveScene.ts:395 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (34 lines × 2 locations) · ×1
  • Duplicated block (34 lines × 2 locations) packages/excalidraw/snapping.ts:357 — packages/excalidraw/snapping.ts:357 · packages/excalidraw/snapping.ts:401 — 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 (33 lines × 4 locations) · ×1
  • Duplicated block (33 lines × 4 locations) packages/excalidraw/actions/actionAlign.tsx:79 — packages/excalidraw/actions/actionAlign.tsx:79 · packages/excalidraw/actions/actionAlign.tsx:113 · packages/excalidraw/actions/actionAlign.tsx:147 · packages/excalidraw/actions/actionAlign.tsx:181 — all 4 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block with local edits (32 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (32 matched lines × 2 locations) excalidraw-app/share/ShareDialog.tsx:77 — excalidraw-app/share/ShareDialog.tsx:77 · packages/excalidraw/components/ShareableLinkDialog.tsx:35 — the two spans are one implementation copied and then locally edited — 141 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (32 lines × 2 locations) · ×1
  • Duplicated block (32 lines × 2 locations) packages/element/src/binding.ts:671 — packages/element/src/binding.ts:671 · packages/element/src/binding.ts:978 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (31 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (31 matched lines × 2 locations) packages/excalidraw/actions/actionHistory.tsx:75 — packages/excalidraw/actions/actionHistory.tsx:75 · packages/excalidraw/actions/actionHistory.tsx:114 — the two spans are one implementation copied and then locally edited — 174 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (31 lines × 2 locations) · ×1
  • Duplicated block (31 lines × 2 locations) packages/excalidraw/actions/actionProperties.tsx:1562 — packages/excalidraw/actions/actionProperties.tsx:1562 · packages/excalidraw/actions/actionProperties.tsx:1664 — 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 (30 lines × 2 locations) · ×1
  • Duplicated block (30 lines × 2 locations) packages/element/src/collision.ts:701 — packages/element/src/collision.ts:701 · packages/element/src/collision.ts:753 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (28 lines × 3 locations) · ×1
  • Duplicated block (28 lines × 3 locations) packages/excalidraw/components/Actions.tsx:245 — packages/excalidraw/components/Actions.tsx:245 · packages/excalidraw/components/Actions.tsx:330 · packages/excalidraw/components/Actions.tsx:512 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (27 lines × 2 locations) · ×1
  • Duplicated block (27 lines × 2 locations) packages/element/src/bounds.ts:176 — packages/element/src/bounds.ts:176 · packages/element/src/bounds.ts:210 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (26 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (26 matched lines × 2 locations) REDACTED:838 — REDACTED:838 · REDACTED:962 — the two spans are one implementation copied and then locally edited — 80 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (25 lines × 2 locations) · ×1
  • Duplicated block (25 lines × 2 locations) packages/excalidraw/snapping.ts:1031 — packages/excalidraw/snapping.ts:1031 · packages/excalidraw/snapping.ts:1057 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (24 lines × 4 locations) · ×1
  • Duplicated block (24 lines × 4 locations) packages/element/src/arrows/focus.ts:359 — packages/element/src/arrows/focus.ts:359 · packages/element/src/arrows/focus.ts:395 · packages/element/src/arrows/focus.ts:516 · packages/element/src/arrows/focus.ts:545 — 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.
R10 · Code Duplication · Duplicated block (24 lines × 3 locations) · ×1
  • Duplicated block (24 lines × 3 locations) packages/element/src/convertToShape.ts:620 — packages/element/src/convertToShape.ts:620 · packages/element/src/convertToShape.ts:658 · packages/element/src/convertToShape.ts:698 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 130, cognitive 167) · ×1
  • Complex function (anonymous) (cyclomatic 130, cognitive 167) REDACTED:9451 — (anonymous) has cyclomatic complexity 130 and cognitive complexity 167; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function renderElementToSvg (cyclomatic 85, cognitive 134) · ×1
  • Complex function renderElementToSvg (cyclomatic 85, cognitive 134) REDACTED:97 — renderElementToSvg has cyclomatic complexity 85 and cognitive complexity 134; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 73, cognitive 176) · ×1
  • Complex function (anonymous) (cyclomatic 73, cognitive 176) packages/element/src/bucketFill.ts:720 — (anonymous) has cyclomatic complexity 73 and cognitive complexity 176; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function convertToExcalidrawElements (cyclomatic 73, cognitive 110) · ×1
  • Complex function convertToExcalidrawElements (cyclomatic 73, cognitive 110) packages/element/src/transform.ts:579 — convertToExcalidrawElements has cyclomatic complexity 73 and cognitive complexity 110; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function configExportDimension (cyclomatic 72, cognitive 88) · ×1
  • Complex function configExportDimension (cyclomatic 72, cognitive 88) REDACTED:549 — configExportDimension has cyclomatic complexity 72 and cognitive complexity 88; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 69, cognitive 114) · ×1
  • Complex function (anonymous) (cyclomatic 69, cognitive 114) packages/excalidraw/renderer/interactiveScene.ts:1630 — (anonymous) has cyclomatic complexity 69 and cognitive complexity 114; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function perform (cyclomatic 69, cognitive 95) · ×1
  • Complex function perform (cyclomatic 69, cognitive 95) packages/excalidraw/actions/actionFinalize.tsx:57 — perform has cyclomatic complexity 69 and cognitive complexity 95; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function resizeMultipleElements (cyclomatic 68, cognitive 152) · ×1
  • Complex function resizeMultipleElements (cyclomatic 68, cognitive 152) packages/element/src/resizeElements.ts:1234 — resizeMultipleElements has cyclomatic complexity 68 and cognitive complexity 152; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 68, cognitive 81) · ×1
  • Complex function (anonymous) (cyclomatic 68, cognitive 81) packages/element/src/linearElementEditor.ts:2394 — (anonymous) has cyclomatic complexity 68 and cognitive complexity 81; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 66, cognitive 70) · ×1
  • Complex function (anonymous) (cyclomatic 66, cognitive 70) packages/element/src/binding.ts:670 — (anonymous) has cyclomatic complexity 66 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 65, cognitive 85) · ×1
  • Complex function (anonymous) (cyclomatic 65, cognitive 85) packages/excalidraw/components/HintViewer.tsx:49 — (anonymous) has cyclomatic complexity 65 and cognitive complexity 85; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 63, cognitive 100) · ×1
  • Complex function (anonymous) (cyclomatic 63, cognitive 100) REDACTED:8993 — (anonymous) has cyclomatic complexity 63 and cognitive complexity 100; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function startTextEditing (cyclomatic 62, cognitive 60) · ×1
  • Complex function startTextEditing (cyclomatic 62, cognitive 60) packages/excalidraw/components/App.text.ts:615 — startTextEditing has cyclomatic complexity 62 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 54, cognitive 41) · ×1
  • Complex function (anonymous) (cyclomatic 54, cognitive 41) packages/excalidraw/tests/helpers/api.ts:256 — (anonymous) has cyclomatic complexity 54 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 52, cognitive 59) · ×1
  • Complex function (anonymous) (cyclomatic 52, cognitive 59) packages/element/src/elbowArrow.ts:1675 — (anonymous) has cyclomatic complexity 52 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 51, cognitive 47) · ×1
  • Complex function (anonymous) (cyclomatic 51, cognitive 47) packages/excalidraw/data/restore.ts:547 — (anonymous) has cyclomatic complexity 51 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 50, cognitive 120) · ×1
  • Complex function (anonymous) (cyclomatic 50, cognitive 120) packages/excalidraw/components/App.selectionTool.ts:107 — (anonymous) has cyclomatic complexity 50 and cognitive complexity 120; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function estimateSegmentCount (cyclomatic 49, cognitive 80) · ×1
  • Complex function estimateSegmentCount (cyclomatic 49, cognitive 80) packages/element/src/elbowArrow.ts:1924 — estimateSegmentCount has cyclomatic complexity 49 and cognitive complexity 80; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 48, cognitive 85) · ×1
  • Complex function (anonymous) (cyclomatic 48, cognitive 85) packages/element/src/elbowArrow.ts:716 — (anonymous) has cyclomatic complexity 48 and cognitive complexity 85; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 47, cognitive 70) · ×1
  • Complex function (anonymous) (cyclomatic 47, cognitive 70) packages/element/src/elbowArrow.ts:472 — (anonymous) has cyclomatic complexity 47 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 10477 lines of code REDACTED:1 — REDACTED has 10477 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 4038 lines of code REDACTED:1 — REDACTED has 4038 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/element/src/binding.ts · ×1
  • packages/element/src/binding.ts: 2956 lines of code packages/element/src/binding.ts:1 — packages/element/src/binding.ts has 2956 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/element/src/linearElementEditor.ts · ×1
  • packages/element/src/linearElementEditor.ts: 2584 lines of code packages/element/src/linearElementEditor.ts:1 — packages/element/src/linearElementEditor.ts has 2584 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/components/icons.tsx · ×1
  • packages/excalidraw/components/icons.tsx: 2368 lines of code packages/excalidraw/components/icons.tsx:1 — packages/excalidraw/components/icons.tsx has 2368 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/actions/actionProperties.tsx · ×1
  • packages/excalidraw/actions/actionProperties.tsx: 2167 lines of code packages/excalidraw/actions/actionProperties.tsx:1 — packages/excalidraw/actions/actionProperties.tsx has 2167 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/element/src/elbowArrow.ts · ×1
  • packages/element/src/elbowArrow.ts: 2117 lines of code packages/element/src/elbowArrow.ts:1 — packages/element/src/elbowArrow.ts has 2117 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/renderer/interactiveScene.ts · ×1
  • packages/excalidraw/renderer/interactiveScene.ts: 1951 lines of code packages/excalidraw/renderer/interactiveScene.ts:1 — packages/excalidraw/renderer/interactiveScene.ts has 1951 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/element/src/delta.ts · ×1
  • packages/element/src/delta.ts: 1922 lines of code packages/element/src/delta.ts:1 — packages/element/src/delta.ts has 1922 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/element/src/bucketFill.ts · ×1
  • packages/element/src/bucketFill.ts: 1815 lines of code packages/element/src/bucketFill.ts:1 — packages/element/src/bucketFill.ts has 1815 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/types.ts · ×1
  • packages/excalidraw/types.ts: 1580 lines of code packages/excalidraw/types.ts:1 — packages/excalidraw/types.ts has 1580 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/element/src/resizeElements.ts · ×1
  • packages/element/src/resizeElements.ts: 1477 lines of code packages/element/src/resizeElements.ts:1 — packages/element/src/resizeElements.ts has 1477 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/components/App.selectionTool.ts · ×1
  • packages/excalidraw/components/App.selectionTool.ts: 1414 lines of code packages/excalidraw/components/App.selectionTool.ts:1 — packages/excalidraw/components/App.selectionTool.ts has 1414 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/element/src/bounds.ts · ×1
  • packages/element/src/bounds.ts: 1409 lines of code packages/element/src/bounds.ts:1 — packages/element/src/bounds.ts has 1409 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/fonts/Xiaolai/index.ts · ×1
  • packages/excalidraw/fonts/Xiaolai/index.ts: 1319 lines of code packages/excalidraw/fonts/Xiaolai/index.ts:1 — packages/excalidraw/fonts/Xiaolai/index.ts has 1319 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/data/restore.ts · ×1
  • packages/excalidraw/data/restore.ts: 1304 lines of code packages/excalidraw/data/restore.ts:1 — packages/excalidraw/data/restore.ts has 1304 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/element/src/renderElement.ts · ×1
  • packages/element/src/renderElement.ts: 1285 lines of code packages/element/src/renderElement.ts:1 — packages/element/src/renderElement.ts has 1285 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 1247 lines of code REDACTED:1 — REDACTED has 1247 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 1238 lines of code REDACTED:1 — REDACTED has 1238 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/snapping.ts · ×1
  • packages/excalidraw/snapping.ts: 1230 lines of code packages/excalidraw/snapping.ts:1 — packages/excalidraw/snapping.ts has 1230 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/element/src/shape.ts · ×1
  • packages/element/src/shape.ts: 1219 lines of code packages/element/src/shape.ts:1 — packages/element/src/shape.ts has 1219 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/wysiwyg/textWysiwyg.tsx · ×1
  • packages/excalidraw/wysiwyg/textWysiwyg.tsx: 1205 lines of code packages/excalidraw/wysiwyg/textWysiwyg.tsx:1 — packages/excalidraw/wysiwyg/textWysiwyg.tsx has 1205 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/common/src/utils.ts · ×1
  • packages/common/src/utils.ts: 1123 lines of code packages/common/src/utils.ts:1 — packages/common/src/utils.ts has 1123 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · excalidraw-app/collab/Collab.tsx · ×1
  • excalidraw-app/collab/Collab.tsx: 964 lines of code excalidraw-app/collab/Collab.tsx:1 — excalidraw-app/collab/Collab.tsx has 964 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/components/CommandPalette/CommandPalette.tsx · ×1
  • packages/excalidraw/components/CommandPalette/CommandPalette.tsx: 957 lines of code packages/excalidraw/components/CommandPalette/CommandPalette.tsx:1 — packages/excalidraw/components/CommandPalette/CommandPalette.tsx has 957 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/element/src/stickyNote.ts · ×1
  • packages/element/src/stickyNote.ts: 921 lines of code packages/element/src/stickyNote.ts:1 — packages/element/src/stickyNote.ts has 921 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/element/src/frame.ts · ×1
  • packages/element/src/frame.ts: 897 lines of code packages/element/src/frame.ts:1 — packages/element/src/frame.ts has 897 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/element/src/store.ts · ×1
  • packages/element/src/store.ts: 888 lines of code packages/element/src/store.ts:1 — packages/element/src/store.ts has 888 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/data/library.ts · ×1
  • packages/excalidraw/data/library.ts: 874 lines of code packages/excalidraw/data/library.ts:1 — packages/excalidraw/data/library.ts has 874 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/charts/charts.helpers.ts · ×1
  • packages/excalidraw/charts/charts.helpers.ts: 871 lines of code packages/excalidraw/charts/charts.helpers.ts:1 — packages/excalidraw/charts/charts.helpers.ts has 871 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/components/Actions.tsx · ×1
  • packages/excalidraw/components/Actions.tsx: 869 lines of code packages/excalidraw/components/Actions.tsx:1 — packages/excalidraw/components/Actions.tsx has 869 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 857 lines of code REDACTED:1 — REDACTED has 857 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/components/App.viewport.ts · ×1
  • packages/excalidraw/components/App.viewport.ts: 847 lines of code packages/excalidraw/components/App.viewport.ts:1 — packages/excalidraw/components/App.viewport.ts has 847 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/element/src/transform.ts · ×1
  • packages/element/src/transform.ts: 842 lines of code packages/element/src/transform.ts:1 — packages/element/src/transform.ts has 842 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/components/ConvertElementTypePopup.tsx · ×1
  • packages/excalidraw/components/ConvertElementTypePopup.tsx: 842 lines of code packages/excalidraw/components/ConvertElementTypePopup.tsx:1 — packages/excalidraw/components/ConvertElementTypePopup.tsx has 842 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/components/App.text.ts · ×1
  • packages/excalidraw/components/App.text.ts: 838 lines of code packages/excalidraw/components/App.text.ts:1 — packages/excalidraw/components/App.text.ts has 838 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/element/src/collision.ts · ×1
  • packages/element/src/collision.ts: 830 lines of code packages/element/src/collision.ts:1 — packages/element/src/collision.ts has 830 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/element/src/utils.ts · ×1
  • packages/element/src/utils.ts: 809 lines of code packages/element/src/utils.ts:1 — packages/element/src/utils.ts has 809 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/excalidraw/components/SearchMenu.tsx · ×1
  • packages/excalidraw/components/SearchMenu.tsx: 766 lines of code packages/excalidraw/components/SearchMenu.tsx:1 — packages/excalidraw/components/SearchMenu.tsx has 766 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/element/src/convertToShape.ts · ×1
  • packages/element/src/convertToShape.ts: 739 lines of code packages/element/src/convertToShape.ts:1 — packages/element/src/convertToShape.ts has 739 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~1230 LoC) · ×1
  • Dead file (~1230 LoC) dev-docs/src/initialData.js — no import path from any entry point (149 application, 22 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~300 LoC) · ×1
  • Dead file (~300 LoC) packages/excalidraw/data/ai/types.ts — no import path from any entry point (149 application, 22 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~71 LoC) · ×1
  • Dead file (~71 LoC) dev-docs/src/components/Homepage/index.tsx — no import path from any entry point (149 application, 22 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~63 LoC) · ×1
  • Dead file (~63 LoC) dev-docs/src/components/Homepage/index.js — no import path from any entry point (149 application, 22 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~30 LoC) · ×1
  • Dead file (~30 LoC) packages/excalidraw/components/ButtonIconCycle.tsx — no import path from any entry point (149 application, 22 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~21 LoC) · ×1
  • Dead file (~21 LoC) scripts/buildDocs.js — no import path from any entry point (149 application, 22 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~15 LoC) · ×1
  • Dead file (~15 LoC) dev-docs/src/components/Highlight.js — no import path from any entry point (149 application, 22 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~10 LoC) · ×1
  • Dead file (~10 LoC) packages/excalidraw/components/Paragraph.tsx — no import path from any entry point (149 application, 22 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unlisted import '@docusaurus/plugin-content-docs' · ×1
  • Unlisted import '@docusaurus/plugin-content-docs' dev-docs/sidebars.js:14 — Imported only as a TYPE and declared in no reachable REDACTED. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning REDACTED.
R8 · Dependency Hygiene · Unlisted import '@docusaurus/types' · ×1
  • Unlisted import '@docusaurus/types' dev-docs/docusaurus.config.js:9 — Imported only as a TYPE and declared in no reachable REDACTED. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning REDACTED.
R8 · Dependency Hygiene · Unused dependency 'chai' · ×1
  • Unused dependency 'chai' — Declared in the root REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@docusaurus/module-type-aliases' · ×1
  • Unused dependency '@docusaurus/module-type-aliases' — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@mdx-js/react' · ×1
  • Unused dependency '@mdx-js/react' — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
S1 · Web-Security Posture · Weak hash algorithm · ×1
  • Weak hash algorithm packages/excalidraw/data/blob.ts:265 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Minor — 210 finding(s)
M4 · Documentation accuracy · README/code drift · ×37
  • README/code drift dev-docs/README.md:32 — dev-docs/README.md documents the environment variable `USE_SSH`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift packages/excalidraw/README.md:15 — packages/excalidraw/README.md names the package `@excalidraw/excalidraw@next`, but no REDACTED of the workspace declares or depends on it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/introduction/get-started.mdx:14 — dev-docs/docs/introduction/get-started.mdx links to `/docs/`, but `docs` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/introduction/get-started.mdx:15 — dev-docs/docs/introduction/get-started.mdx links to `/docs/@excalidraw/excalidraw/installation`, but `docs/@excalidraw/excalidraw/installation` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/introduction/get-started.mdx:17 — dev-docs/docs/introduction/get-started.mdx links to `/docs/@excalidraw/mermaid-to-excalidraw/installation`, but `docs/@excalidraw/mermaid-to-excalidraw/installation` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift packages/excalidraw/locales/README.md:10 — packages/excalidraw/locales/README.md links to `./../../REDACTED`, but `packages/REDACTED` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/excalidraw/development.mdx:39 — dev-docs/docs/@excalidraw/excalidraw/development.mdx names the package `@excalidraw/*`, but no REDACTED of the workspace declares or depends on it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/excalidraw/installation.mdx:15 — dev-docs/docs/@excalidraw/excalidraw/installation.mdx names the package `@excalidraw/excalidraw@next`, but no REDACTED of the workspace declares or depends on it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/mermaid-to-excalidraw/api.mdx:5 — dev-docs/docs/@excalidraw/mermaid-to-excalidraw/api.mdx links to `/docs/@excalidraw/excalidraw/installation`, but `docs/@excalidraw/excalidraw/installation` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/excalidraw/api/api-intro.mdx:9 — dev-docs/docs/@excalidraw/excalidraw/api/api-intro.mdx links to `/docs/@excalidraw/excalidraw/api/props`, but `docs/@excalidraw/excalidraw/api/props` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/excalidraw/api/api-intro.mdx:10 — dev-docs/docs/@excalidraw/excalidraw/api/api-intro.mdx links to `/docs/@excalidraw/excalidraw/api/children-components`, but `docs/@excalidraw/excalidraw/api/children-components` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/excalidraw/api/api-intro.mdx:11 — dev-docs/docs/@excalidraw/excalidraw/api/api-intro.mdx links to `/docs/@excalidraw/excalidraw/api/utils`, but `docs/@excalidraw/excalidraw/api/utils` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/excalidraw/api/excalidraw-element-skeleton.mdx:7 — dev-docs/docs/@excalidraw/excalidraw/api/excalidraw-element-skeleton.mdx links to `/docs/@excalidraw/excalidraw/api/excalidraw-element-skeleton#converttoexcalidrawelements`, but `docs/@excalidraw/excalidraw/api/excalidraw-element-skeleton` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/mermaid-to-excalidraw/codebase/codebase.mdx:5 — dev-docs/docs/@excalidraw/mermaid-to-excalidraw/codebase/codebase.mdx links to `/docs/@excalidraw/mermaid-to-excalidraw/codebase/parser`, but `docs/@excalidraw/mermaid-to-excalidraw/codebase/parser` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/mermaid-to-excalidraw/codebase/codebase.mdx:7 — dev-docs/docs/@excalidraw/mermaid-to-excalidraw/codebase/codebase.mdx links to `/docs/@excalidraw/mermaid-to-excalidraw/codebase/new-diagram-type`, but `docs/@excalidraw/mermaid-to-excalidraw/codebase/new-diagram-type` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/mermaid-to-excalidraw/codebase/new-diagram-type.mdx:17 — dev-docs/docs/@excalidraw/mermaid-to-excalidraw/codebase/new-diagram-type.mdx documents the environment variable `SUPPORTED_DIAGRAM_TYPES`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx:18 — dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx links to `/docs/@excalidraw/excalidraw/api/children-components/main-menu`, but `docs/@excalidraw/excalidraw/api/children-components/main-menu` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx:19 — dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx links to `/docs/@excalidraw/excalidraw/api/children-components/welcome-screen`, but `docs/@excalidraw/excalidraw/api/children-components/welcome-screen` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx:20 — dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx links to `/docs/@excalidraw/excalidraw/api/children-components/sidebar`, but `docs/@excalidraw/excalidraw/api/children-components/sidebar` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx:21 — dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx links to `/docs/@excalidraw/excalidraw/api/children-components/footer`, but `docs/@excalidraw/excalidraw/api/children-components/footer` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx:22 — dev-docs/docs/@excalidraw/excalidraw/api/children-components/children-components-intro.mdx links to `/docs/@excalidraw/excalidraw/api/children-components/live-collaboration-trigger`, but `docs/@excalidraw/excalidraw/api/children-components/live-collaboration-trigger` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/excalidraw/api/children-components/live-collaboration-trigger.mdx:3 — dev-docs/docs/@excalidraw/excalidraw/api/children-components/live-collaboration-trigger.mdx links to `/docs/@excalidraw/excalidraw/api/props#rendertoprightui`, but `docs/@excalidraw/excalidraw/api/props` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/excalidraw/api/children-components/sidebar.mdx:83 — dev-docs/docs/@excalidraw/excalidraw/api/children-components/sidebar.mdx links to `/docs/@excalidraw/excalidraw/api/props/excalidraw-api#toggleSidebar`, but `docs/@excalidraw/excalidraw/api/props/excalidraw-api` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/excalidraw/api/children-components/welcome-screen.mdx:84 — dev-docs/docs/@excalidraw/excalidraw/api/children-components/welcome-screen.mdx links to `/docs/@excalidraw/excalidraw/api/children-components/live-collaboration-trigger`, but `docs/@excalidraw/excalidraw/api/children-components/live-collaboration-trigger` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift dev-docs/docs/@excalidraw/excalidraw/api/props/excalidraw-api.mdx:393 — dev-docs/docs/@excalidraw/excalidraw/api/props/excalidraw-api.mdx links to `/docs/@excalidraw/excalidraw/api/children-components/sidebar`, but `docs/@excalidraw/excalidraw/api/children-components/sidebar` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • + 12 more in this group — see findings.md.
D34 · Knowledge Freshness · Orphaned file · ×27
  • Orphaned file packages/excalidraw/actions/actionAlign.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/excalidraw/fonts/Excalifont/index.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/excalidraw/history.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/excalidraw/actions/actionElementLock.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file excalidraw-app/ExcalidrawPlusIframeExport.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/excalidraw/components/Trans.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/excalidraw/components/ElementLinkDialog.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/common/src/font-metadata.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file dev-docs/docusaurus.config.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/excalidraw/deburr.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/excalidraw/components/canvases/StaticCanvas.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file excalidraw-app/components/TopErrorBoundary.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/excalidraw/workers.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/excalidraw/subset/subset-main.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file dev-docs/sidebars.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/element/src/positionElementsOnGrid.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/common/src/keys.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/excalidraw/data/reconcile.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/excalidraw/components/TTDDialog/TTDDialogPanel.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/excalidraw/components/PropertiesPopover.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/excalidraw/actions/actionElementLink.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/excalidraw/subset/subset-shared.chunk.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/excalidraw/components/ConfirmDialog.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 2 more in this group — see findings.md.
IC1 · Incompleteness & stubs · Disabled test · ×27
  • Disabled test packages/element/tests/binding.test.tsx:584 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/frame.test.tsx:489 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/frame.test.tsx:533 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/frame.test.tsx:578 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/frame.test.tsx:589 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/frame.test.tsx:600 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/frame.test.tsx:657 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/frame.test.tsx:707 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/frame.test.tsx:727 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/frame.test.tsx:739 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/frame.test.tsx:750 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/frame.test.tsx:761 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/frame.test.tsx:1143 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/frame.test.tsx:1157 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/resize.test.tsx:750 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/resize.test.tsx:766 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/sortElements.test.ts:385 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/element/tests/sortElements.test.ts:413 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/excalidraw/tests/flip.test.tsx:480 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/excalidraw/tests/flip.test.tsx:491 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/excalidraw/tests/flip.test.tsx:506 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/excalidraw/tests/flip.test.tsx:515 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/excalidraw/tests/flip.test.tsx:579 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/excalidraw/tests/flip.test.tsx:590 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test packages/excalidraw/tests/flip.test.tsx:599 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • + 2 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate packages/excalidraw/components/Stats/Dimension.tsx:70 — `!element || !isImageElement(element) || !element.crop` appears character-identically in 2 files — packages/excalidraw/components/Stats/Dimension.tsx, packages/excalidraw/components/Stats/Position.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:5568 — `!event[KEYS.CTRL_OR_CMD] && event.shiftKey && event.key.toLowerCase() === KEYS.F` appears character-identically in 2 files — REDACTED, packages/excalidraw/components/FontPicker/keyboardNavHandlers.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/excalidraw/data/image.ts:57 — `"type" in encodedData && encodedData.type === EXPORT_DATA_TYPES.excalidraw` appears character-identically in 2 files — packages/excalidraw/data/image.ts, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/element/src/collision.ts:836 — `(isLinearElement(element) || isFreeDrawElement(element)) && !isPathALoop(element.points)` appears character-identically in 2 files — packages/element/src/collision.ts, packages/element/src/visualdebug.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/excalidraw/components/HintViewer.tsx:86 — `activeTool.type === "arrow" || activeTool.type === "line"` appears character-identically in 2 files — packages/excalidraw/components/HintViewer.tsx, packages/excalidraw/components/MobileToolbar.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/excalidraw/actions/actionProperties.tsx:494 — `appState.editingTextElement && elementsMap.get(appState.editingTextElement.id)` appears character-identically in 2 files — packages/excalidraw/actions/actionProperties.tsx, packages/excalidraw/actions/colorTargets.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/excalidraw/components/Stats/Angle.tsx:55 — `boundTextElement && !isArrowElement(latestElement)` appears character-identically in 2 files — packages/excalidraw/components/Stats/Angle.tsx, packages/excalidraw/components/Stats/MultiAngle.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/element/src/textElement.ts:62 — `container && isStickyNoteElement(container)` appears character-identically in 2 files — packages/element/src/textElement.ts, packages/excalidraw/components/App.text.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/excalidraw/components/Dialog.tsx:82 — `currentIndex === focusableElements.length - 1 && !event.shiftKey` appears character-identically in 2 files — packages/excalidraw/components/Dialog.tsx, packages/excalidraw/components/Popover.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/excalidraw/components/ColorPicker/TopPicks.tsx:100 — `dragState?.origin.kind === "pick" && dragState.origin.index === index` appears character-identically in 2 files — packages/excalidraw/components/ColorPicker/TopPicks.tsx, packages/excalidraw/components/FontPicker/FontPicker.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/excalidraw/components/ColorPicker/TopPicks.tsx:103 — `dragState?.origin.kind === "source" && dragState.overIndex === index` appears character-identically in 2 files — packages/excalidraw/components/ColorPicker/TopPicks.tsx, packages/excalidraw/components/FontPicker/FontPicker.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/element/src/bounds.ts:1523 — `element.frameId && framesInSelection.has(element.frameId)` appears character-identically in 2 files — packages/element/src/bounds.ts, packages/element/src/selection.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/element/src/store.ts:603 — `elementsContainVisibleChange || appStateContainsVisibleChange` appears character-identically in 2 files — packages/element/src/store.ts, packages/excalidraw/history.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:2226 — `event.key === KEYS.ESCAPE || event.key === KEYS.ENTER` appears character-identically in 2 files — REDACTED, packages/excalidraw/components/IconPicker.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/excalidraw/actions/actionToggleSearchMenu.ts:57 — `event[KEYS.CTRL_OR_CMD] && event.key === KEYS.F` appears character-identically in 2 files — packages/excalidraw/actions/actionToggleSearchMenu.ts, packages/excalidraw/components/SearchMenu.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/excalidraw/actions/actionLink.tsx:40 — `event[KEYS.CTRL_OR_CMD] && event.key === KEYS.K` appears character-identically in 2 files — packages/excalidraw/actions/actionLink.tsx, packages/excalidraw/components/hyperlink/Hyperlink.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/element/src/Scene.ts:69 — `isDevEnv() || isTestEnv() || window?.DEBUG_FRACTIONAL_INDICES` appears character-identically in 2 files — packages/element/src/Scene.ts, packages/excalidraw/data/reconcile.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate excalidraw-app/components/ExportToExcalidrawPlus.tsx:61 — `isInitializedImageElement(element) && files[element.fileId]` appears character-identically in 5 files — excalidraw-app/components/ExportToExcalidrawPlus.tsx, excalidraw-app/data/FileManager.ts, excalidraw-app/data/index.ts, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/element/src/linearElementEditor.ts:1590 — `isLineElement(element) && element.polygon` appears character-identically in 2 files — packages/element/src/linearElementEditor.ts, packages/excalidraw/actions/actionLinearEditor.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/element/src/bounds.ts:1050 — `isLinearElement(element) || isFreeDrawElement(element)` appears character-identically in 5 files — packages/element/src/bounds.ts, packages/element/src/bucketFill.ts, packages/element/src/resizeElements.ts, packages/element/src/sizeHelpers.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/excalidraw/actions/actionDeleteSelected.tsx:336 — `isMobile && appState.openPopup !== "compactOtherProperties"` appears character-identically in 2 files — packages/excalidraw/actions/actionDeleteSelected.tsx, packages/excalidraw/actions/actionDuplicateSelection.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/element/src/delta.ts:1472 — `isTextElement(element) && element.containerId` appears character-identically in 6 files — packages/element/src/delta.ts, packages/element/src/frame.ts, packages/element/src/stickyNote.ts, packages/excalidraw/actions/actionProperties.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/excalidraw/renderer/staticScene.ts:472 — `isTextElement(element) && element.containerId && elementsMap.has(element.containerId)` appears character-identically in 2 files — packages/excalidraw/renderer/staticScene.ts, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/excalidraw/components/Stats/Dimension.tsx:298 — `latestElement && isFrameLikeElement(latestElement)` appears character-identically in 2 files — packages/excalidraw/components/Stats/Dimension.tsx, packages/excalidraw/components/Stats/MultiDimension.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/element/src/bounds.ts:1257 — `minX1 < maxX2 && maxX1 > minX2 && minY1 < maxY2 && maxY1 > minY2` appears character-identically in 2 files — packages/element/src/bounds.ts, packages/math/src/rectangle.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D12 · Dependency Hygiene · Deprecated · ×23
  • Deprecated: @babel/plugin-proposal-class-properties REDACTED:299 — @babel/plugin-proposal-class-properties 7.18.6 is resolved in REDACTED and is marked deprecated by its publisher: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @babel/plugin-proposal-nullish-coalescing-operator REDACTED:316 — @babel/plugin-proposal-nullish-coalescing-operator 7.18.6 is resolved in REDACTED and is marked deprecated by its publisher: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @babel/plugin-proposal-numeric-separator REDACTED:324 — @babel/plugin-proposal-numeric-separator 7.18.6 is resolved in REDACTED and is marked deprecated by its publisher: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @babel/plugin-proposal-optional-chaining REDACTED:332 — @babel/plugin-proposal-optional-chaining 7.21.0 is resolved in REDACTED and is marked deprecated by its publisher: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @babel/plugin-proposal-private-methods REDACTED:341 — @babel/plugin-proposal-private-methods 7.18.6 is resolved in REDACTED and is marked deprecated by its publisher: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @babel/plugin-proposal-private-property-in-object REDACTED:354 — @babel/plugin-proposal-private-property-in-object 7.21.11 is resolved in REDACTED and is marked deprecated by its publisher: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @humanwhocodes/config-array REDACTED:1990 — @humanwhocodes/config-array 0.5.0 is resolved in REDACTED and is marked deprecated by its publisher: "Use @eslint/config-array instead". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @humanwhocodes/object-schema REDACTED:1999 — @humanwhocodes/object-schema 1.2.1 is resolved in REDACTED and is marked deprecated by its publisher: "Use @eslint/object-schema instead". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @xmldom/xmldom REDACTED:4121 — @xmldom/xmldom 0.8.10 is resolved in REDACTED and is marked deprecated by its publisher: "this version has critical issues, please update to the latest version". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: abab REDACTED:4136 — abab 2.0.6 is resolved in REDACTED and is marked deprecated by its publisher: "Use your platform's native atob() and btoa() methods instead". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: domexception REDACTED:5604 — domexception 1.0.1 is resolved in REDACTED and is marked deprecated by its publisher: "Use your platform's native DOMException instead". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: domexception REDACTED:5611 — domexception 4.0.0 is resolved in REDACTED and is marked deprecated by its publisher: "Use your platform's native DOMException instead". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: eslint REDACTED:6207 — eslint 7.32.0 is resolved in REDACTED and is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: glob REDACTED:6727 — glob 10.4.5 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: glob REDACTED:6739 — glob 7.2.3 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: inflight REDACTED:7027 — inflight 1.0.6 is resolved in REDACTED and is marked deprecated by its publisher: "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: next REDACTED:8016 — next 14.1.4 is resolved in REDACTED and is marked deprecated by its publisher: "This version has a security vulnerability. Please upgrade to a patched version. See https://nextjs.org/blog/security-update-2025-12-11 for more details.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: realistic-structured-clone REDACTED:8796 — realistic-structured-clone 2.0.4 is resolved in REDACTED and is marked deprecated by its publisher: "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: rimraf REDACTED:8961 — rimraf 3.0.2 is resolved in REDACTED and is marked deprecated by its publisher: "Rimraf versions prior to v4 are no longer supported". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: sliced REDACTED:9328 — sliced 1.0.1 is resolved in REDACTED and is marked deprecated by its publisher: "Unsupported". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: source-map REDACTED:9392 — source-map 0.8.0-beta.0 is resolved in REDACTED and is marked deprecated by its publisher: "The work that was done in this beta branch won't be included in future versions". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: sourcemap-codec REDACTED:9399 — sourcemap-codec 1.4.8 is resolved in REDACTED and is marked deprecated by its publisher: "Please use @jridgewell/sourcemap-codec instead". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: whatwg-encoding REDACTED:10445 — whatwg-encoding 2.0.0 is resolved in REDACTED and is marked deprecated by its publisher: "Use @exodus/bytes instead for a more spec-conformant and faster implementation". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
D30 · Dependency Vulnerabilities · Low CVE · ×12
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D10 · Test Quality · Mock-dominated test · ×3
  • Mock-dominated test: preserves a pending visual update when followed by an equivalent snapshot packages/excalidraw/tests/renderOverrides.test.tsx:187 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 2 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: clips a translated child against the translated frame boundary packages/excalidraw/tests/renderOverrides.test.tsx:1063 — This test sets up 3 test doubles (for example `vi.spyOn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: binds top-picks drag interactions to the source window packages/excalidraw/tests/crossDocument.test.tsx:78 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
D12 · Dependency Hygiene · Outdated (npm) · ×3
  • Outdated (npm): cross-env REDACTED:96 — cross-env is pinned at 7.0.3; registry.npmjs.org publishes 10.1.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): nanoid REDACTED:104 — nanoid is pinned at 3.3.3; registry.npmjs.org publishes 6.0.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): pica REDACTED:107 — pica is pinned at 7.1.1; registry.npmjs.org publishes 10.0.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
IC1 · Incompleteness & stubs · Blanket warning suppression · ×3
  • Blanket warning suppression packages/excalidraw/polyfill.ts:4 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression REDACTED:1 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression REDACTED:2 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
X7 · Silent fallback defaults · Silent fallback default in catch · ×2
  • Silent fallback default in catch REDACTED:186 — `getFormat` swallows every exception into `return ""` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch scripts/build-version.js:16 — `commitHash` swallows every exception into `return "none"` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 17 significant file(s) lose their only recent owner: packages/excalidraw/components/App.viewport.ts, packages/element/src/duplicate.ts, packages/excalidraw/components/App.duplicate.ts, packages/excalidraw/components/App.toolDrag.ts, packages/excalidraw/components/App.wheel.ts, packages/excalidraw/components/ColorPicker/Picker.tsx, packages/excalidraw/components/IconButton.tsx, packages/excalidraw/components/TTDDialog/Chat/ChatInterface.tsx (+9 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (19 single-owned of 288 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 288 of the 510 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: packages/element/src/arrows/focus.ts, packages/element/src/visualdebug.ts.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 2 of 10 project(s) overshoot their size bounds, lowering Project Cohesion to 6.0/10. The most over is `packages/excalidraw` (79557 LoC, 414 module-visible types across 38 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 27 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: packages/excalidraw/actions/actionAlign.tsx, packages/excalidraw/fonts/Excalifont/index.ts, packages/excalidraw/history.ts, packages/excalidraw/actions/actionElementLock.ts, excalidraw-app/ExcalidrawPlusIframeExport.tsx, REDACTED, packages/excalidraw/components/Trans.tsx, packages/excalidraw/components/ElementLinkDialog.tsx (and 19 more) (30 orphaned of 288 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 288 of the 510 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 10892 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate — Deployment is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever reaches the release trigger goes to production unreviewed, so a mistaken merge or tag is live before anyone can stop it.
R7 · Dead Code · Unused export 'EncryptedData' · ×1
  • Unused export 'EncryptedData' excalidraw-app/data/index.ts:74 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'SocketUpdateDataIncoming' · ×1
  • Unused export 'SocketUpdateDataIncoming' excalidraw-app/data/index.ts:123 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'actionChangeViewBackgroundColor' · ×1
  • Unused export 'actionChangeViewBackgroundColor' packages/excalidraw/actions/actionCanvas.tsx:47 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/excalidraw/actions/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/excalidraw/actions/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'actionZoomToFitSelectionInViewport' · ×1
  • Unused export 'actionZoomToFitSelectionInViewport' packages/excalidraw/actions/actionCanvas.tsx:311 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'actionDeselect' · ×1
  • Unused export 'actionDeselect' packages/excalidraw/actions/actionDeselect.ts:65 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/excalidraw/actions/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/excalidraw/actions/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'actionupdateFrameRendering' · ×1
  • Unused export 'actionupdateFrameRendering' packages/excalidraw/actions/actionFrame.ts:120 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'actionTogglePolygon' · ×1
  • Unused export 'actionTogglePolygon' packages/excalidraw/actions/actionLinearEditor.tsx:106 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'actionGoToCollaborator' · ×1
  • Unused export 'actionGoToCollaborator' packages/excalidraw/actions/actionNavigate.tsx:21 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/excalidraw/actions/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/excalidraw/actions/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'actionChangeFillStyle' · ×1
  • Unused export 'actionChangeFillStyle' packages/excalidraw/actions/actionProperties.tsx:611 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/excalidraw/actions/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/excalidraw/actions/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'actionChangeStrokeWidth' · ×1
  • Unused export 'actionChangeStrokeWidth' packages/excalidraw/actions/actionProperties.tsx:713 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/excalidraw/actions/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/excalidraw/actions/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'actionChangeSloppiness' · ×1
  • Unused export 'actionChangeSloppiness' packages/excalidraw/actions/actionProperties.tsx:771 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/excalidraw/actions/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/excalidraw/actions/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'actionChangeFreedrawMode' · ×1
  • Unused export 'actionChangeFreedrawMode' packages/excalidraw/actions/actionProperties.tsx:825 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/excalidraw/actions/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/excalidraw/actions/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'actionChangeStrokeStyle' · ×1
  • Unused export 'actionChangeStrokeStyle' packages/excalidraw/actions/actionProperties.tsx:906 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'actionChangeOpacity' · ×1
  • Unused export 'actionChangeOpacity' packages/excalidraw/actions/actionProperties.tsx:961 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/excalidraw/actions/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/excalidraw/actions/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'actionChangeFontFamily' · ×1
  • Unused export 'actionChangeFontFamily' packages/excalidraw/actions/actionProperties.tsx:1165 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/excalidraw/actions/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/excalidraw/actions/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'actionChangeTextAlign' · ×1
  • Unused export 'actionChangeTextAlign' packages/excalidraw/actions/actionProperties.tsx:1558 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/excalidraw/actions/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/excalidraw/actions/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'actionChangeVerticalAlign' · ×1
  • Unused export 'actionChangeVerticalAlign' packages/excalidraw/actions/actionProperties.tsx:1660 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/excalidraw/actions/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/excalidraw/actions/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'actionChangeArrowhead' · ×1
  • Unused export 'actionChangeArrowhead' packages/excalidraw/actions/actionProperties.tsx:1957 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'actionChangeArrowProperties' · ×1
  • Unused export 'actionChangeArrowProperties' packages/excalidraw/actions/actionProperties.tsx:2051 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/excalidraw/actions/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/excalidraw/actions/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'actionChangeArrowType' · ×1
  • Unused export 'actionChangeArrowType' packages/excalidraw/actions/actionProperties.tsx:2070 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'actionToggleWrap' · ×1
  • Unused export 'actionToggleWrap' packages/excalidraw/actions/actionToggleWrap.ts:5 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/excalidraw/actions/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/excalidraw/actions/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'ActionFilterFn' · ×1
  • Unused export 'ActionFilterFn' packages/excalidraw/actions/types.ts:43 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'ExportCB' · ×1
  • Unused export 'ExportCB' packages/excalidraw/components/JSONExportDialog.tsx:24 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'RadioGroupProps' · ×1
  • Unused export 'RadioGroupProps' packages/excalidraw/components/RadioGroup.tsx:11 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'newOrigin' · ×1
  • Unused export 'newOrigin' packages/excalidraw/components/Stats/utils.ts:78 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'MermaidData' · ×1
  • Unused export 'MermaidData' packages/excalidraw/components/TTDDialog/types.ts:16 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'TTTDDialog' · ×1
  • Unused export 'TTTDDialog' packages/excalidraw/components/TTDDialog/types.ts:91 — No runtime consumer imports this binding — the only demand on it comes from a type-position import of its module, which asks for the module's type surface rather than for this name. If the value is genuinely unneeded, remove it; if a consumer needs only its TYPE, export that type (e.g. `export type X = typeof x`) and drop the value. A value export — a const, a function, a class — cannot itself be rewritten as `export type`.
R7 · Dead Code · Unused export 'clipboard' · ×1
  • Unused export 'clipboard' packages/excalidraw/components/icons.tsx:617 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'palette' · ×1
  • Unused export 'palette' packages/excalidraw/components/icons.tsx:622 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'zoomIn' · ×1
  • Unused export 'zoomIn' packages/excalidraw/components/icons.tsx:668 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'zoomOut' · ×1
  • Unused export 'zoomOut' packages/excalidraw/components/icons.tsx:673 — Nothing imports this binding — it is safe to review for removal.
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 1/7 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Strict null checking is not enabled everywhere the repository type-checks · ×1
  • Strict null checking is not enabled everywhere the repository type-checks — 10/11 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
X5 · Nullable reference types · Null assertions (`!`) reduce the strict null checking score · ×1
  • Null assertions (`!`) reduce the strict null checking score — ~1.4 `!` null assertions per 1k TypeScript source lines — 207 assertion(s) across the 144790 source line(s) of the 497 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: REDACTED (23), packages/element/src/linearElementEditor.ts (14), packages/element/src/elbowArrow.ts (8). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×1
  • Hand-rolled JSON/XML parsing via regex packages/excalidraw/components/HintViewer.tsx:323 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Minor — 37 finding(s)
D12 · Dependency Hygiene · Outdated (npm) · ×34
  • Outdated (npm): @braintree/sanitize-url — @braintree/sanitize-url is pinned at 6.0.2; registry.npmjs.org publishes 7.1.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @codemirror/commands — @codemirror/commands is pinned at 6.10.2; registry.npmjs.org publishes 6.11.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @codemirror/language — @codemirror/language is pinned at 6.12.2; registry.npmjs.org publishes 6.13.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @codemirror/state — @codemirror/state is pinned at 6.5.4; registry.npmjs.org publishes 6.7.6 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @codemirror/view — @codemirror/view is pinned at 6.39.16; registry.npmjs.org publishes 6.43.15 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @docusaurus/core — @docusaurus/core is pinned at 2.2.0; registry.npmjs.org publishes 3.10.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @docusaurus/preset-classic — @docusaurus/preset-classic is pinned at 2.2.0; registry.npmjs.org publishes 3.10.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @docusaurus/theme-live-codeblock — @docusaurus/theme-live-codeblock is pinned at 2.2.0; registry.npmjs.org publishes 3.10.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @excalidraw/excalidraw — @excalidraw/excalidraw is pinned at 0.18.0; registry.npmjs.org publishes 0.18.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @excalidraw/laser-pointer — @excalidraw/laser-pointer is pinned at 1.3.1; registry.npmjs.org publishes 1.3.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @excalidraw/mermaid-to-excalidraw — @excalidraw/mermaid-to-excalidraw is pinned at 2.2.2; registry.npmjs.org publishes 2.3.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @excalidraw/random-username — @excalidraw/random-username is pinned at 1.1.0; registry.npmjs.org publishes 1.2.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @lezer/highlight — @lezer/highlight is pinned at 1.2.3; registry.npmjs.org publishes 1.2.5 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @mdx-js/react — @mdx-js/react is pinned at 1.6.22; registry.npmjs.org publishes 3.1.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @sentry/browser — @sentry/browser is pinned at 9.0.1; registry.npmjs.org publishes 11.8.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): clsx — clsx is pinned at 1.2.1; registry.npmjs.org publishes 2.1.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): docusaurus-plugin-sass — docusaurus-plugin-sass is pinned at 0.2.3; registry.npmjs.org publishes 0.2.7 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): firebase — firebase is pinned at 11.3.1; registry.npmjs.org publishes 13.1.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): i18next-browser-languagedetector — i18next-browser-languagedetector is pinned at 6.1.4; registry.npmjs.org publishes 8.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): idb-keyval — idb-keyval is pinned at 6.0.3; registry.npmjs.org publishes 6.3.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): image-blob-reduce — image-blob-reduce is pinned at 3.0.1; registry.npmjs.org publishes 5.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): jotai — jotai is pinned at 2.11.0; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): jotai-scope — jotai-scope is pinned at 0.7.2; registry.npmjs.org publishes 0.12.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): next — next is pinned at 14.1.4; registry.npmjs.org publishes 16.4.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): pako — pako is pinned at 2.0.3; registry.npmjs.org publishes 3.0.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • + 9 more in this group — see findings.md.
D10 · Test Quality · Skipped (documented) · ×2
  • Skipped (documented): should not rotate the bound text and update position of bound text and bounding box correctly when arrow rotated packages/element/tests/linearElementEditor.test.tsx:1401 — Skipped with a documented reason — a deferral, not lazy debt: declared with it.todo — a placeholder that registers a name and runs nothing
  • Skipped (documented): (unnamed test) packages/excalidraw/tests/test-utils.ts:277 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: @excalidraw/common — @excalidraw/common: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.

Appendix B — Reproduction & audit trail

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

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

Run 01a16786-089c-7aa6-a7bf-a09b2d95cea0 · 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