Public report of storytold/figcraft, published 7 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.2). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 7 November 2026, 01:58 UTC · Survey ID cd_61bbdf1847864e4e854219ff86c90bd4
storytold/figcraft
Measured 7 November 2026, 01:58 UTC, at code version 0b97f3f
First survey, so nothing to compare with yet
CAI scoreAt risk
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: 201,084 lines of product code in 23 projects, tests not counted · Estimated rebuild effort: about 2.8 person-years · Weakest lens: Production Readiness, 61
Findings by how serious they are
14 critical1387 serious57 minor
22 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
7 November 2026, 01:58 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
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. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
52of 52 dimensions measured by tools.
1431of 1458 findings point to an exact file and line, so you can open each one in the code. The other 27 concern the repository as a whole, such as missing documentation.
52dimensions across 7 lenses, read from 201,084 lines of product code in 23 projects.
storytold/figcraft is rated At risk because critical security findings are open, most of them in the build pipeline. It scores 68 out of 100, which the At risk rating leaves unchanged. We judged it as a preview release, against a lower bar.
Production Readiness, at 61, is the weakest lens and counts most in the score. The best first step for the work it takes is recording design decisions, worth about 2 points. Documenting the recovery plan would lift Production Readiness itself, worth about 3 points. Raising Production Readiness to 62 would lift the score to about 69.
Eight pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. One automatic update takes new releases before a bad one can be spotted, and one known security hole in a package the code depends on can be used by attackers. Pinning each tool to an exact version, setting a waiting period for automatic updates and updating the vulnerable packages would close these risks. Limiting each secret to its own step would fix the secret exposed to more of the pipeline than needed, and the password or key in the code's history needs replacing, with the old one switched off. The set of files in separate parts that keep changing together needs that dependency made explicit.
The product code is 201,084 lines, about €410,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Production Readiness rose from 61 to 62, the lowest score rated Strong, the score would rise from 68 to about 69.
Code composition: what the lines of code are
Product code 62%Tests 38%
Rebuild cost: about €410,000 · Estimate
Cost to rebuild
€140,000 to €680,000, for 2,272 to 7,209 hours of work, about 2.8 person-years for 1 to 6 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×1.0 at a score of 68. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 201,084 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 2 points · Low effort · ADR Quality
2
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.
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Raises the score by about 3 points · Medium effort · DR & Backup
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €410,000 to build again, about 2.8 person-years of work. Its weakest lens is Production Readiness, at 61 (Adequate). 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 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 2 points for low effort, because it clears the 1 ADR Quality 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 6.1 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 10% on every change. The history of the code shows how much it changes: about 541,810 lines over the last 90 days, which is about 2,197,341 lines a year. At that pace, the extra work comes to an estimated 256.2 to 1537.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
479 modules, with 1522 dependencies between them. 11 loops run through 87 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 439 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
figcraft_color uses figcraft_color.blend, so a change to figcraft_color.blend can break figcraft_color, while a change to figcraft_color can't break figcraft_color.blend.
Position
Below the diagonal: figcraft_color uses a module listed above it, which is the healthy direction.
figcraft_doc.board uses figcraft_color, so a change to figcraft_color can break figcraft_doc.board, while a change to figcraft_doc.board can't break figcraft_color.
Position
Below the diagonal: figcraft_doc.board uses a module listed above it, which is the healthy direction.
6→17 figcraft_doc.board uses figcraft_docpart of a loop✕
Connections
1 pair of types, where a type in figcraft_doc.board uses a type in figcraft_doc.
The types involved
figcraft_doc.board.End → figcraft_doc.NodeId
Direction
figcraft_doc.board uses figcraft_doc, so a change to figcraft_doc can break figcraft_doc.board, while a change to figcraft_doc.board can't break figcraft_doc.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
figcraft_doc.props uses figcraft_color.blend, so a change to figcraft_color.blend can break figcraft_doc.props, while a change to figcraft_doc.props can't break figcraft_color.blend.
Position
Below the diagonal: figcraft_doc.props uses a module listed above it, which is the healthy direction.
figcraft_doc.props uses figcraft_color, so a change to figcraft_color can break figcraft_doc.props, while a change to figcraft_doc.props can't break figcraft_color.
Position
Below the diagonal: figcraft_doc.props uses a module listed above it, which is the healthy direction.
figcraft_doc.styles uses figcraft_color, so a change to figcraft_color can break figcraft_doc.styles, while a change to figcraft_doc.styles can't break figcraft_color.
Position
Below the diagonal: figcraft_doc.styles uses a module listed above it, which is the healthy direction.
figcraft_doc.text uses figcraft_color, so a change to figcraft_color can break figcraft_doc.text, while a change to figcraft_doc.text can't break figcraft_color.
Position
Below the diagonal: figcraft_doc.text uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.theme uses figcraft_engine.keymap, so a change to figcraft_engine.keymap can break figcraft_ui_egui.theme, while a change to figcraft_ui_egui.theme can't break figcraft_engine.keymap.
Position
Below the diagonal: figcraft_ui_egui.theme uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.theme uses figcraft_color, so a change to figcraft_color can break figcraft_ui_egui.theme, while a change to figcraft_ui_egui.theme can't break figcraft_color.
Position
Below the diagonal: figcraft_ui_egui.theme uses a module listed above it, which is the healthy direction.
figcraft_doc.proto uses figcraft_color, so a change to figcraft_color can break figcraft_doc.proto, while a change to figcraft_doc.proto can't break figcraft_color.
Position
Below the diagonal: figcraft_doc.proto uses a module listed above it, which is the healthy direction.
figcraft_doc.proto uses figcraft_doc.styles, so a change to figcraft_doc.styles can break figcraft_doc.proto, while a change to figcraft_doc.proto can't break figcraft_doc.styles.
Position
Below the diagonal: figcraft_doc.proto uses a module listed above it, which is the healthy direction.
11→17 figcraft_doc.proto uses figcraft_docpart of a loop✕
Connections
3 pairs of types, where a type in figcraft_doc.proto uses a type in figcraft_doc.
figcraft_doc.proto uses figcraft_doc, so a change to figcraft_doc can break figcraft_doc.proto, while a change to figcraft_doc.proto can't break figcraft_doc.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
1 pair of types, where a type in figcraft_doc.vector uses a type in figcraft_color.
The types involved
figcraft_doc.vector.Region → figcraft_color.Paint
Direction
figcraft_doc.vector uses figcraft_color, so a change to figcraft_color can break figcraft_doc.vector, while a change to figcraft_doc.vector can't break figcraft_color.
Position
Below the diagonal: figcraft_doc.vector uses a module listed above it, which is the healthy direction.
figcraft_doc.vector uses figcraft_doc.props, so a change to figcraft_doc.props can break figcraft_doc.vector, while a change to figcraft_doc.vector can't break figcraft_doc.props.
Position
Below the diagonal: figcraft_doc.vector uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.icons uses figcraft_engine.keymap, so a change to figcraft_engine.keymap can break figcraft_ui_egui.icons, while a change to figcraft_ui_egui.icons can't break figcraft_engine.keymap.
Position
Below the diagonal: figcraft_ui_egui.icons uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.icons uses figcraft_doc.board, so a change to figcraft_doc.board can break figcraft_ui_egui.icons, while a change to figcraft_ui_egui.icons can't break figcraft_doc.board.
Position
Below the diagonal: figcraft_ui_egui.icons uses a module listed above it, which is the healthy direction.
figcraft_doc.node uses figcraft_color.blend, so a change to figcraft_color.blend can break figcraft_doc.node, while a change to figcraft_doc.node can't break figcraft_color.blend.
Position
Below the diagonal: figcraft_doc.node uses a module listed above it, which is the healthy direction.
figcraft_doc.node uses figcraft_color, so a change to figcraft_color can break figcraft_doc.node, while a change to figcraft_doc.node can't break figcraft_color.
Position
Below the diagonal: figcraft_doc.node uses a module listed above it, which is the healthy direction.
figcraft_doc.node uses figcraft_doc.board, so a change to figcraft_doc.board can break figcraft_doc.node, while a change to figcraft_doc.node can't break figcraft_doc.board.
Position
Below the diagonal: figcraft_doc.node uses a module listed above it, which is the healthy direction.
figcraft_doc.node uses figcraft_doc.props, so a change to figcraft_doc.props can break figcraft_doc.node, while a change to figcraft_doc.node can't break figcraft_doc.props.
Position
Below the diagonal: figcraft_doc.node uses a module listed above it, which is the healthy direction.
figcraft_doc.node uses figcraft_doc.styles, so a change to figcraft_doc.styles can break figcraft_doc.node, while a change to figcraft_doc.node can't break figcraft_doc.styles.
Position
Below the diagonal: figcraft_doc.node uses a module listed above it, which is the healthy direction.
figcraft_doc.node uses figcraft_doc.text, so a change to figcraft_doc.text can break figcraft_doc.node, while a change to figcraft_doc.node can't break figcraft_doc.text.
Position
Below the diagonal: figcraft_doc.node uses a module listed above it, which is the healthy direction.
figcraft_doc.node uses figcraft_doc.proto, so a change to figcraft_doc.proto can break figcraft_doc.node, while a change to figcraft_doc.node can't break figcraft_doc.proto.
Position
Below the diagonal: figcraft_doc.node uses a module listed above it, which is the healthy direction.
14→17 figcraft_doc.node uses figcraft_docpart of a loop✕
Connections
2 pairs of types, where a type in figcraft_doc.node uses a type in figcraft_doc.
figcraft_doc.node uses figcraft_doc, so a change to figcraft_doc can break figcraft_doc.node, while a change to figcraft_doc.node can't break figcraft_doc.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
figcraft_format.fig.map uses figcraft_format.fig.kiwi, so a change to figcraft_format.fig.kiwi can break figcraft_format.fig.map, while a change to figcraft_format.fig.map can't break figcraft_format.fig.kiwi.
Position
Below the diagonal: figcraft_format.fig.map uses a module listed above it, which is the healthy direction.
figcraft_format.fig.map uses figcraft_doc.vector, so a change to figcraft_doc.vector can break figcraft_format.fig.map, while a change to figcraft_format.fig.map can't break figcraft_doc.vector.
Position
Below the diagonal: figcraft_format.fig.map uses a module listed above it, which is the healthy direction.
figcraft_format.sketch.tree uses figcraft_doc.vector, so a change to figcraft_doc.vector can break figcraft_format.sketch.tree, while a change to figcraft_format.sketch.tree can't break figcraft_doc.vector.
Position
Below the diagonal: figcraft_format.sketch.tree uses a module listed above it, which is the healthy direction.
figcraft_doc uses figcraft_doc.board, so a change to figcraft_doc.board can break figcraft_doc, while a change to figcraft_doc can't break figcraft_doc.board.
Position
Below the diagonal: figcraft_doc uses a module listed above it, which is the healthy direction.
figcraft_doc uses figcraft_doc.styles, so a change to figcraft_doc.styles can break figcraft_doc, while a change to figcraft_doc can't break figcraft_doc.styles.
Position
Below the diagonal: figcraft_doc uses a module listed above it, which is the healthy direction.
figcraft_doc uses figcraft_doc.proto, so a change to figcraft_doc.proto can break figcraft_doc, while a change to figcraft_doc can't break figcraft_doc.proto.
Position
Below the diagonal: figcraft_doc uses a module listed above it, which is the healthy direction.
figcraft_doc uses figcraft_doc.node, so a change to figcraft_doc.node can break figcraft_doc, while a change to figcraft_doc can't break figcraft_doc.node.
Position
Below the diagonal: figcraft_doc uses a module listed above it, which is the healthy direction.
figcraft_collab.change uses figcraft_doc.node, so a change to figcraft_doc.node can break figcraft_collab.change, while a change to figcraft_collab.change can't break figcraft_doc.node.
Position
Below the diagonal: figcraft_collab.change uses a module listed above it, which is the healthy direction.
figcraft_collab.change uses figcraft_doc, so a change to figcraft_doc can break figcraft_collab.change, while a change to figcraft_collab.change can't break figcraft_doc.
Position
Below the diagonal: figcraft_collab.change uses a module listed above it, which is the healthy direction.
figcraft_engine.canvas.vectoredit uses figcraft_engine.cmd, so a change to figcraft_engine.cmd can break figcraft_engine.canvas.vectoredit, while a change to figcraft_engine.canvas.vectoredit can't break figcraft_engine.cmd.
Position
Below the diagonal: figcraft_engine.canvas.vectoredit uses a module listed above it, which is the healthy direction.
figcraft_engine.canvas.vectoredit uses figcraft_doc.vector, so a change to figcraft_doc.vector can break figcraft_engine.canvas.vectoredit, while a change to figcraft_engine.canvas.vectoredit can't break figcraft_doc.vector.
Position
Below the diagonal: figcraft_engine.canvas.vectoredit uses a module listed above it, which is the healthy direction.
figcraft_engine.canvas.vectoredit uses figcraft_doc, so a change to figcraft_doc can break figcraft_engine.canvas.vectoredit, while a change to figcraft_engine.canvas.vectoredit can't break figcraft_doc.
Position
Below the diagonal: figcraft_engine.canvas.vectoredit uses a module listed above it, which is the healthy direction.
19→36 figcraft_engine.canvas.vectoredit uses figcraft_enginepart of a loop✕
Connections
1 pair of types, where a type in figcraft_engine.canvas.vectoredit uses a type in figcraft_engine.
figcraft_engine.canvas.vectoredit uses figcraft_engine, so a change to figcraft_engine can break figcraft_engine.canvas.vectoredit, while a change to figcraft_engine.canvas.vectoredit can't break figcraft_engine.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
figcraft_engine.dev.codegen uses figcraft_engine.cmd, so a change to figcraft_engine.cmd can break figcraft_engine.dev.codegen, while a change to figcraft_engine.dev.codegen can't break figcraft_engine.cmd.
Position
Below the diagonal: figcraft_engine.dev.codegen uses a module listed above it, which is the healthy direction.
figcraft_engine.dev.codegen uses figcraft_color, so a change to figcraft_color can break figcraft_engine.dev.codegen, while a change to figcraft_engine.dev.codegen can't break figcraft_color.
Position
Below the diagonal: figcraft_engine.dev.codegen uses a module listed above it, which is the healthy direction.
figcraft_engine.dev.codegen uses figcraft_doc.props, so a change to figcraft_doc.props can break figcraft_engine.dev.codegen, while a change to figcraft_engine.dev.codegen can't break figcraft_doc.props.
Position
Below the diagonal: figcraft_engine.dev.codegen uses a module listed above it, which is the healthy direction.
figcraft_engine.dev.codegen uses figcraft_doc.node, so a change to figcraft_doc.node can break figcraft_engine.dev.codegen, while a change to figcraft_engine.dev.codegen can't break figcraft_doc.node.
Position
Below the diagonal: figcraft_engine.dev.codegen uses a module listed above it, which is the healthy direction.
figcraft_engine.dev.codegen uses figcraft_doc, so a change to figcraft_doc can break figcraft_engine.dev.codegen, while a change to figcraft_engine.dev.codegen can't break figcraft_doc.
Position
Below the diagonal: figcraft_engine.dev.codegen uses a module listed above it, which is the healthy direction.
figcraft_engine.extensions.plugins uses figcraft_engine.cmd, so a change to figcraft_engine.cmd can break figcraft_engine.extensions.plugins, while a change to figcraft_engine.extensions.plugins can't break figcraft_engine.cmd.
Position
Below the diagonal: figcraft_engine.extensions.plugins uses a module listed above it, which is the healthy direction.
figcraft_engine.extensions.plugins uses figcraft_format.sketch.tree, so a change to figcraft_format.sketch.tree can break figcraft_engine.extensions.plugins, while a change to figcraft_engine.extensions.plugins can't break figcraft_format.sketch.tree.
Position
Below the diagonal: figcraft_engine.extensions.plugins uses a module listed above it, which is the healthy direction.
figcraft_engine.extensions.plugins uses figcraft_doc, so a change to figcraft_doc can break figcraft_engine.extensions.plugins, while a change to figcraft_engine.extensions.plugins can't break figcraft_doc.
Position
Below the diagonal: figcraft_engine.extensions.plugins uses a module listed above it, which is the healthy direction.
21→36 figcraft_engine.extensions.plugins uses figcraft_enginepart of a loop✕
Connections
2 pairs of types, where a type in figcraft_engine.extensions.plugins uses a type in figcraft_engine.
figcraft_engine.extensions.plugins uses figcraft_engine, so a change to figcraft_engine can break figcraft_engine.extensions.plugins, while a change to figcraft_engine.extensions.plugins can't break figcraft_engine.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
figcraft_render uses figcraft_color, so a change to figcraft_color can break figcraft_render, while a change to figcraft_render can't break figcraft_color.
Position
Below the diagonal: figcraft_render uses a module listed above it, which is the healthy direction.
figcraft_render uses figcraft_doc.props, so a change to figcraft_doc.props can break figcraft_render, while a change to figcraft_render can't break figcraft_doc.props.
Position
Below the diagonal: figcraft_render uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.canvas.selection_spacing uses figcraft_engine.keymap, so a change to figcraft_engine.keymap can break figcraft_ui_egui.canvas.selection_spacing, while a change to figcraft_ui_egui.canvas.selection_spacing can't break figcraft_engine.keymap.
Position
Below the diagonal: figcraft_ui_egui.canvas.selection_spacing uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.canvas.selection_spacing uses figcraft_doc, so a change to figcraft_doc can break figcraft_ui_egui.canvas.selection_spacing, while a change to figcraft_ui_egui.canvas.selection_spacing can't break figcraft_doc.
Position
Below the diagonal: figcraft_ui_egui.canvas.selection_spacing uses a module listed above it, which is the healthy direction.
23→40 figcraft_ui_egui.canvas.selection_spacing uses figcraft_ui_eguipart of a loop✕
Connections
1 pair of types, where a type in figcraft_ui_egui.canvas.selection_spacing uses a type in figcraft_ui_egui.
figcraft_ui_egui.canvas.selection_spacing uses figcraft_ui_egui, so a change to figcraft_ui_egui can break figcraft_ui_egui.canvas.selection_spacing, while a change to figcraft_ui_egui.canvas.selection_spacing can't break figcraft_ui_egui.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
figcraft_ui_egui.widgets.style_picker uses figcraft_engine.keymap, so a change to figcraft_engine.keymap can break figcraft_ui_egui.widgets.style_picker, while a change to figcraft_ui_egui.widgets.style_picker can't break figcraft_engine.keymap.
Position
Below the diagonal: figcraft_ui_egui.widgets.style_picker uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.widgets.style_picker uses figcraft_color, so a change to figcraft_color can break figcraft_ui_egui.widgets.style_picker, while a change to figcraft_ui_egui.widgets.style_picker can't break figcraft_color.
Position
Below the diagonal: figcraft_ui_egui.widgets.style_picker uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.widgets.style_picker uses figcraft_doc.props, so a change to figcraft_doc.props can break figcraft_ui_egui.widgets.style_picker, while a change to figcraft_ui_egui.widgets.style_picker can't break figcraft_doc.props.
Position
Below the diagonal: figcraft_ui_egui.widgets.style_picker uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.widgets.style_picker uses figcraft_doc.styles, so a change to figcraft_doc.styles can break figcraft_ui_egui.widgets.style_picker, while a change to figcraft_ui_egui.widgets.style_picker can't break figcraft_doc.styles.
Position
Below the diagonal: figcraft_ui_egui.widgets.style_picker uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.widgets.style_picker uses figcraft_doc.text, so a change to figcraft_doc.text can break figcraft_ui_egui.widgets.style_picker, while a change to figcraft_ui_egui.widgets.style_picker can't break figcraft_doc.text.
Position
Below the diagonal: figcraft_ui_egui.widgets.style_picker uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.widgets.style_picker uses figcraft_ui_egui.icons, so a change to figcraft_ui_egui.icons can break figcraft_ui_egui.widgets.style_picker, while a change to figcraft_ui_egui.widgets.style_picker can't break figcraft_ui_egui.icons.
Position
Below the diagonal: figcraft_ui_egui.widgets.style_picker uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.widgets.style_picker uses figcraft_doc.node, so a change to figcraft_doc.node can break figcraft_ui_egui.widgets.style_picker, while a change to figcraft_ui_egui.widgets.style_picker can't break figcraft_doc.node.
Position
Below the diagonal: figcraft_ui_egui.widgets.style_picker uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.widgets.style_picker uses figcraft_doc, so a change to figcraft_doc can break figcraft_ui_egui.widgets.style_picker, while a change to figcraft_ui_egui.widgets.style_picker can't break figcraft_doc.
Position
Below the diagonal: figcraft_ui_egui.widgets.style_picker uses a module listed above it, which is the healthy direction.
24→33 figcraft_ui_egui.widgets.style_picker uses figcraft_ui_egui.canvas.commentspart of a loop✕
Connections
1 pair of types, where a type in figcraft_ui_egui.widgets.style_picker uses a type in figcraft_ui_egui.canvas.comments.
figcraft_ui_egui.widgets.style_picker uses figcraft_ui_egui.canvas.comments, so a change to figcraft_ui_egui.canvas.comments can break figcraft_ui_egui.widgets.style_picker, while a change to figcraft_ui_egui.widgets.style_picker can't break figcraft_ui_egui.canvas.comments.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
24→40 figcraft_ui_egui.widgets.style_picker uses figcraft_ui_eguipart of a loop✕
Connections
1 pair of types, where a type in figcraft_ui_egui.widgets.style_picker uses a type in figcraft_ui_egui.
figcraft_ui_egui.widgets.style_picker uses figcraft_ui_egui, so a change to figcraft_ui_egui can break figcraft_ui_egui.widgets.style_picker, while a change to figcraft_ui_egui.widgets.style_picker can't break figcraft_ui_egui.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
figcraft_collab.message uses figcraft_doc, so a change to figcraft_doc can break figcraft_collab.message, while a change to figcraft_collab.message can't break figcraft_doc.
Position
Below the diagonal: figcraft_collab.message uses a module listed above it, which is the healthy direction.
figcraft_collab.message uses figcraft_collab.change, so a change to figcraft_collab.change can break figcraft_collab.message, while a change to figcraft_collab.message can't break figcraft_collab.change.
Position
Below the diagonal: figcraft_collab.message uses a module listed above it, which is the healthy direction.
figcraft_engine.canvas.tools uses figcraft_color, so a change to figcraft_color can break figcraft_engine.canvas.tools, while a change to figcraft_engine.canvas.tools can't break figcraft_color.
Position
Below the diagonal: figcraft_engine.canvas.tools uses a module listed above it, which is the healthy direction.
figcraft_engine.canvas.tools uses figcraft_doc.props, so a change to figcraft_doc.props can break figcraft_engine.canvas.tools, while a change to figcraft_engine.canvas.tools can't break figcraft_doc.props.
Position
Below the diagonal: figcraft_engine.canvas.tools uses a module listed above it, which is the healthy direction.
figcraft_engine.canvas.tools uses figcraft_doc, so a change to figcraft_doc can break figcraft_engine.canvas.tools, while a change to figcraft_engine.canvas.tools can't break figcraft_doc.
Position
Below the diagonal: figcraft_engine.canvas.tools uses a module listed above it, which is the healthy direction.
figcraft_engine.canvas.tools uses figcraft_engine.canvas.vectoredit, so a change to figcraft_engine.canvas.vectoredit can break figcraft_engine.canvas.tools, while a change to figcraft_engine.canvas.tools can't break figcraft_engine.canvas.vectoredit.
Position
Below the diagonal: figcraft_engine.canvas.tools uses a module listed above it, which is the healthy direction.
figcraft_engine.doc_state uses figcraft_doc, so a change to figcraft_doc can break figcraft_engine.doc_state, while a change to figcraft_engine.doc_state can't break figcraft_doc.
Position
Below the diagonal: figcraft_engine.doc_state uses a module listed above it, which is the healthy direction.
figcraft_engine.doc_state uses figcraft_engine.canvas.vectoredit, so a change to figcraft_engine.canvas.vectoredit can break figcraft_engine.doc_state, while a change to figcraft_engine.doc_state can't break figcraft_engine.canvas.vectoredit.
Position
Below the diagonal: figcraft_engine.doc_state uses a module listed above it, which is the healthy direction.
figcraft_engine.prefs uses figcraft_doc.props, so a change to figcraft_doc.props can break figcraft_engine.prefs, while a change to figcraft_engine.prefs can't break figcraft_doc.props.
Position
Below the diagonal: figcraft_engine.prefs uses a module listed above it, which is the healthy direction.
figcraft_engine.prefs uses figcraft_doc, so a change to figcraft_doc can break figcraft_engine.prefs, while a change to figcraft_engine.prefs can't break figcraft_doc.
Position
Below the diagonal: figcraft_engine.prefs uses a module listed above it, which is the healthy direction.
figcraft_engine.prefs uses figcraft_engine.extensions.plugins, so a change to figcraft_engine.extensions.plugins can break figcraft_engine.prefs, while a change to figcraft_engine.prefs can't break figcraft_engine.extensions.plugins.
Position
Below the diagonal: figcraft_engine.prefs uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.canvas.render_worker uses figcraft_engine.keymap, so a change to figcraft_engine.keymap can break figcraft_ui_egui.canvas.render_worker, while a change to figcraft_ui_egui.canvas.render_worker can't break figcraft_engine.keymap.
Position
Below the diagonal: figcraft_ui_egui.canvas.render_worker uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.canvas.render_worker uses figcraft_doc, so a change to figcraft_doc can break figcraft_ui_egui.canvas.render_worker, while a change to figcraft_ui_egui.canvas.render_worker can't break figcraft_doc.
Position
Below the diagonal: figcraft_ui_egui.canvas.render_worker uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.canvas.render_worker uses figcraft_render, so a change to figcraft_render can break figcraft_ui_egui.canvas.render_worker, while a change to figcraft_ui_egui.canvas.render_worker can't break figcraft_render.
Position
Below the diagonal: figcraft_ui_egui.canvas.render_worker uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.panels.dev_compare uses figcraft_engine.keymap, so a change to figcraft_engine.keymap can break figcraft_ui_egui.panels.dev_compare, while a change to figcraft_ui_egui.panels.dev_compare can't break figcraft_engine.keymap.
Position
Below the diagonal: figcraft_ui_egui.panels.dev_compare uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.panels.dev_compare uses figcraft_ui_egui.theme, so a change to figcraft_ui_egui.theme can break figcraft_ui_egui.panels.dev_compare, while a change to figcraft_ui_egui.panels.dev_compare can't break figcraft_ui_egui.theme.
Position
Below the diagonal: figcraft_ui_egui.panels.dev_compare uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.panels.dev_compare uses figcraft_doc, so a change to figcraft_doc can break figcraft_ui_egui.panels.dev_compare, while a change to figcraft_ui_egui.panels.dev_compare can't break figcraft_doc.
Position
Below the diagonal: figcraft_ui_egui.panels.dev_compare uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.panels.dev_compare uses figcraft_ui_egui.canvas.selection_spacing, so a change to figcraft_ui_egui.canvas.selection_spacing can break figcraft_ui_egui.panels.dev_compare, while a change to figcraft_ui_egui.panels.dev_compare can't break figcraft_ui_egui.canvas.selection_spacing.
Position
Below the diagonal: figcraft_ui_egui.panels.dev_compare uses a module listed above it, which is the healthy direction.
30→40 figcraft_ui_egui.panels.dev_compare uses figcraft_ui_eguipart of a loop✕
Connections
1 pair of types, where a type in figcraft_ui_egui.panels.dev_compare uses a type in figcraft_ui_egui.
figcraft_ui_egui.panels.dev_compare uses figcraft_ui_egui, so a change to figcraft_ui_egui can break figcraft_ui_egui.panels.dev_compare, while a change to figcraft_ui_egui.panels.dev_compare can't break figcraft_ui_egui.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
figcraft_collab_net.inbox uses figcraft_collab.message, so a change to figcraft_collab.message can break figcraft_collab_net.inbox, while a change to figcraft_collab_net.inbox can't break figcraft_collab.message.
Position
Below the diagonal: figcraft_collab_net.inbox uses a module listed above it, which is the healthy direction.
figcraft_engine.sharing.live.types uses figcraft_doc, so a change to figcraft_doc can break figcraft_engine.sharing.live.types, while a change to figcraft_engine.sharing.live.types can't break figcraft_doc.
Position
Below the diagonal: figcraft_engine.sharing.live.types uses a module listed above it, which is the healthy direction.
figcraft_engine.sharing.live.types uses figcraft_collab.message, so a change to figcraft_collab.message can break figcraft_engine.sharing.live.types, while a change to figcraft_engine.sharing.live.types can't break figcraft_collab.message.
Position
Below the diagonal: figcraft_engine.sharing.live.types uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.canvas.comments uses figcraft_engine.keymap, so a change to figcraft_engine.keymap can break figcraft_ui_egui.canvas.comments, while a change to figcraft_ui_egui.canvas.comments can't break figcraft_engine.keymap.
Position
Below the diagonal: figcraft_ui_egui.canvas.comments uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.canvas.comments uses figcraft_ui_egui.theme, so a change to figcraft_ui_egui.theme can break figcraft_ui_egui.canvas.comments, while a change to figcraft_ui_egui.canvas.comments can't break figcraft_ui_egui.theme.
Position
Below the diagonal: figcraft_ui_egui.canvas.comments uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.canvas.comments uses figcraft_ui_egui.icons, so a change to figcraft_ui_egui.icons can break figcraft_ui_egui.canvas.comments, while a change to figcraft_ui_egui.canvas.comments can't break figcraft_ui_egui.icons.
Position
Below the diagonal: figcraft_ui_egui.canvas.comments uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.canvas.comments uses figcraft_doc, so a change to figcraft_doc can break figcraft_ui_egui.canvas.comments, while a change to figcraft_ui_egui.canvas.comments can't break figcraft_doc.
Position
Below the diagonal: figcraft_ui_egui.canvas.comments uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.canvas.comments uses figcraft_ui_egui.widgets.style_picker, so a change to figcraft_ui_egui.widgets.style_picker can break figcraft_ui_egui.canvas.comments, while a change to figcraft_ui_egui.canvas.comments can't break figcraft_ui_egui.widgets.style_picker.
Position
Below the diagonal: figcraft_ui_egui.canvas.comments uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.canvas.comments uses figcraft_ui_egui.panels.dev_compare, so a change to figcraft_ui_egui.panels.dev_compare can break figcraft_ui_egui.canvas.comments, while a change to figcraft_ui_egui.canvas.comments can't break figcraft_ui_egui.panels.dev_compare.
Position
Below the diagonal: figcraft_ui_egui.canvas.comments uses a module listed above it, which is the healthy direction.
33→40 figcraft_ui_egui.canvas.comments uses figcraft_ui_eguipart of a loop✕
Connections
1 pair of types, where a type in figcraft_ui_egui.canvas.comments uses a type in figcraft_ui_egui.
figcraft_ui_egui.canvas.comments uses figcraft_ui_egui, so a change to figcraft_ui_egui can break figcraft_ui_egui.canvas.comments, while a change to figcraft_ui_egui.canvas.comments can't break figcraft_ui_egui.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
figcraft_ui_egui.panels.dev_mode uses figcraft_engine.keymap, so a change to figcraft_engine.keymap can break figcraft_ui_egui.panels.dev_mode, while a change to figcraft_ui_egui.panels.dev_mode can't break figcraft_engine.keymap.
Position
Below the diagonal: figcraft_ui_egui.panels.dev_mode uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.panels.dev_mode uses figcraft_ui_egui.theme, so a change to figcraft_ui_egui.theme can break figcraft_ui_egui.panels.dev_mode, while a change to figcraft_ui_egui.panels.dev_mode can't break figcraft_ui_egui.theme.
Position
Below the diagonal: figcraft_ui_egui.panels.dev_mode uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.panels.dev_mode uses figcraft_doc.node, so a change to figcraft_doc.node can break figcraft_ui_egui.panels.dev_mode, while a change to figcraft_ui_egui.panels.dev_mode can't break figcraft_doc.node.
Position
Below the diagonal: figcraft_ui_egui.panels.dev_mode uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.panels.dev_mode uses figcraft_format.sketch.tree, so a change to figcraft_format.sketch.tree can break figcraft_ui_egui.panels.dev_mode, while a change to figcraft_ui_egui.panels.dev_mode can't break figcraft_format.sketch.tree.
Position
Below the diagonal: figcraft_ui_egui.panels.dev_mode uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.panels.dev_mode uses figcraft_doc, so a change to figcraft_doc can break figcraft_ui_egui.panels.dev_mode, while a change to figcraft_ui_egui.panels.dev_mode can't break figcraft_doc.
Position
Below the diagonal: figcraft_ui_egui.panels.dev_mode uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.panels.dev_mode uses figcraft_engine.dev.codegen, so a change to figcraft_engine.dev.codegen can break figcraft_ui_egui.panels.dev_mode, while a change to figcraft_ui_egui.panels.dev_mode can't break figcraft_engine.dev.codegen.
Position
Below the diagonal: figcraft_ui_egui.panels.dev_mode uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.panels.dev_mode uses figcraft_ui_egui.panels.dev_compare, so a change to figcraft_ui_egui.panels.dev_compare can break figcraft_ui_egui.panels.dev_mode, while a change to figcraft_ui_egui.panels.dev_mode can't break figcraft_ui_egui.panels.dev_compare.
Position
Below the diagonal: figcraft_ui_egui.panels.dev_mode uses a module listed above it, which is the healthy direction.
34→40 figcraft_ui_egui.panels.dev_mode uses figcraft_ui_eguipart of a loop✕
Connections
1 pair of types, where a type in figcraft_ui_egui.panels.dev_mode uses a type in figcraft_ui_egui.
figcraft_ui_egui.panels.dev_mode uses figcraft_ui_egui, so a change to figcraft_ui_egui can break figcraft_ui_egui.panels.dev_mode, while a change to figcraft_ui_egui.panels.dev_mode can't break figcraft_ui_egui.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
figcraft_engine.sharing.live uses figcraft_doc, so a change to figcraft_doc can break figcraft_engine.sharing.live, while a change to figcraft_engine.sharing.live can't break figcraft_doc.
Position
Below the diagonal: figcraft_engine.sharing.live uses a module listed above it, which is the healthy direction.
figcraft_engine.sharing.live uses figcraft_collab.message, so a change to figcraft_collab.message can break figcraft_engine.sharing.live, while a change to figcraft_engine.sharing.live can't break figcraft_collab.message.
Position
Below the diagonal: figcraft_engine.sharing.live uses a module listed above it, which is the healthy direction.
figcraft_engine.sharing.live uses figcraft_engine.canvas.tools, so a change to figcraft_engine.canvas.tools can break figcraft_engine.sharing.live, while a change to figcraft_engine.sharing.live can't break figcraft_engine.canvas.tools.
Position
Below the diagonal: figcraft_engine.sharing.live uses a module listed above it, which is the healthy direction.
figcraft_engine.sharing.live uses figcraft_engine.doc_state, so a change to figcraft_engine.doc_state can break figcraft_engine.sharing.live, while a change to figcraft_engine.sharing.live can't break figcraft_engine.doc_state.
Position
Below the diagonal: figcraft_engine.sharing.live uses a module listed above it, which is the healthy direction.
figcraft_engine.sharing.live uses figcraft_engine.prefs, so a change to figcraft_engine.prefs can break figcraft_engine.sharing.live, while a change to figcraft_engine.sharing.live can't break figcraft_engine.prefs.
Position
Below the diagonal: figcraft_engine.sharing.live uses a module listed above it, which is the healthy direction.
figcraft_engine.sharing.live uses figcraft_engine.sharing.live.types, so a change to figcraft_engine.sharing.live.types can break figcraft_engine.sharing.live, while a change to figcraft_engine.sharing.live can't break figcraft_engine.sharing.live.types.
Position
Below the diagonal: figcraft_engine.sharing.live uses a module listed above it, which is the healthy direction.
figcraft_engine uses figcraft_engine.cmd, so a change to figcraft_engine.cmd can break figcraft_engine, while a change to figcraft_engine can't break figcraft_engine.cmd.
Position
Below the diagonal: figcraft_engine uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in figcraft_engine uses a type in figcraft_color.
The types involved
figcraft_engine.Session → figcraft_color.Color
Direction
figcraft_engine uses figcraft_color, so a change to figcraft_color can break figcraft_engine, while a change to figcraft_engine can't break figcraft_color.
Position
Below the diagonal: figcraft_engine uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in figcraft_engine uses a type in figcraft_doc.board.
The types involved
figcraft_engine.Session → figcraft_doc.board.End
Direction
figcraft_engine uses figcraft_doc.board, so a change to figcraft_doc.board can break figcraft_engine, while a change to figcraft_engine can't break figcraft_doc.board.
Position
Below the diagonal: figcraft_engine uses a module listed above it, which is the healthy direction.
figcraft_engine uses figcraft_engine.canvas.vectoredit, so a change to figcraft_engine.canvas.vectoredit can break figcraft_engine, while a change to figcraft_engine can't break figcraft_engine.canvas.vectoredit.
Position
Below the diagonal: figcraft_engine uses a module listed above it, which is the healthy direction.
figcraft_engine uses figcraft_engine.extensions.plugins, so a change to figcraft_engine.extensions.plugins can break figcraft_engine, while a change to figcraft_engine can't break figcraft_engine.extensions.plugins.
Position
Below the diagonal: figcraft_engine uses a module listed above it, which is the healthy direction.
figcraft_engine uses figcraft_collab.message, so a change to figcraft_collab.message can break figcraft_engine, while a change to figcraft_engine can't break figcraft_collab.message.
Position
Below the diagonal: figcraft_engine uses a module listed above it, which is the healthy direction.
figcraft_engine uses figcraft_engine.canvas.tools, so a change to figcraft_engine.canvas.tools can break figcraft_engine, while a change to figcraft_engine can't break figcraft_engine.canvas.tools.
Position
Below the diagonal: figcraft_engine uses a module listed above it, which is the healthy direction.
figcraft_engine uses figcraft_engine.doc_state, so a change to figcraft_engine.doc_state can break figcraft_engine, while a change to figcraft_engine can't break figcraft_engine.doc_state.
Position
Below the diagonal: figcraft_engine uses a module listed above it, which is the healthy direction.
figcraft_engine uses figcraft_engine.prefs, so a change to figcraft_engine.prefs can break figcraft_engine, while a change to figcraft_engine can't break figcraft_engine.prefs.
Position
Below the diagonal: figcraft_engine uses a module listed above it, which is the healthy direction.
figcraft_engine uses figcraft_engine.sharing.live.types, so a change to figcraft_engine.sharing.live.types can break figcraft_engine, while a change to figcraft_engine can't break figcraft_engine.sharing.live.types.
Position
Below the diagonal: figcraft_engine uses a module listed above it, which is the healthy direction.
figcraft_engine uses figcraft_engine.sharing.live, so a change to figcraft_engine.sharing.live can break figcraft_engine, while a change to figcraft_engine can't break figcraft_engine.sharing.live.
Position
Below the diagonal: figcraft_engine uses a module listed above it, which is the healthy direction.
figcraft_engine.content.templates.kit uses figcraft_color, so a change to figcraft_color can break figcraft_engine.content.templates.kit, while a change to figcraft_engine.content.templates.kit can't break figcraft_color.
Position
Below the diagonal: figcraft_engine.content.templates.kit uses a module listed above it, which is the healthy direction.
figcraft_engine.content.templates.kit uses figcraft_doc, so a change to figcraft_doc can break figcraft_engine.content.templates.kit, while a change to figcraft_engine.content.templates.kit can't break figcraft_doc.
Position
Below the diagonal: figcraft_engine.content.templates.kit uses a module listed above it, which is the healthy direction.
figcraft_engine.content.templates.kit uses figcraft_engine, so a change to figcraft_engine can break figcraft_engine.content.templates.kit, while a change to figcraft_engine.content.templates.kit can't break figcraft_engine.
Position
Below the diagonal: figcraft_engine.content.templates.kit uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.canvas uses figcraft_doc, so a change to figcraft_doc can break figcraft_ui_egui.canvas, while a change to figcraft_ui_egui.canvas can't break figcraft_doc.
Position
Below the diagonal: figcraft_ui_egui.canvas uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.canvas uses figcraft_engine.canvas.tools, so a change to figcraft_engine.canvas.tools can break figcraft_ui_egui.canvas, while a change to figcraft_ui_egui.canvas can't break figcraft_engine.canvas.tools.
Position
Below the diagonal: figcraft_ui_egui.canvas uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.canvas uses figcraft_ui_egui.canvas.render_worker, so a change to figcraft_ui_egui.canvas.render_worker can break figcraft_ui_egui.canvas, while a change to figcraft_ui_egui.canvas can't break figcraft_ui_egui.canvas.render_worker.
Position
Below the diagonal: figcraft_ui_egui.canvas uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.canvas uses figcraft_engine, so a change to figcraft_engine can break figcraft_ui_egui.canvas, while a change to figcraft_ui_egui.canvas can't break figcraft_engine.
Position
Below the diagonal: figcraft_ui_egui.canvas uses a module listed above it, which is the healthy direction.
38→40 figcraft_ui_egui.canvas uses figcraft_ui_eguipart of a loop✕
Connections
1 pair of types, where a type in figcraft_ui_egui.canvas uses a type in figcraft_ui_egui.
figcraft_ui_egui.canvas uses figcraft_ui_egui, so a change to figcraft_ui_egui can break figcraft_ui_egui.canvas, while a change to figcraft_ui_egui.canvas can't break figcraft_ui_egui.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
figcraft_ui_egui.present uses figcraft_engine.keymap, so a change to figcraft_engine.keymap can break figcraft_ui_egui.present, while a change to figcraft_ui_egui.present can't break figcraft_engine.keymap.
Position
Below the diagonal: figcraft_ui_egui.present uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.present uses figcraft_color, so a change to figcraft_color can break figcraft_ui_egui.present, while a change to figcraft_ui_egui.present can't break figcraft_color.
Position
Below the diagonal: figcraft_ui_egui.present uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.present uses figcraft_doc.proto, so a change to figcraft_doc.proto can break figcraft_ui_egui.present, while a change to figcraft_ui_egui.present can't break figcraft_doc.proto.
Position
Below the diagonal: figcraft_ui_egui.present uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.present uses figcraft_doc, so a change to figcraft_doc can break figcraft_ui_egui.present, while a change to figcraft_ui_egui.present can't break figcraft_doc.
Position
Below the diagonal: figcraft_ui_egui.present uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.present uses figcraft_ui_egui.canvas.selection_spacing, so a change to figcraft_ui_egui.canvas.selection_spacing can break figcraft_ui_egui.present, while a change to figcraft_ui_egui.present can't break figcraft_ui_egui.canvas.selection_spacing.
Position
Below the diagonal: figcraft_ui_egui.present uses a module listed above it, which is the healthy direction.
figcraft_ui_egui.present uses figcraft_engine, so a change to figcraft_engine can break figcraft_ui_egui.present, while a change to figcraft_ui_egui.present can't break figcraft_engine.
Position
Below the diagonal: figcraft_ui_egui.present uses a module listed above it, which is the healthy direction.
figcraft_ui_egui uses figcraft_engine.keymap, so a change to figcraft_engine.keymap can break figcraft_ui_egui, while a change to figcraft_ui_egui can't break figcraft_engine.keymap.
Position
Below the diagonal: figcraft_ui_egui uses a module listed above it, which is the healthy direction.
figcraft_ui_egui uses figcraft_doc.props, so a change to figcraft_doc.props can break figcraft_ui_egui, while a change to figcraft_ui_egui can't break figcraft_doc.props.
Position
Below the diagonal: figcraft_ui_egui uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in figcraft_ui_egui uses a type in figcraft_doc.
The types involved
figcraft_ui_egui.UiState → figcraft_doc.NodeId
Direction
figcraft_ui_egui uses figcraft_doc, so a change to figcraft_doc can break figcraft_ui_egui, while a change to figcraft_ui_egui can't break figcraft_doc.
Position
Below the diagonal: figcraft_ui_egui uses a module listed above it, which is the healthy direction.
figcraft_ui_egui uses figcraft_engine.prefs, so a change to figcraft_engine.prefs can break figcraft_ui_egui, while a change to figcraft_ui_egui can't break figcraft_engine.prefs.
Position
Below the diagonal: figcraft_ui_egui uses a module listed above it, which is the healthy direction.
figcraft_ui_egui uses figcraft_ui_egui.canvas.render_worker, so a change to figcraft_ui_egui.canvas.render_worker can break figcraft_ui_egui, while a change to figcraft_ui_egui can't break figcraft_ui_egui.canvas.render_worker.
Position
Below the diagonal: figcraft_ui_egui uses a module listed above it, which is the healthy direction.
figcraft_ui_egui uses figcraft_ui_egui.canvas.comments, so a change to figcraft_ui_egui.canvas.comments can break figcraft_ui_egui, while a change to figcraft_ui_egui can't break figcraft_ui_egui.canvas.comments.
Position
Below the diagonal: figcraft_ui_egui uses a module listed above it, which is the healthy direction.
figcraft_ui_egui uses figcraft_ui_egui.panels.dev_mode, so a change to figcraft_ui_egui.panels.dev_mode can break figcraft_ui_egui, while a change to figcraft_ui_egui can't break figcraft_ui_egui.panels.dev_mode.
Position
Below the diagonal: figcraft_ui_egui uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in figcraft_ui_egui uses a type in figcraft_engine.
The types involved
figcraft_ui_egui.FigApp → figcraft_engine.Session
Direction
figcraft_ui_egui uses figcraft_engine, so a change to figcraft_engine can break figcraft_ui_egui, while a change to figcraft_ui_egui can't break figcraft_engine.
Position
Below the diagonal: figcraft_ui_egui uses a module listed above it, which is the healthy direction.
figcraft_ui_egui uses figcraft_ui_egui.canvas, so a change to figcraft_ui_egui.canvas can break figcraft_ui_egui, while a change to figcraft_ui_egui can't break figcraft_ui_egui.canvas.
Position
Below the diagonal: figcraft_ui_egui uses a module listed above it, which is the healthy direction.
figcraft_ui_egui uses figcraft_ui_egui.present, so a change to figcraft_ui_egui.present can break figcraft_ui_egui, while a change to figcraft_ui_egui can't break figcraft_ui_egui.present.
Position
Below the diagonal: figcraft_ui_egui uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 81% · Adequate · gated by D1, D2 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
13
High / Critical
A03:2025 — Software Supply Chain Failures
9
High / Critical
A02:2025 — Security Misconfiguration
3
Medium
A07:2025 — Authentication Failures
2
High / Critical
Roadmap
Top priorities: 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; Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery); Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No ADRs found finding(s) in ADR Quality.
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.
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
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 — 14
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 — 1387
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 — 57
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 22
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 52 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 52 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1431 of 1458 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.rs) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.rs) and this repository declares a Cargo test suite (repository root, 760 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D15 Churn × Complexity Hotspots — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. A hotspot's complexity is meant to be the worst body its churn actually touched. For crates/collab/src/change.rs that could not be established — the complexity reader for the file reports no body extents, or the history carries no per-line attribution — so the row quotes the file's worst body, which the counted changes may never have touched. The churn count is unaffected.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D31 IaC & Container Security — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Packaging/server/Dockerfile.dockerignore carries no `FROM` instruction, so it declares no build stage and every REDACTED rule this engine owns — the runtime-hardening, key-material, mutable-clone, no-op-shim, build-context, trust-anchor, install-guard, setuid and world-writable-path rules — is outside its own premise there and returned nothing. That silence is deliberate and correct: with no base image there is no image to reason about. It is reported here because it is NOT the same fact as a clean file, and coverage is stated as 1 of 2 Infrastructure-as-Code manifest(s) fully judged rather than as 100%. The vendor scanners (trivy, checkov) do read these files and their findings above stand; only this engine's own stage-keyed rules are absent. No owner action: a build file with no FROM is a legitimate include fragment.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — 20 | COPY --from=build /out/server.toml /etc/figcraft-server/server.toml -------------------- ERROR: failed to solve: gcr.io/distroless/cc-debian12:nonroot: failed to resolve source metadata for gcr.io/distroless/cc-debian12:nonroot: failed to do request: Head "https://gcr.io/v2/distroless/cc-debian12/manifests/nonroot": Forbidden; runtime evidence skipped.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Rust is not read yet, 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.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Rust is not read yet, 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.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X13 Undrained process stream — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X19 Unrestored process-global state — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X22 Contradicted release guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, TypeScript/JavaScript, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded, and this repository's Rust is not read yet, 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.
X23 Unguarded diagnostic materialisation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X25 Inert configuration knob — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart and Ruby source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart or Ruby was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and PHP, Java, Kotlin, Python, Ruby, Scala, Dart, Swift, Erlang, Go and JavaScript/TypeScript source only, and no C# was loaded and no PHP, Java, Kotlin, Python, Ruby, Scala, Dart, Swift, Erlang, Go, JavaScript or TypeScript was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Rust is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
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.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
384 function(s) exceeded the cyclomatic complexity threshold of 15; the worst was figcraft_ui_egui::icons::draw::draw at 183. A further 40 function(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 Prop::differs at 45 — they are counted neither in the figure above nor in this dimension's score. 12 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: crates/collab/src/change.rs (Prop::differs at 45), crates/format/src/fig/export/common.rs (figcraft_format::fig::export::common::node_field at 29), crates/engine/src/canvas/tools.rs (ToolId::id at 26), crates/doc/src/board.rs (BoardShape::path at 25), crates/format/src/fig/export/prototype.rs (Exporter::transition at 24), and 7 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 41 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with figcraft_ui_egui::icons::draw::draw (cyclomatic 183). — Refactoring it lifts Cyclomatic Complexity from 2.9 to about 3.7/10.
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.
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.
+ 52 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 43 bodies over 60 down to 60 or less in Cognitive Complexity — start with figcraft_ui_egui::panels::layers::layers (cognitive 131), figcraft_format::penpot::import (cognitive 123), Session::drag (cognitive 107). — 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 43 together lifts Cognitive Complexity from 2.0 to about 3.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
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.
Do you agree with this assessment?
D3 · God Classes7.6 / 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.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 50 FileTooLong finding(s) in God Classes — start with lib.rs (4), props.rs (2), library.rs (2). — One of this dimension's main actionable groups (50 warning-level).
Resolve the 49 FunctionTooLong finding(s) in God Classes — start with layers.rs (2), penpot.rs (2), menus.rs (2). — One of this dimension's main actionable groups (49 warning-level).
Resolve the 14 TooManyMethods finding(s) in God Classes — start with lib.rs (3), export.rs (2), store.rs. — One of this dimension's main actionable groups (14 warning-level).
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.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
90 duplicated block group(s) detected. A further 2 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 18 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 32 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with structure.rs (3), draw.rs (3), library.rs (2). — One of this dimension's main actionable groups (32 warning-level).
Resolve the 16 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with draw.rs (4), lib.rs (3), manage.rs. — One of this dimension's main actionable groups (16 warning-level).
Resolve the 8 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with draw.rs (2), change.rs, snap.rs. — One of this dimension's main actionable groups (8 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling7.4 / 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.
23 production modules (Cargo), 0 dependency cycle(s), 2 unstable depended-on module(s). Read from the build's own module declarations; 5 module(s) off the main sequence, with abstractness counted on 22 of the 23 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: figcraft-color · ×5
Unstable project figcraft-pdf
Unstable project figcraft-vectordrawable
What to do
Resolve the 5 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 1 Unstable project figcraft-pdf finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Unstable project figcraft-vectordrawable finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
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.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with services.rs, web.rs. — One of this dimension's main actionable groups (2 warning-level).
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.
Do you agree with this assessment?
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.
5079 test methods: 4909 unit, 170 integration, 0 BDD, 0 e2e. The Rust suite contributes 5079 `#[test]` function(s) across 760 file(s) declaring at least one; its unit/integration split is Cargo's own — 40 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
11 outdated, 0 yanked direct Cargo dependencies. Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
Outdated: crc32fast · ×11
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 607 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. A further 26 crate(s) in the closure resolve from git, a path or a private registry and publish no licence this pass can read; they are outside this verdict. This repository publishes itself under MIT OR Apache-2.0, which is its own choice and is not judged here.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 128 Hotspot finding(s) in Churn × Complexity Hotspots — start with draw.rs (4), lib.rs (4), props.rs (3). — One of this dimension's main actionable groups (128 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor10.0 / 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.
No source file's living knowledge is concentrated in a single author. Counted over 485 of the 522 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
0 deducted task-comment markers across 201084 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 30 document(s) read across 1 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
3 of 23 build units (Cargo) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
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.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
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
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
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.
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).
13 finding(s): 0 critical, 11 high, 0 medium, 2 low. 8 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 6 file(s) — `crates/engine/src/proto_conditional_tests.rs`, `crates/ui-egui/src/canvas/comments.rs` (line 326, line 327, line 328, …), `packaging/linux/AppRun` (line 32), `packaging/linux/package.sh` (line 52, line 87), `packaging/server/install.sh`, … (+1 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 8 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (8 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 5 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 2 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 485 of the 522 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with store.rs. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 4 Change coupling finding(s) in Change Coupling — start with catalog.rs, proto_panel.rs, cmd.rs. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
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.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.
Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.
Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
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 a README to the 28 of 28 project(s) that lack one — worth up to 2 pts.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability7.5 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 9/11 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `apps/figcraft-cli`, `xtask`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Add OpenTelemetry tracing/metrics (opentelemetry with tracing-opentelemetry) so requests are traceable across the system, not just health-probable.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Do you agree with this assessment?
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Other · Security — Read from this repository's Rust 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. This repository serves no HTTP of its own — no HTTP-server crate (actix-web, axum, Rocket, warp, poem, tide, salvo, tonic, a hyper server, …) among its Cargo manifests' run-time dependencies, and no server started in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker.
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+ (`sha2::Sha256::digest(…)`) 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. — crates/format/src/fig/export.rs:618
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.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · 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.
Do you agree with this assessment?
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.
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.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
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 — 13 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 18 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X9 Subsumed condition operand — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 66 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — Frontend below the scale floor (10 DOM element(s) < 25) — too little surface to assess accessibility.
AC2 Forms & labels — Frontend below the scale floor (10 DOM element(s) < 25) — too little surface to assess accessibility.
AC3 Page structure — Frontend below the scale floor (10 DOM element(s) < 25) — too little surface to assess accessibility.
AC4 Keyboard semantics — Frontend below the scale floor (10 DOM element(s) < 25) — too little surface to assess accessibility.
AC5 ARIA correctness — Frontend below the scale floor (10 DOM element(s) < 25) — too little surface to assess accessibility.
AC6 Visual & motion safety — Frontend below the scale floor (10 DOM element(s) < 25) — too little surface to assess accessibility.
AC7 A11y enforcement — Frontend below the scale floor (10 DOM element(s) < 25) — too little surface to assess accessibility.
AX1 Captive dependencies — Not applicable: Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
AX2 Stateful singletons — Not applicable: Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — docker build failed (exit 1) — 20 | COPY --from=build /out/server.toml /etc/figcraft-server/server.toml -------------------- ERROR: failed to solve: gcr.io/distroless/cc-debian12:nonroot: failed to resolve source metadata for gcr.io/distroless/cc-debian12:nonroot: failed to do request: Head "https://gcr.io/v2/distroless/cc-debian12/manifests/nonroot": 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 — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository starts no server another machine can reach (no actix-web HttpServer, axum::serve, Rocket launch, warp::serve, poem or salvo Server, tonic Server::builder, hyper or tiny_http server outside examples and tests, none bound beyond loopback). Access control is therefore N/A here — a crate is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~124405 lines of test source are present (.rs) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — the .rs suite was found but not re-run
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.
D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; Rust not measured.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Aggregate roots were found in only one source directory (collab), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .rs, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
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 (.rs), 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) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — applicable but not scored (3 signals for this style, 3 needed — the count is met but a required primary signal is absent): 1 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 58 value object(s); 1 domain event(s); its domain events are published by services or handlers — no domain entity raises one; no aggregate is declared and no domain structure surrounds the state-guarding types: not claimed as DDD
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Rust 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 — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `#[bench]`, criterion's `bench_function`/`bench_with_input`, `#[divan::bench]` or `#[library_benchmark]` in any `.rs` file, or criterion, divan, iai or a `[[bench]]` target in a Cargo.toml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
X12 Unreachable branch — 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
X13 Undrained process stream — 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
X16 Unfloored truncation loop — 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
X17 Uncapped recursion over a caller-supplied document — 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
X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X19 Unrestored process-global state — 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
X2 Cancellation propagation — no C# was loaded; this repository's Rust was read, and no request in it can be cancelled by a caller — a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
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.
X22 Contradicted release guard — 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
X23 Unguarded diagnostic materialisation — 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
X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X25 Inert configuration knob — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Rust's compiler refuses the unsynchronised version: a collection shared between a callback's thread and the waiting body must be `Sync`, which a `Vec`, `VecDeque` or `HashMap` is only behind a `Mutex`/`RwLock`, so the race this check looks for cannot be written in safe Rust. Not a gap in the analyzer and not a finding about your code.
X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Rust was read, and it logs through none: the `log` crate's macros take one finished message (as log4net does in C#; its `kv` values are an opt-in its backends mostly drop), `println!`/`eprintln!` are not loggers, or it makes no log call outside its tests and examples at all. Calls through `tracing` (`tracing::info!`, or `info!` imported from it) would be judged.
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Boundary-crossing change coupling: store.rs ↔ link.rs apps/figcraft-server/src/store.rs:1— `apps/figcraft-server/src/store.rs` (context figcraft-server) and `crates/collab-net/src/link.rs` (context crates) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `87254913` M3: library analytics list how each style and variable is used (#1730); `2d784c36` M3: library analytics count insertions and show them over time (#1704); `be6a7af2` M3: team library analytics count detached instances (#1668) — run `git show` on any of them.
figcraft_ui_egui::panels::layers::layers (cognitive 131) crates/ui-egui/src/panels/layers.rs:974— figcraft_ui_egui::panels::layers::layers has cognitive complexity 131 (threshold 15). Drivers by points: if/else 63 (105 pts), boolean chains 21, match/switch 2 (4 pts), loops 1 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::panels::proto_panel::action_fields (cognitive 99) crates/ui-egui/src/panels/proto_panel.rs:888— figcraft_ui_egui::panels::proto_panel::action_fields has cognitive complexity 99 (threshold 15). Drivers by points: if/else 29 (83 pts), loops 5 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 60). 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.
figcraft_ui_egui::panels::layers::pages (cognitive 97) crates/ui-egui/src/panels/layers.rs:184— figcraft_ui_egui::panels::layers::pages has cognitive complexity 97 (threshold 15). Drivers by points: if/else 48 (83 pts), boolean chains 13, loops 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::present::input::input (cognitive 94) crates/ui-egui/src/present/input.rs:170— figcraft_ui_egui::present::input::input has cognitive complexity 94 (threshold 15). Drivers by points: if/else 39 (70 pts), boolean chains 20, loops 3, match/switch 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::canvas::selection_spacing::input (cognitive 93) crates/ui-egui/src/canvas/selection_spacing.rs:212— figcraft_ui_egui::canvas::selection_spacing::input has cognitive complexity 93 (threshold 15). Drivers by points: if/else 26 (63 pts), match/switch 5 (19 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 53). 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.
figcraft_ui_egui::canvas::input::input (cognitive 89) crates/ui-egui/src/canvas/input.rs:146— figcraft_ui_egui::canvas::input::input has cognitive complexity 89 (threshold 15). Drivers by points: if/else 39 (57 pts), boolean chains 27, match/switch 2 (4 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::panels::component_panel::properties_ui (cognitive 85) crates/ui-egui/src/panels/component_panel.rs:228— figcraft_ui_egui::panels::component_panel::properties_ui has cognitive complexity 85 (threshold 15). Drivers by points: if/else 30 (59 pts), loops 7 (13 pts), boolean chains 8, match/switch 2 (5 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::canvas::handles::input (cognitive 83) crates/ui-egui/src/canvas/handles.rs:535— figcraft_ui_egui::canvas::handles::input has cognitive complexity 83 (threshold 15). Drivers by points: if/else 34 (67 pts), boolean chains 7, match/switch 2 (5 pts), loops 3 (4 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::canvas::handles::apply (cognitive 83) crates/ui-egui/src/canvas/handles.rs:681— figcraft_ui_egui::canvas::handles::apply has cognitive complexity 83 (threshold 15). Drivers by points: if/else 35 (72 pts), match/switch 4 (8 pts), boolean chains 3 (nesting depth added 41). 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.
figcraft_ui_egui::menus::popups (cognitive 83) crates/ui-egui/src/menus.rs:369— figcraft_ui_egui::menus::popups has cognitive complexity 83 (threshold 15). Drivers by points: if/else 34 (61 pts), boolean chains 14, loops 3 (8 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::panels::right::paints::paints (cognitive 81) crates/ui-egui/src/panels/right/paints.rs:285— figcraft_ui_egui::panels::right::paints::paints has cognitive complexity 81 (threshold 15). Drivers by points: if/else 36 (58 pts), loops 5 (14 pts), boolean chains 6, match/switch 2 (3 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::widgets::style_picker::local_styles (cognitive 72) crates/ui-egui/src/widgets/style_picker.rs:1222— figcraft_ui_egui::widgets::style_picker::local_styles has cognitive complexity 72 (threshold 15). Drivers by points: if/else 20 (62 pts), loops 3 (6 pts), match/switch 1 (4 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::widgets::style_picker::listing (cognitive 71) crates/ui-egui/src/widgets/style_picker.rs:520— figcraft_ui_egui::widgets::style_picker::listing has cognitive complexity 71 (threshold 15). Drivers by points: if/else 26 (48 pts), loops 6 (11 pts), boolean chains 7, match/switch 2 (5 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::a11y::keys (cognitive 69) crates/ui-egui/src/a11y.rs:308— figcraft_ui_egui::a11y::keys has cognitive complexity 69 (threshold 15). Drivers by points: if/else 28 (48 pts), boolean chains 12, loops 3 (6 pts), match/switch 2 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::panels::right::header (cognitive 69) crates/ui-egui/src/panels/right.rs:372— figcraft_ui_egui::panels::right::header has cognitive complexity 69 (threshold 15). Drivers by points: if/else 29 (50 pts), loops 4 (7 pts), match/switch 3 (7 pts), boolean chains 5 (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.
figcraft_ui_egui::dialogs::show (cognitive 68) crates/ui-egui/src/dialogs.rs:208— figcraft_ui_egui::dialogs::show has cognitive complexity 68 (threshold 15). Drivers by points: if/else 28 (54 pts), loops 4 (8 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::panels::typography::fields::type_settings (cognitive 67) crates/ui-egui/src/panels/typography/fields.rs:272— figcraft_ui_egui::panels::typography::fields::type_settings has cognitive complexity 67 (threshold 15). Drivers by points: if/else 27 (53 pts), match/switch 4 (8 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::widgets::number_field_impl (cognitive 67) crates/ui-egui/src/widgets.rs:241— figcraft_ui_egui::widgets::number_field_impl has cognitive complexity 67 (threshold 15). Drivers by points: if/else 28 (43 pts), boolean chains 14, match/switch 7 (10 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.
figcraft_ui_egui::panels::proto_editor::action_item (cognitive 62) crates/ui-egui/src/panels/proto_editor.rs:234— figcraft_ui_egui::panels::proto_editor::action_item has cognitive complexity 62 (threshold 15). Drivers by points: if/else 29 (52 pts), boolean chains 5, match/switch 2 (5 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::present::player::top_bar (cognitive 62) crates/ui-egui/src/present/player.rs:115— figcraft_ui_egui::present::player::top_bar has cognitive complexity 62 (threshold 15). Drivers by points: if/else 32 (52 pts), boolean chains 6, loops 2 (3 pts), match/switch 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::icons::draw::draw (cognitive 61) crates/ui-egui/src/icons/draw.rs:279— figcraft_ui_egui::icons::draw::draw has cognitive complexity 61 (threshold 15). Drivers by points: if/else 20 (32 pts), loops 14 (28 pts), match/switch 1 (nesting depth added 26). 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.
figcraft_ui_egui::panels::selection_colors::section (cognitive 60) crates/ui-egui/src/panels/selection_colors.rs:63— figcraft_ui_egui::panels::selection_colors::section has cognitive complexity 60 (threshold 15). Drivers by points: if/else 21 (51 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
figcraft_ui_egui::widgets::colorpicker::show (cognitive 60) crates/ui-egui/src/widgets/colorpicker.rs:936— figcraft_ui_egui::widgets::colorpicker::show has cognitive complexity 60 (threshold 15). Drivers by points: if/else 29 (45 pts), match/switch 4 (6 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::canvas::handles::al_zones (cognitive 59) crates/ui-egui/src/canvas/handles.rs:320— figcraft_ui_egui::canvas::handles::al_zones has cognitive complexity 59 (threshold 15). Drivers by points: if/else 20 (34 pts), loops 8 (17 pts), boolean chains 5, match/switch 1 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_ui_egui::panels::typography::picker::font_picker (cognitive 59) crates/ui-egui/src/panels/typography/picker.rs:67— figcraft_ui_egui::panels::typography::picker::font_picker has cognitive complexity 59 (threshold 15). Drivers by points: if/else 21 (36 pts), match/switch 7 (13 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_engine::cmd::arrange::scale_node (cognitive 69) crates/engine/src/cmd/arrange.rs:405— figcraft_engine::cmd::arrange::scale_node has cognitive complexity 69 (threshold 15). Drivers by points: if/else 15 (35 pts), loops 12 (27 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_engine::dev::code_connect::render (cognitive 69) crates/engine/src/dev/code_connect.rs:375— figcraft_engine::dev::code_connect::render has cognitive complexity 69 (threshold 15). Drivers by points: if/else 15 (44 pts), match/switch 6 (21 pts), boolean chains 3, loops 1 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_engine::assets::library_swap::swap_library (cognitive 68) crates/engine/src/assets/library_swap.rs:74— figcraft_engine::assets::library_swap::swap_library has cognitive complexity 68 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 12 (18 pts), match/switch 6 (11 pts), boolean chains 8 (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.
figcraft_engine::cmd::props::apply_shape (cognitive 65) crates/engine/src/cmd/props.rs:996— figcraft_engine::cmd::props::apply_shape has cognitive complexity 65 (threshold 15). Drivers by points: if/else 12 (30 pts), match/switch 9 (22 pts), loops 4 (12 pts), boolean chains 1 (nesting depth added 39). 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.
figcraft_engine::cmd::file::load::font_report_with_families (cognitive 61) crates/engine/src/cmd/file/load.rs:480— figcraft_engine::cmd::file::load::font_report_with_families has cognitive complexity 61 (threshold 15). Drivers by points: if/else 16 (43 pts), loops 7 (15 pts), boolean chains 3 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_engine::cmd::component::props::edit_prop (cognitive 59) crates/engine/src/cmd/component/props.rs:418— figcraft_engine::cmd::component::props::edit_prop has cognitive complexity 59 (threshold 15). Drivers by points: if/else 20 (39 pts), match/switch 4 (8 pts), loops 3 (7 pts), boolean chains 5 (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.
figcraft_engine::cmd::variables_io::import (cognitive 59) crates/engine/src/cmd/variables_io.rs:256— figcraft_engine::cmd::variables_io::import has cognitive complexity 59 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 7 (14 pts), match/switch 5 (14 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.
figcraft_engine::assets::components::patch::patch_structure (cognitive 56) crates/engine/src/assets/components/patch.rs:312— figcraft_engine::assets::components::patch::patch_structure has cognitive complexity 56 (threshold 15). Drivers by points: if/else 11 (36 pts), loops 5 (12 pts), boolean chains 4, match/switch 1 (4 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_engine::canvas::vectoredit::ops::delete_vertices (cognitive 53) crates/engine/src/canvas/vectoredit/ops.rs:351— figcraft_engine::canvas::vectoredit::ops::delete_vertices has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (32 pts), loops 6 (14 pts), match/switch 1 (5 pts), boolean chains 2 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_engine::cmd::structure::offset_path (cognitive 52) crates/engine/src/cmd/structure.rs:836— figcraft_engine::cmd::structure::offset_path has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (44 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_engine::assets::components::patch::patch_copies (cognitive 51) crates/engine/src/assets/components/patch.rs:411— figcraft_engine::assets::components::patch::patch_copies has cognitive complexity 51 (threshold 15). Drivers by points: if/else 10 (29 pts), boolean chains 12, loops 3 (7 pts), match/switch 1 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_engine::cmd::styles::apply_bindings_matching (cognitive 50) crates/engine/src/cmd/styles.rs:1170— figcraft_engine::cmd::styles::apply_bindings_matching has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (37 pts), match/switch 3 (8 pts), loops 2 (3 pts), boolean chains 2 (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.
figcraft_engine::derived::normalize (cognitive 47) crates/engine/src/derived.rs:33— figcraft_engine::derived::normalize has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (28 pts), loops 10 (14 pts), boolean chains 5 (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.
figcraft_engine::canvas::textedit::key (cognitive 46) crates/engine/src/canvas/textedit.rs:425— figcraft_engine::canvas::textedit::key has cognitive complexity 46 (threshold 15). Drivers by points: if/else 19 (31 pts), match/switch 6 (10 pts), boolean chains 5 (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.
figcraft_engine::cmd::structure::simplify (cognitive 46) crates/engine/src/cmd/structure.rs:775— figcraft_engine::cmd::structure::simplify has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (31 pts), loops 3 (9 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_engine::selection::selection_colors::collect (cognitive 46) crates/engine/src/selection/selection_colors.rs:56— figcraft_engine::selection::selection_colors::collect has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_engine::canvas::shapebuilder::apply (cognitive 44) crates/engine/src/canvas/shapebuilder.rs:407— figcraft_engine::canvas::shapebuilder::apply has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 6, loops 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_engine::canvas::vectoredit::ops::set_mirroring (cognitive 43) crates/engine/src/canvas/vectoredit/ops.rs:128— figcraft_engine::canvas::vectoredit::ops::set_mirroring has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (38 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_engine::cmd::file::load::expand_penpot_raw_svgs (cognitive 42) crates/engine/src/cmd/file/load.rs:406— figcraft_engine::cmd::file::load::expand_penpot_raw_svgs has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (34 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_engine::assets::library::adopt_pasted (cognitive 41) crates/engine/src/assets/library.rs:1217— figcraft_engine::assets::library::adopt_pasted has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 5 (8 pts), match/switch 2 (6 pts), boolean chains 3 (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.
figcraft_engine::automation::params::normalize_paintish (cognitive 40) crates/engine/src/automation/params.rs:201— figcraft_engine::automation::params::normalize_paintish has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 2 (6 pts), boolean chains 2, match/switch 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.
figcraft_engine::cmd::create::create (cognitive 38) crates/engine/src/cmd/create.rs:267— figcraft_engine::cmd::create::create has cognitive complexity 38 (threshold 15). Drivers by points: if/else 23 (32 pts), boolean chains 5, match/switch 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.
figcraft_engine::dev::codegen::swift::swift_layer (cognitive 37) crates/engine/src/dev/codegen/swift.rs:46— figcraft_engine::dev::codegen::swift::swift_layer has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (22 pts), match/switch 5 (9 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_engine::assets::components::patch::sync_after_edit (cognitive 36) crates/engine/src/assets/components/patch.rs:14— figcraft_engine::assets::components::patch::sync_after_edit has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 8, loops 5, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_engine::assets::components::rebase::rebase_instance (cognitive 36) crates/engine/src/assets/components/rebase.rs:167— figcraft_engine::assets::components::rebase::rebase_instance has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 7, loops 2, match/switch 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.
Hotspot: crates/ui-egui/src/panels/layers.rs crates/ui-egui/src/panels/layers.rs:974— crates/ui-egui/src/panels/layers.rs changed 55 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in figcraft_ui_egui::panels::layers::layers at line 974. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/ui-egui/src/panels/layers.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/ui-egui/src/panels/right.rs crates/ui-egui/src/panels/right.rs:372— crates/ui-egui/src/panels/right.rs changed 107 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in figcraft_ui_egui::panels::right::header at line 372. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/ui-egui/src/panels/right.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/ui-egui/src/menus.rs crates/ui-egui/src/menus.rs:74— crates/ui-egui/src/menus.rs changed 75 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in figcraft_ui_egui::menus::invoke at line 74. 10 of those changes were fix/bug commits, and the other 65 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/ui-egui/src/menus.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/ui-egui/src/canvas.rs crates/ui-egui/src/canvas.rs:196— crates/ui-egui/src/canvas.rs changed 111 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in figcraft_ui_egui::canvas::show at line 196. 15 of those changes were fix/bug commits, and the other 96 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/ui-egui/src/canvas.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/render/src/draw.rs crates/render/src/draw.rs:646— crates/render/src/draw.rs changed 57 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in figcraft_render::draw::draw_layer at line 646. 8 of those changes were fix/bug commits, and the other 49 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/render/src/draw.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/ui-egui/src/widgets.rs crates/ui-egui/src/widgets.rs:241— crates/ui-egui/src/widgets.rs changed 52 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in figcraft_ui_egui::widgets::number_field_impl at line 241. 7 of those changes were fix/bug commits, and the other 45 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/ui-egui/src/widgets.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/text/src/layout.rs crates/text/src/layout.rs:1153— crates/text/src/layout.rs changed 47 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in figcraft_text::layout::layout at line 1153. 7 of those changes were fix/bug commits, and the other 40 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/text/src/layout.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/engine/src/cmd/props.rs crates/engine/src/cmd/props.rs:996— crates/engine/src/cmd/props.rs changed 52 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in figcraft_engine::cmd::props::apply_shape at line 996. 8 of those changes were fix/bug commits, and the other 44 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/engine/src/cmd/props.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/ui-egui/src/widgets/colorpicker.rs crates/ui-egui/src/widgets/colorpicker.rs:936— crates/ui-egui/src/widgets/colorpicker.rs changed 48 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in figcraft_ui_egui::widgets::colorpicker::show at line 936. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/ui-egui/src/widgets/colorpicker.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/ui-egui/src/dialogs.rs crates/ui-egui/src/dialogs.rs:208— crates/ui-egui/src/dialogs.rs changed 54 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in figcraft_ui_egui::dialogs::show at line 208. 5 of those changes were fix/bug commits, and the other 49 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/ui-egui/src/dialogs.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/ui-egui/src/shortcuts.rs crates/ui-egui/src/shortcuts.rs:419— crates/ui-egui/src/shortcuts.rs changed 45 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in figcraft_ui_egui::shortcuts::key_event at line 419. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/ui-egui/src/shortcuts.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/ui-egui/src/panels/proto_panel.rs crates/ui-egui/src/panels/proto_panel.rs:888— crates/ui-egui/src/panels/proto_panel.rs changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in figcraft_ui_egui::panels::proto_panel::action_fields at line 888. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/ui-egui/src/panels/proto_panel.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/engine/src/cmd/styles.rs crates/engine/src/cmd/styles.rs:1046— crates/engine/src/cmd/styles.rs changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in figcraft_engine::cmd::styles::bound_field at line 1046. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/engine/src/cmd/styles.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/ui-egui/src/control.rs crates/ui-egui/src/control.rs:970— crates/ui-egui/src/control.rs changed 61 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in figcraft_ui_egui::control::ui_key at line 970. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/ui-egui/src/control.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/format/src/fig/map.rs crates/format/src/fig/map.rs:265— crates/format/src/fig/map.rs changed 62 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Mapper::new at line 265. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/format/src/fig/map.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/doc/src/lib.rs crates/doc/src/lib.rs:889— crates/doc/src/lib.rs changed 59 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Document::paste_nodes at line 889. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/doc/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/ui-egui/src/panels/component_panel.rs crates/ui-egui/src/panels/component_panel.rs:228— crates/ui-egui/src/panels/component_panel.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in figcraft_ui_egui::panels::component_panel::properties_ui at line 228. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/ui-egui/src/panels/component_panel.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/ui-egui/src/widgets/style_picker.rs crates/ui-egui/src/widgets/style_picker.rs:520— crates/ui-egui/src/widgets/style_picker.rs changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in figcraft_ui_egui::widgets::style_picker::listing at line 520. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/ui-egui/src/widgets/style_picker.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/engine/src/canvas/textedit.rs crates/engine/src/canvas/textedit.rs:425— crates/engine/src/canvas/textedit.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in figcraft_engine::canvas::textedit::key at line 425. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/engine/src/canvas/textedit.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: apps/figcraft/src/main.rs apps/figcraft/src/main.rs:137— apps/figcraft/src/main.rs changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in figcraft::main 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-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- apps/figcraft/src/main.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/ui-egui/src/panels/assets_panel.rs crates/ui-egui/src/panels/assets_panel.rs:840— crates/ui-egui/src/panels/assets_panel.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in figcraft_ui_egui::panels::assets_panel::publish_form at line 840. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/ui-egui/src/panels/assets_panel.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/engine/src/cmd/create.rs crates/engine/src/cmd/create.rs:267— crates/engine/src/cmd/create.rs changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in figcraft_engine::cmd::create::create at line 267. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/engine/src/cmd/create.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/mcp/src/tools.rs crates/mcp/src/tools.rs:537— crates/mcp/src/tools.rs changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in figcraft_mcp::tools::call_tool at line 537. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/mcp/src/tools.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/format/src/rest.rs crates/format/src/rest.rs:616— crates/format/src/rest.rs changed 38 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in Ctx::kind at line 616. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/format/src/rest.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/svg/src/lib.rs crates/svg/src/lib.rs:517— crates/svg/src/lib.rs changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in W::render_node at line 517. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-08..2026-11-06, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-08 14:59:45 +01:00' --until='2026-11-06 14:59:45 +01:00' --full-history --no-merges -- crates/svg/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
figcraft_ui_egui::icons::draw::draw (cyclomatic 183) crates/ui-egui/src/icons/draw.rs:279— figcraft_ui_egui::icons::draw::draw has cyclomatic complexity 183 (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.
figcraft_ui_egui::panels::layers::layers (cyclomatic 78) crates/ui-egui/src/panels/layers.rs:974— figcraft_ui_egui::panels::layers::layers has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_ui_egui::canvas::input::input (cyclomatic 67) crates/ui-egui/src/canvas/input.rs:146— figcraft_ui_egui::canvas::input::input has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_ui_egui::present::input::input (cyclomatic 59) crates/ui-egui/src/present/input.rs:170— figcraft_ui_egui::present::input::input has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_ui_egui::panels::layers::pages (cyclomatic 58) crates/ui-egui/src/panels/layers.rs:184— figcraft_ui_egui::panels::layers::pages 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.
figcraft_ui_egui::widgets::number_field_impl (cyclomatic 50) crates/ui-egui/src/widgets.rs:241— figcraft_ui_egui::widgets::number_field_impl has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_ui_egui::menus::invoke (cyclomatic 48) crates/ui-egui/src/menus.rs:74— figcraft_ui_egui::menus::invoke has cyclomatic complexity 48 (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.
figcraft_ui_egui::menus::popups (cyclomatic 47) crates/ui-egui/src/menus.rs:369— figcraft_ui_egui::menus::popups has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_ui_egui::panels::component_panel::properties_ui (cyclomatic 45) crates/ui-egui/src/panels/component_panel.rs:228— figcraft_ui_egui::panels::component_panel::properties_ui 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.
figcraft_ui_egui::canvas::handles::input (cyclomatic 44) crates/ui-egui/src/canvas/handles.rs:535— figcraft_ui_egui::canvas::handles::input has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_ui_egui::panels::proto_panel::action_fields (cyclomatic 43) crates/ui-egui/src/panels/proto_panel.rs:888— figcraft_ui_egui::panels::proto_panel::action_fields 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.
figcraft_ui_egui::a11y::keys (cyclomatic 42) crates/ui-egui/src/a11y.rs:308— figcraft_ui_egui::a11y::keys has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_ui_egui::canvas::handles::apply (cyclomatic 42) crates/ui-egui/src/canvas/handles.rs:681— figcraft_ui_egui::canvas::handles::apply has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_ui_egui::widgets::colorpicker::show (cyclomatic 42) crates/ui-egui/src/widgets/colorpicker.rs:936— figcraft_ui_egui::widgets::colorpicker::show has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_ui_egui::canvas::overlays::overlays (cyclomatic 41) crates/ui-egui/src/canvas/overlays.rs:14— figcraft_ui_egui::canvas::overlays::overlays 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.
figcraft_ui_egui::panels::right::paints::paints (cyclomatic 40) crates/ui-egui/src/panels/right/paints.rs:285— figcraft_ui_egui::panels::right::paints::paints 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.
figcraft_ui_egui::canvas::selection_spacing::input (cyclomatic 38) crates/ui-egui/src/canvas/selection_spacing.rs:212— figcraft_ui_egui::canvas::selection_spacing::input has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_ui_egui::shortcuts::key_event (cyclomatic 38) crates/ui-egui/src/shortcuts.rs:419— figcraft_ui_egui::shortcuts::key_event has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_ui_egui::widgets::style_picker::listing (cyclomatic 38) crates/ui-egui/src/widgets/style_picker.rs:520— figcraft_ui_egui::widgets::style_picker::listing has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_ui_egui::dialogs::show (cyclomatic 37) crates/ui-egui/src/dialogs.rs:208— figcraft_ui_egui::dialogs::show has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_ui_egui::panels::right::header (cyclomatic 37) crates/ui-egui/src/panels/right.rs:372— figcraft_ui_egui::panels::right::header has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_ui_egui::panels::typography::fields::type_settings (cyclomatic 37) crates/ui-egui/src/panels/typography/fields.rs:272— figcraft_ui_egui::panels::typography::fields::type_settings has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_ui_egui::tabs::tab_bar (cyclomatic 36) crates/ui-egui/src/tabs.rs:102— figcraft_ui_egui::tabs::tab_bar has cyclomatic complexity 36 (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.
figcraft_ui_egui::canvas::comments::composer (cyclomatic 35) crates/ui-egui/src/canvas/comments.rs:497— figcraft_ui_egui::canvas::comments::composer has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_ui_egui::dialogs::variables_panel::value_cell (cyclomatic 35) crates/ui-egui/src/dialogs/variables_panel.rs:780— figcraft_ui_egui::dialogs::variables_panel::value_cell has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_engine::dev::tailwind::decl (cyclomatic 63) crates/engine/src/dev/tailwind.rs:239— figcraft_engine::dev::tailwind::decl has cyclomatic complexity 63 (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.
figcraft_engine::assets::library_swap::swap_library (cyclomatic 41) crates/engine/src/assets/library_swap.rs:74— figcraft_engine::assets::library_swap::swap_library has cyclomatic complexity 41 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
figcraft_engine::canvas::textedit::key (cyclomatic 41) crates/engine/src/canvas/textedit.rs:425— figcraft_engine::canvas::textedit::key 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.
figcraft_engine::cmd::props::apply_shape (cyclomatic 40) crates/engine/src/cmd/props.rs:996— figcraft_engine::cmd::props::apply_shape has cyclomatic complexity 40 (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.
figcraft_engine::cmd::arrange::scale_node (cyclomatic 35) crates/engine/src/cmd/arrange.rs:405— figcraft_engine::cmd::arrange::scale_node has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_engine::cmd::styles::apply_bindings_matching (cyclomatic 33) crates/engine/src/cmd/styles.rs:1170— figcraft_engine::cmd::styles::apply_bindings_matching has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: figcraft_engine::cmd::styles::bound_field (cyclomatic 38) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
figcraft_engine::cmd::component::props::edit_prop (cyclomatic 32) crates/engine/src/cmd/component/props.rs:418— figcraft_engine::cmd::component::props::edit_prop has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_engine::assets::components::diff::diff_groups (cyclomatic 31) crates/engine/src/assets/components/diff.rs:39— figcraft_engine::assets::components::diff::diff_groups has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
figcraft_engine::cmd::create::create (cyclomatic 30) crates/engine/src/cmd/create.rs:267— figcraft_engine::cmd::create::create 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.
figcraft_engine::cmd::props::apply_look (cyclomatic 30) crates/engine/src/cmd/props.rs:566— figcraft_engine::cmd::props::apply_look has cyclomatic complexity 30 (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.
figcraft_engine::derived::normalize (cyclomatic 30) crates/engine/src/derived.rs:33— figcraft_engine::derived::normalize 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.
figcraft_engine::assets::components::instances::copy_group (cyclomatic 29) crates/engine/src/assets/components/instances.rs:114— figcraft_engine::assets::components::instances::copy_group has cyclomatic complexity 29 (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.
figcraft_engine::dev::codegen::flutter::flutter_widget (cyclomatic 28) crates/engine/src/dev/codegen/flutter.rs:164— figcraft_engine::dev::codegen::flutter::flutter_widget has cyclomatic complexity 28 (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.
figcraft_engine::keymap::display (cyclomatic 28) crates/engine/src/keymap.rs:506— figcraft_engine::keymap::display has cyclomatic complexity 28 (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. This is NOT this file's highest cyclomatic complexity: figcraft_engine::keymap::normalize (cyclomatic 33) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
figcraft_engine::assets::components::patch::patch_copies (cyclomatic 27) crates/engine/src/assets/components/patch.rs:411— figcraft_engine::assets::components::patch::patch_copies 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.
figcraft_engine::canvas::vectoredit::key (cyclomatic 27) crates/engine/src/canvas/vectoredit.rs:740— figcraft_engine::canvas::vectoredit::key has cyclomatic complexity 27 (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.
figcraft_engine::dev::code_connect::check (cyclomatic 27) crates/engine/src/dev/code_connect.rs:470— figcraft_engine::dev::code_connect::check has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
figcraft_engine::dev::codegen::swift::swift_layer (cyclomatic 27) crates/engine/src/dev/codegen/swift.rs:46— figcraft_engine::dev::codegen::swift::swift_layer 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.
figcraft_engine::assets::components::patch::sync_after_edit (cyclomatic 26) crates/engine/src/assets/components/patch.rs:14— figcraft_engine::assets::components::patch::sync_after_edit 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.
figcraft_engine::cmd::file::load::font_report_with_families (cyclomatic 26) crates/engine/src/cmd/file/load.rs:480— figcraft_engine::cmd::file::load::font_report_with_families 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.
figcraft_engine::cmd::props::apply_sizing (cyclomatic 26) crates/engine/src/cmd/props.rs:788— figcraft_engine::cmd::props::apply_sizing 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.
figcraft_engine::canvas::shapebuilder::apply (cyclomatic 25) crates/engine/src/canvas/shapebuilder.rs:407— figcraft_engine::canvas::shapebuilder::apply 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.
figcraft_engine::cmd::props::apply_layout (cyclomatic 25) crates/engine/src/cmd/props.rs:701— figcraft_engine::cmd::props::apply_layout has cyclomatic complexity 25 (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.
figcraft_engine::cmd::props::apply_text_style (cyclomatic 25) crates/engine/src/cmd/props.rs:1245— figcraft_engine::cmd::props::apply_text_style 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.
figcraft_engine::cmd::variables_io::import (cyclomatic 25) crates/engine/src/cmd/variables_io.rs:256— figcraft_engine::cmd::variables_io::import 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.
FileTooLong: src/penpot.rs crates/format/src/penpot.rs— FileTooLong — 2984 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 108 free functions. The bar is 500 significant lines; this is 2484 over it, 5.97× 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: penpot/export.rs crates/format/src/penpot/export.rs— FileTooLong — 1303 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 83% of them inside a single declaration: Exporter (2 blocks, 135-1794). The bar is 500 significant lines; this is 803 over it, 2.61× 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/layout.rs crates/text/src/layout.rs— FileTooLong — 1272 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 41 free functions. The bar is 500 significant lines; this is 772 over it, 2.54× 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: cmd/props.rs crates/engine/src/cmd/props.rs— FileTooLong — 1022 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 52 free functions. The bar is 500 significant lines; this is 522 over it, 2.04× 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/fontdb.rs crates/text/src/fontdb.rs— FileTooLong — 995 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 45 free functions. The bar is 500 significant lines; this is 495 over it, 1.99× 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: widgets/colorpicker.rs crates/ui-egui/src/widgets/colorpicker.rs— FileTooLong — 978 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 43 free functions. The bar is 500 significant lines; this is 478 over it, 1.96× 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/rest.rs crates/format/src/rest.rs— FileTooLong — 972 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 62% of them inside a single declaration: Ctx (2 blocks, 416-1323). The bar is 500 significant lines; this is 472 over it, 1.94× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/props.rs crates/doc/src/props.rs— FileTooLong — 968 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 468 over it, 1.94× 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/live.rs crates/ui-egui/src/live.rs— FileTooLong — 941 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 56 free functions. The bar is 500 significant lines; this is 441 over it, 1.88× 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: cmd/styles.rs crates/engine/src/cmd/styles.rs— FileTooLong — 937 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 42 free functions. 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: panels/proto_panel.rs crates/ui-egui/src/panels/proto_panel.rs— FileTooLong — 919 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 42 free functions. The bar is 500 significant lines; this is 419 over it, 1.84× 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/control.rs crates/ui-egui/src/control.rs— FileTooLong — 916 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 38 free functions. The bar is 500 significant lines; this is 416 over it, 1.83× 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: canvas/vectoredit.rs crates/engine/src/canvas/vectoredit.rs— FileTooLong — 892 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 41 free functions. The bar is 500 significant lines; this is 392 over it, 1.78× 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: widgets/style_picker.rs crates/ui-egui/src/widgets/style_picker.rs— FileTooLong — 877 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 46 free functions. The bar is 500 significant lines; this is 377 over it, 1.75× 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: assets/library.rs crates/engine/src/assets/library.rs— FileTooLong — 875 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 55 free functions. The bar is 500 significant lines; this is 375 over it, 1.75× 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: panels/assets_panel.rs crates/ui-egui/src/panels/assets_panel.rs— FileTooLong — 853 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 34 free functions. The bar is 500 significant lines; this is 353 over it, 1.71× 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: cmd/structure.rs crates/engine/src/cmd/structure.rs— FileTooLong — 852 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 352 over it, 1.70× 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/tools.rs crates/mcp/src/tools.rs— FileTooLong — 847 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 49 free functions. The bar is 500 significant lines; this is 347 over it, 1.69× 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/widgets.rs crates/ui-egui/src/widgets.rs— FileTooLong — 847 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 63 free functions. The bar is 500 significant lines; this is 347 over it, 1.69× 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: panels/layers.rs crates/ui-egui/src/panels/layers.rs— FileTooLong — 839 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 39 free functions. The bar is 500 significant lines; this is 339 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: canvas/comments.rs crates/ui-egui/src/canvas/comments.rs— FileTooLong — 831 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 41 free functions. The bar is 500 significant lines; this is 331 over it, 1.66× 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: vectoredit/pointer.rs crates/engine/src/canvas/vectoredit/pointer.rs— FileTooLong — 826 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 87% of them inside a single declaration: Session (187-1181). The bar is 500 significant lines; this is 326 over it, 1.65× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/lib.rs crates/svg/src/lib.rs— FileTooLong — 816 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 80% of them inside a single declaration: W (2 blocks, 76-1108). The bar is 500 significant lines; this is 316 over it, 1.63× 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: icons/draw.rs crates/ui-egui/src/icons/draw.rs— FileTooLong — 803 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 303 over it, 1.61× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/lib.rs crates/layout/src/lib.rs— FileTooLong — 785 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 39 free functions. The bar is 500 significant lines; this is 285 over it, 1.57× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FunctionTooLong: figcraft_ui_egui::icons::draw::draw crates/ui-egui/src/icons/draw.rs:279— FunctionTooLong — figcraft_ui_egui::icons::draw::draw runs 598 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 498 over it, 5.98× 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: figcraft_engine::cmd::text::specs crates/engine/src/cmd/text.rs:186— FunctionTooLong — figcraft_engine::cmd::text::specs runs 336 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 236 over it, 3.36× 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: figcraft_engine::canvas::vectoredit::specs crates/engine/src/canvas/vectoredit.rs:814— FunctionTooLong — figcraft_engine::canvas::vectoredit::specs runs 316 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 216 over it, 3.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: figcraft_engine::cmd::edit::specs crates/engine/src/cmd/edit.rs:106— FunctionTooLong — figcraft_engine::cmd::edit::specs runs 314 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 214 over it, 3.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: figcraft_engine::cmd::view::specs crates/engine/src/cmd/view.rs:229— FunctionTooLong — figcraft_engine::cmd::view::specs runs 306 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 206 over it, 3.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: figcraft_engine::cmd::comment::specs crates/engine/src/cmd/comment.rs:668— FunctionTooLong — figcraft_engine::cmd::comment::specs runs 246 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 146 over it, 2.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: figcraft_engine::cmd::file::specs crates/engine/src/cmd/file.rs:66— FunctionTooLong — figcraft_engine::cmd::file::specs runs 237 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 137 over it, 2.37× 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: figcraft_ui_egui::panels::layers::layers crates/ui-egui/src/panels/layers.rs:974— FunctionTooLong — figcraft_ui_egui::panels::layers::layers runs 203 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 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: figcraft_format::penpot::import crates/format/src/penpot.rs:365— FunctionTooLong — figcraft_format::penpot::import runs 200 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 100 over it, 2.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: figcraft_mcp::tools::tools crates/mcp/src/tools.rs:149— FunctionTooLong — figcraft_mcp::tools::tools runs 199 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 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: figcraft_engine::cmd::component::specs crates/engine/src/cmd/component.rs:56— FunctionTooLong — figcraft_engine::cmd::component::specs runs 191 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 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: figcraft_ui_egui::menus::popups crates/ui-egui/src/menus.rs:369— FunctionTooLong — figcraft_ui_egui::menus::popups runs 182 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 82 over it, 1.82× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: figcraft_engine::content::synthetic_ds::design_system crates/engine/src/content/synthetic_ds.rs:303— FunctionTooLong — figcraft_engine::content::synthetic_ds::design_system runs 170 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 70 over it, 1.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: figcraft_text::layout::layout crates/text/src/layout.rs:1153— FunctionTooLong — figcraft_text::layout::layout runs 170 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 70 over it, 1.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: figcraft_engine::dev::annotations::specs crates/engine/src/dev/annotations.rs:245— FunctionTooLong — figcraft_engine::dev::annotations::specs runs 165 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: figcraft_format::penpot::import_themed_tokens crates/format/src/penpot.rs:2145— FunctionTooLong — figcraft_format::penpot::import_themed_tokens runs 164 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 64 over it, 1.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.
FunctionTooLong: figcraft_engine::cmd::styles::specs crates/engine/src/cmd/styles.rs:16— FunctionTooLong — figcraft_engine::cmd::styles::specs runs 155 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 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.
FunctionTooLong: figcraft_ui_egui::panels::proto_panel::action_fields crates/ui-egui/src/panels/proto_panel.rs:888— FunctionTooLong — figcraft_ui_egui::panels::proto_panel::action_fields runs 155 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 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.
FunctionTooLong: figcraft_engine::cmd::page::specs crates/engine/src/cmd/page.rs:37— FunctionTooLong — figcraft_engine::cmd::page::specs runs 152 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: figcraft_ui_egui::dialogs::show crates/ui-egui/src/dialogs.rs:208— FunctionTooLong — figcraft_ui_egui::dialogs::show runs 150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 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.
FunctionTooLong: figcraft_ui_egui::present::input::input crates/ui-egui/src/present/input.rs:170— FunctionTooLong — figcraft_ui_egui::present::input::input runs 145 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× 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: figcraft_ui_egui::widgets::number_field_impl crates/ui-egui/src/widgets.rs:241— FunctionTooLong — figcraft_ui_egui::widgets::number_field_impl runs 143 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: figcraft_ui_egui::panels::right::effects::effect_settings crates/ui-egui/src/panels/right/effects.rs:131— FunctionTooLong — figcraft_ui_egui::panels::right::effects::effect_settings runs 142 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 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.
FunctionTooLong: figcraft_ui_egui::panels::typography::fields::type_settings crates/ui-egui/src/panels/typography/fields.rs:272— FunctionTooLong — figcraft_ui_egui::panels::typography::fields::type_settings runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: figcraft_ui_egui::widgets::colorpicker::show crates/ui-egui/src/widgets/colorpicker.rs:936— FunctionTooLong — figcraft_ui_egui::widgets::colorpicker::show runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
figcraft_format::penpot::import (cognitive 123) crates/format/src/penpot.rs:365— figcraft_format::penpot::import has cognitive complexity 123 (threshold 15). Drivers by points: if/else 33 (81 pts), loops 12 (28 pts), boolean chains 14 (nesting depth added 64). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_format::penpot::import_themed_tokens (cognitive 77) crates/format/src/penpot.rs:2145— figcraft_format::penpot::import_themed_tokens has cognitive complexity 77 (threshold 15). Drivers by points: if/else 23 (46 pts), loops 14 (23 pts), boolean chains 5, match/switch 1 (3 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_format::penpot::paints (cognitive 73) crates/format/src/penpot.rs:4133— figcraft_format::penpot::paints has cognitive complexity 73 (threshold 15). Drivers by points: if/else 28 (62 pts), match/switch 2 (7 pts), boolean chains 3, loops 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_format::sketch::symbols::apply (cognitive 69) crates/format/src/sketch/symbols.rs:350— figcraft_format::sketch::symbols::apply has cognitive complexity 69 (threshold 15). Drivers by points: if/else 19 (49 pts), loops 4 (10 pts), boolean chains 5, match/switch 2 (5 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_format::fig::map::paint::paint (cognitive 55) crates/format/src/fig/map/paint.rs:110— figcraft_format::fig::map::paint::paint has cognitive complexity 55 (threshold 15). Drivers by points: if/else 16 (33 pts), match/switch 4 (14 pts), loops 2 (8 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.
figcraft_format::penpot::composite_token_style (cognitive 52) crates/format/src/penpot.rs:1551— figcraft_format::penpot::composite_token_style has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (42 pts), boolean chains 4, match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 26). 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.
figcraft_format::penpot::bind_applied_tokens (cognitive 50) crates/format/src/penpot.rs:1315— figcraft_format::penpot::bind_applied_tokens has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (30 pts), loops 6 (8 pts), boolean chains 6, match/switch 2 (6 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_format::penpot::link_local_instances (cognitive 43) crates/format/src/penpot.rs:797— figcraft_format::penpot::link_local_instances has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (34 pts), loops 3 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_format::fig::text_path::ordered_chain (cognitive 42) crates/format/src/fig/text_path.rs:89— figcraft_format::fig::text_path::ordered_chain has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 5 (9 pts), boolean chains 3 (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.
figcraft_format::sketch::tree::layer (cognitive 39) crates/format/src/sketch/tree.rs:170— figcraft_format::sketch::tree::layer has cognitive complexity 39 (threshold 15). Drivers by points: if/else 22 (30 pts), match/switch 5 (6 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_format::penpot::text_node (cognitive 37) crates/format/src/penpot.rs:3656— figcraft_format::penpot::text_node has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 6 (10 pts), boolean chains 4, match/switch 2 (nesting depth added 13). Of this number, 19 points are the body's own statements and 18 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.
figcraft_format::penpot::match_instance_tree (cognitive 36) crates/format/src/penpot.rs:929— figcraft_format::penpot::match_instance_tree has cognitive complexity 36 (threshold 15). Drivers by points: if/else 21 (23 pts), boolean chains 10, match/switch 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
figcraft_format::penpot::import_token_variables (cognitive 31) crates/format/src/penpot.rs:2357— figcraft_format::penpot::import_token_variables has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (22 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_format::fig::text_path::from_network (cognitive 29) crates/format/src/fig/text_path.rs:23— figcraft_format::fig::text_path::from_network has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 5, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_format::penpot::layout_props (cognitive 29) crates/format/src/penpot.rs:1139— figcraft_format::penpot::layout_props has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (21 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_format::sketch::style::tint_layers (cognitive 29) crates/format/src/sketch/style.rs:368— figcraft_format::sketch::style::tint_layers has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (11 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_format::penpot::svg_tree (cognitive 28) crates/format/src/penpot.rs:2601— figcraft_format::penpot::svg_tree has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (5 pts), match/switch 2 (5 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_format::penpot::svg_gradient (cognitive 25) crates/format/src/penpot.rs:2825— figcraft_format::penpot::svg_gradient has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 2, match/switch 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
figcraft_format::rest::import_parts (cognitive 25) crates/format/src/rest.rs:201— figcraft_format::rest::import_parts has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 5 (7 pts), match/switch 1 (2 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.
figcraft_format::sketch::symbols::instance (cognitive 25) crates/format/src/sketch/symbols.rs:166— figcraft_format::sketch::symbols::instance has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 8, 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.
figcraft_format::penpot::import_document_colors (cognitive 24) crates/format/src/penpot.rs:1441— figcraft_format::penpot::import_document_colors has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 1 (5 pts), boolean chains 3, 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.
figcraft_format::penpot::referenced_font_refs::visit (cognitive 24) crates/format/src/penpot.rs:3492— figcraft_format::penpot::referenced_font_refs::visit has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_format::penpot::arc_to_cubics (cognitive 23) crates/format/src/penpot.rs:3787— figcraft_format::penpot::arc_to_cubics has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 6, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
figcraft_format::rest::props::child_layout (cognitive 23) crates/format/src/rest/props.rs:556— figcraft_format::rest::props::child_layout has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 2 (3 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.
figcraft_format::rest::proto::device_name (cognitive 23) crates/format/src/rest/proto.rs:81— figcraft_format::rest::proto::device_name has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 2, match/switch 2 (nesting depth added 6). 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.
Duplicated block (5 lines × 2) crates/collab-net/src/hub.rs:535— crates/collab-net/src/hub.rs:535-539 | crates/collab-net/src/hub.rs:555-559 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/collab/src/message.rs:940— crates/collab/src/message.rs:940-944 | crates/ui-egui/src/home/home_recents.rs:217-221 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) crates/engine/src/assets/library.rs:431— crates/engine/src/assets/library.rs:431-435 | crates/engine/src/assets/library.rs:446-450 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/engine/src/canvas/vectoredit/transform.rs:67— crates/engine/src/canvas/vectoredit/transform.rs:67-71 | crates/engine/src/canvas/vectoredit/transform.rs:87-91 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/engine/src/cmd/component/instance.rs:84— crates/engine/src/cmd/component/instance.rs:84-88 | crates/engine/src/cmd/component/instance.rs:129-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/engine/src/cmd/file/load.rs:489— crates/engine/src/cmd/file/load.rs:489-493 | crates/engine/src/cmd/file/load.rs:603-607 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/engine/src/cmd/file/open.rs:107— crates/engine/src/cmd/file/open.rs:107-111 | crates/engine/src/cmd/file/open.rs:143-147 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/engine/src/cmd/image.rs:101— crates/engine/src/cmd/image.rs:101-105 | crates/engine/src/cmd/image.rs:155-159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/engine/src/cmd/structure.rs:250— crates/engine/src/cmd/structure.rs:250-254 | crates/engine/src/cmd/structure.rs:313-317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/engine/src/cmd/structure.rs:862— crates/engine/src/cmd/structure.rs:862-866 | crates/engine/src/cmd/structure.rs:882-886 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/pdf/src/draw.rs:81— crates/pdf/src/draw.rs:81-85 | crates/render/src/draw.rs:117-121 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) crates/ui-egui/src/icons/draw.rs:440— crates/ui-egui/src/icons/draw.rs:440-444 | crates/ui-egui/src/icons/draw.rs:570-574 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/ui-egui/src/icons/draw.rs:885— crates/ui-egui/src/icons/draw.rs:885-890 | crates/ui-egui/src/icons/draw.rs:964-968 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/ui-egui/src/panels/right/effects.rs:532— crates/ui-egui/src/panels/right/effects.rs:532-536 | crates/ui-egui/src/panels/right/effects.rs:548-552 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/ui-egui/src/panels/versions.rs:441— crates/ui-egui/src/panels/versions.rs:441-445 | crates/ui-egui/src/panels/versions.rs:496-500 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/ui-egui/src/widgets/style_picker.rs:385— crates/ui-egui/src/widgets/style_picker.rs:385-389 | crates/ui-egui/src/widgets/style_picker.rs:1274-1278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/collab-net/src/link.rs:285— crates/collab-net/src/link.rs:285-289 | crates/collab-net/src/web.rs:253-257 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) crates/engine/src/cmd/variables.rs:225— crates/engine/src/cmd/variables.rs:225-229 | crates/engine/src/cmd/variables.rs:273-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/ui-egui/src/dialogs/variables_panel.rs:822— crates/ui-egui/src/dialogs/variables_panel.rs:822-826 | crates/ui-egui/src/dialogs/variables_panel.rs:843-847 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/engine/src/cmd/file/export.rs:123— crates/engine/src/cmd/file/export.rs:123-127 | crates/engine/src/cmd/file/export.rs:134-138 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/format/src/lib.rs:902— crates/format/src/lib.rs:902-906 | crates/format/src/lib.rs:965-969 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/plugin/src/sandbox.rs:540— crates/plugin/src/sandbox.rs:540-544 | crates/plugin/src/sandbox.rs:578-582 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/engine/src/boards/board/items.rs:141— crates/engine/src/boards/board/items.rs:141-145 | crates/engine/src/boards/board/items.rs:201-205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/engine/src/dev/component_codegen.rs:1027— crates/engine/src/dev/component_codegen.rs:1027-1031 | crates/engine/src/dev/component_codegen.rs:1118-1122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/engine/src/cmd/library.rs:257— crates/engine/src/cmd/library.rs:257-261 | crates/engine/src/cmd/library.rs:274-278 — 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.
figcraft_format::penpot::import (cyclomatic 60) crates/format/src/penpot.rs:365— figcraft_format::penpot::import has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_format::penpot::import_themed_tokens (cyclomatic 44) crates/format/src/penpot.rs:2145— figcraft_format::penpot::import_themed_tokens has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_format::sketch::tree::layer (cyclomatic 41) crates/format/src/sketch/tree.rs:170— figcraft_format::sketch::tree::layer 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.
figcraft_format::penpot::bind_applied_tokens (cyclomatic 35) crates/format/src/penpot.rs:1315— figcraft_format::penpot::bind_applied_tokens has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_format::penpot::match_instance_tree (cyclomatic 34) crates/format/src/penpot.rs:929— figcraft_format::penpot::match_instance_tree has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
figcraft_format::sketch::symbols::apply (cyclomatic 34) crates/format/src/sketch/symbols.rs:350— figcraft_format::sketch::symbols::apply 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.
figcraft_format::rest::text::type_style (cyclomatic 29) crates/format/src/rest/text.rs:108— figcraft_format::rest::text::type_style has cyclomatic complexity 29 (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.
figcraft_format::penpot::text_style (cyclomatic 28) crates/format/src/penpot.rs:3579— figcraft_format::penpot::text_style has cyclomatic complexity 28 (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.
figcraft_format::penpot::text_node (cyclomatic 27) crates/format/src/penpot.rs:3656— figcraft_format::penpot::text_node has cyclomatic complexity 27 (threshold 15). Of this number, 15 points are the body's own statements and 12 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.
figcraft_format::penpot::paints (cyclomatic 27) crates/format/src/penpot.rs:4133— figcraft_format::penpot::paints 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.
figcraft_format::fig::map::paint::paint (cyclomatic 26) crates/format/src/fig/map/paint.rs:110— figcraft_format::fig::map::paint::paint 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.
figcraft_format::penpot::link_local_instances (cyclomatic 25) crates/format/src/penpot.rs:797— figcraft_format::penpot::link_local_instances 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.
figcraft_format::penpot::composite_token_style (cyclomatic 25) crates/format/src/penpot.rs:1551— figcraft_format::penpot::composite_token_style 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.
figcraft_format::sketch::symbols::instance (cyclomatic 24) crates/format/src/sketch/symbols.rs:166— figcraft_format::sketch::symbols::instance has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
figcraft_format::rest::props::stroke_props (cyclomatic 23) crates/format/src/rest/props.rs:321— figcraft_format::rest::props::stroke_props 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.
figcraft_format::fig::text_path::ordered_chain (cyclomatic 22) crates/format/src/fig/text_path.rs:89— figcraft_format::fig::text_path::ordered_chain 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.
figcraft_format::fig::text_path::from_network (cyclomatic 20) crates/format/src/fig/text_path.rs:23— figcraft_format::fig::text_path::from_network 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.
figcraft_format::penpot::layout_props (cyclomatic 20) crates/format/src/penpot.rs:1139— figcraft_format::penpot::layout_props 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.
figcraft_format::penpot::referenced_font_refs::visit (cyclomatic 20) crates/format/src/penpot.rs:3492— figcraft_format::penpot::referenced_font_refs::visit 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.
figcraft_format::penpot::arc_to_cubics (cyclomatic 20) crates/format/src/penpot.rs:3787— figcraft_format::penpot::arc_to_cubics 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.
figcraft_format::sketch::text::node (cyclomatic 19) crates/format/src/sketch/text.rs:19— figcraft_format::sketch::text::node 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.
figcraft_format::penpot::import_token_variables (cyclomatic 18) crates/format/src/penpot.rs:2357— figcraft_format::penpot::import_token_variables 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.
figcraft_format::penpot::svg_tree (cyclomatic 18) crates/format/src/penpot.rs:2601— figcraft_format::penpot::svg_tree 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.
figcraft_format::penpot::apply_stroke (cyclomatic 18) crates/format/src/penpot.rs:3045— figcraft_format::penpot::apply_stroke has cyclomatic complexity 18 (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.
figcraft_format::rest::import_parts (cyclomatic 18) crates/format/src/rest.rs:201— figcraft_format::rest::import_parts 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.
figcraft_render::draw::draw_content (cognitive 82) crates/render/src/draw.rs:867— figcraft_render::draw::draw_content has cognitive complexity 82 (threshold 15). Drivers by points: if/else 19 (46 pts), loops 6 (16 pts), match/switch 4 (11 pts), boolean chains 9 (nesting depth added 44). 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.
figcraft_render::draw::draw_layer (cognitive 57) crates/render/src/draw.rs:646— figcraft_render::draw::draw_layer has cognitive complexity 57 (threshold 15). Drivers by points: if/else 23 (29 pts), boolean chains 22, loops 3 (4 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
figcraft_render::retained::patch (cognitive 46) crates/render/src/retained.rs:391— figcraft_render::retained::patch has cognitive complexity 46 (threshold 15). Drivers by points: if/else 19 (29 pts), loops 6 (11 pts), boolean chains 6 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_render::blur::progressive (cognitive 42) crates/render/src/blur.rs:94— figcraft_render::blur::progressive has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 7 (15 pts), match/switch 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_render::glass::glass (cognitive 36) crates/render/src/glass.rs:891— figcraft_render::glass::glass has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (31 pts), loops 2 (3 pts), match/switch 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_render::draw::bounds_within (cognitive 30) crates/render/src/draw.rs:452— figcraft_render::draw::bounds_within has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 6, 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.
figcraft_render::glass::nearest_sites (cognitive 25) crates/render/src/glass.rs:128— figcraft_render::glass::nearest_sites has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 5 (8 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.
figcraft_render::draw::node_outline_at (cognitive 23) crates/render/src/draw.rs:313— figcraft_render::draw::node_outline_at has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 1 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
figcraft_render::draw::subtree_outline_at (cognitive 23) crates/render/src/draw.rs:372— figcraft_render::draw::subtree_outline_at has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, loops 1 (2 pts), match/switch 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.
figcraft_render::draw::stroke_area (cognitive 20) crates/render/src/draw.rs:190— figcraft_render::draw::stroke_area has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_render::glass::inside_distance (cognitive 20) crates/render/src/glass.rs:89— figcraft_render::glass::inside_distance has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (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.
figcraft_render::grain::grains (cognitive 20) crates/render/src/grain.rs:62— figcraft_render::grain::grains has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_render::grain::texture (cognitive 20) crates/render/src/grain.rs:106— figcraft_render::grain::texture has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_render::glass::max_pass (cognitive 19) crates/render/src/glass.rs:179— figcraft_render::glass::max_pass has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 3 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
figcraft_render::dots::draw (cognitive 18) crates/render/src/dots.rs:37— figcraft_render::dots::draw has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_render::glass::edt_1d (cognitive 18) crates/render/src/glass.rs:40— figcraft_render::glass::edt_1d has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_render::dots::lines (cognitive 17) crates/render/src/dots.rs:100— figcraft_render::dots::lines has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (10 pts), if/else 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
figcraft_render::fx::morph (cognitive 17) crates/render/src/fx.rs:189— figcraft_render::fx::morph has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (9 pts), if/else 4 (6 pts), boolean chains 2 (nesting depth added 5). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
figcraft_render::lod::splattable_within (cognitive 17) crates/render/src/lod.rs:71— figcraft_render::lod::splattable_within has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_render::lod::splat_subtree (cognitive 17) crates/render/src/lod.rs:205— figcraft_render::lod::splat_subtree has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
figcraft_render::lod::splat (cognitive 17) crates/render/src/lod.rs:331— figcraft_render::lod::splat has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_render::retained::changed_areas (cognitive 17) crates/render/src/retained.rs:358— figcraft_render::retained::changed_areas has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_render::lod::greek_text (cognitive 16) crates/render/src/lod.rs:259— figcraft_render::lod::greek_text has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_render::retained::merge (cognitive 16) crates/render/src/retained.rs:511— figcraft_render::retained::merge has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_render::shadow::spread_alpha (cognitive 16) crates/render/src/shadow.rs:133— figcraft_render::shadow::spread_alpha has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 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, 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.
Exporter::assign (cognitive 67) crates/format/src/fig/export/assets.rs:10— Exporter::assign has cognitive complexity 67 (threshold 15). Drivers by points: if/else 13 (41 pts), loops 10 (19 pts), match/switch 2 (6 pts), boolean chains 1 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Exporter::content (cognitive 65) crates/pdf/src/draw.rs:316— Exporter::content has cognitive complexity 65 (threshold 15). Drivers by points: if/else 14 (37 pts), loops 4 (18 pts), boolean chains 7, match/switch 2 (3 pts) (nesting depth added 38). 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.
Exporter::assets (cognitive 54) crates/format/src/fig/export/assets.rs:105— Exporter::assets has cognitive complexity 54 (threshold 15). Drivers by points: if/else 18 (36 pts), match/switch 4 (11 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Exporter::tokens_json (cognitive 48) crates/format/src/penpot/export.rs:1709— Exporter::tokens_json has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (33 pts), match/switch 2 (9 pts), loops 3 (6 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Exporter::instance (cognitive 46) crates/format/src/fig/export/component.rs:128— Exporter::instance has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 10, loops 4 (5 pts), match/switch 2 (4 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.
Exporter::common (cognitive 39) crates/format/src/fig/export/layer.rs:183— Exporter::common has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (26 pts), match/switch 5 (7 pts), boolean chains 5, 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.
Exporter::layer (cognitive 37) crates/format/src/fig/export/layer.rs:48— Exporter::layer has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 5, match/switch 4 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Exporter::vector (cognitive 36) crates/format/src/fig/export/shape.rs:159— Exporter::vector has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (26 pts), loops 2 (5 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Exporter::shape (cognitive 36) crates/format/src/penpot/export.rs:724— Exporter::shape has cognitive complexity 36 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Exporter::bound (cognitive 34) crates/format/src/fig/export/assets.rs:278— Exporter::bound has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (26 pts), match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Exporter::text (cognitive 33) crates/format/src/fig/export/shape.rs:11— Exporter::text has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 5, loops 3 (4 pts), match/switch 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Exporter::components (cognitive 32) crates/format/src/penpot/export.rs:1532— Exporter::components has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 4, match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Exporter::stroke_geometry (cognitive 31) crates/format/src/fig/export/shape.rs:278— Exporter::stroke_geometry has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 4 (8 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Exporter::write (cognitive 27) crates/format/src/penpot/export.rs:483— Exporter::write has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 8 (10 pts), match/switch 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.
Exporter::set_props (cognitive 26) crates/format/src/fig/export/component.rs:39— Exporter::set_props has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5 (7 pts), match/switch 2 (6 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Exporter::page_json (cognitive 25) crates/format/src/penpot/export.rs:591— Exporter::page_json has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 5 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Exporter::strokes (cognitive 25) crates/format/src/penpot/export.rs:992— Exporter::strokes has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4, match/switch 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Exporter::layer (cognitive 25) crates/pdf/src/draw.rs:253— Exporter::layer has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 4, loops 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.
Exporter::assign_ids (cognitive 24) crates/format/src/penpot/export.rs:435— Exporter::assign_ids has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (6 pts), boolean chains 3 (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.
Exporter::paint (cognitive 21) crates/format/src/fig/export/paint.rs:13— Exporter::paint has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Exporter::text_content (cognitive 19) crates/format/src/penpot/export.rs:1327— Exporter::text_content has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (6 pts), boolean chains 2, match/switch 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.
Exporter::layout (cognitive 17) crates/format/src/penpot/export.rs:1115— Exporter::layout has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 5 (6 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Exporter::grid_cells (cognitive 17) crates/format/src/penpot/export.rs:1204— Exporter::grid_cells has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 2 (5 pts), boolean chains 2, match/switch 1 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Exporter::shadows (cognitive 17) crates/pdf/src/raster.rs:130— Exporter::shadows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Exporter::child_layout (cognitive 16) crates/format/src/fig/export/layer.rs:414— Exporter::child_layout has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Exporter::bound (cyclomatic 50) crates/format/src/fig/export/assets.rs:278— Exporter::bound has cyclomatic complexity 50 (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.
Exporter::layer (cyclomatic 47) crates/format/src/fig/export/layer.rs:48— Exporter::layer has cyclomatic complexity 47 (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.
Exporter::common (cyclomatic 38) crates/format/src/fig/export/layer.rs:183— Exporter::common has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Exporter::assets (cyclomatic 35) crates/format/src/fig/export/assets.rs:105— Exporter::assets has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Exporter::instance (cyclomatic 34) crates/format/src/fig/export/component.rs:128— Exporter::instance 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.
Exporter::text (cyclomatic 32) crates/format/src/fig/export/shape.rs:11— Exporter::text has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Exporter::shape (cyclomatic 29) crates/format/src/penpot/export.rs:724— Exporter::shape 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.
Exporter::assign (cyclomatic 28) crates/format/src/fig/export/assets.rs:10— Exporter::assign 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.
Exporter::components (cyclomatic 28) crates/format/src/penpot/export.rs:1532— Exporter::components 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.
Exporter::interaction (cyclomatic 26) crates/format/src/penpot/export.rs:1413— Exporter::interaction has cyclomatic complexity 26 (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.
Exporter::content (cyclomatic 25) crates/pdf/src/draw.rs:316— Exporter::content 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.
Exporter::strokes (cyclomatic 24) crates/format/src/penpot/export.rs:992— Exporter::strokes 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.
Exporter::stroke_geometry (cyclomatic 22) crates/format/src/fig/export/shape.rs:278— Exporter::stroke_geometry 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.
Exporter::tokens_json (cyclomatic 22) crates/format/src/penpot/export.rs:1709— Exporter::tokens_json has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Exporter::applied_tokens (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Exporter::layer (cyclomatic 22) crates/pdf/src/draw.rs:253— Exporter::layer 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.
Exporter::vector (cyclomatic 20) crates/format/src/fig/export/shape.rs:159— Exporter::vector 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.
Exporter::layout (cyclomatic 20) crates/format/src/penpot/export.rs:1115— Exporter::layout has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Exporter::applied_tokens (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Exporter::write (cyclomatic 18) crates/format/src/penpot/export.rs:483— Exporter::write has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Exporter::applied_tokens (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Exporter::paint (cyclomatic 17) crates/format/src/fig/export/paint.rs:13— Exporter::paint 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.
Exporter::set_props (cyclomatic 16) crates/format/src/fig/export/component.rs:39— Exporter::set_props 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.
Exporter::auto_layout (cyclomatic 16) crates/format/src/fig/export/layer.rs:330— Exporter::auto_layout has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Exporter::page_json (cyclomatic 16) crates/format/src/penpot/export.rs:591— Exporter::page_json has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Exporter::applied_tokens (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Exporter::text_content (cyclomatic 16) crates/format/src/penpot/export.rs:1327— Exporter::text_content has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: Exporter::applied_tokens (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Session::drag (cognitive 107) crates/engine/src/canvas/tools/drag.rs:183— Session::drag has cognitive complexity 107 (threshold 15). Drivers by points: if/else 46 (85 pts), loops 5 (14 pts), boolean chains 7, match/switch 1 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session::vector_down (cognitive 97) crates/engine/src/canvas/vectoredit/pointer.rs:545— Session::vector_down has cognitive complexity 97 (threshold 15). Drivers by points: if/else 39 (74 pts), boolean chains 16, match/switch 5 (7 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session::move_down (cognitive 74) crates/engine/src/canvas/tools/drag.rs:12— Session::move_down has cognitive complexity 74 (threshold 15). Drivers by points: if/else 32 (53 pts), boolean chains 19, match/switch 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session::resize_drag (cognitive 69) crates/engine/src/canvas/tools/drag.rs:471— Session::resize_drag has cognitive complexity 69 (threshold 15). Drivers by points: if/else 29 (52 pts), boolean chains 8, match/switch 2 (5 pts), loops 2 (4 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session::up (cognitive 67) crates/engine/src/canvas/tools/draw.rs:102— Session::up has cognitive complexity 67 (threshold 15). Drivers by points: if/else 24 (53 pts), boolean chains 9, loops 1 (4 pts), match/switch 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session::hover (cognitive 55) crates/engine/src/canvas/tools/pointer.rs:196— Session::hover has cognitive complexity 55 (threshold 15). Drivers by points: if/else 24 (41 pts), boolean chains 14 (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.
Session::vector_hover (cognitive 38) crates/engine/src/canvas/vectoredit/pointer.rs:360— Session::vector_hover has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 6, match/switch 4 (6 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.
Session::vector_drag (cognitive 38) crates/engine/src/canvas/vectoredit/pointer.rs:879— Session::vector_drag has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 3 (6 pts), boolean chains 5, match/switch 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.
Session::double_click (cognitive 33) crates/engine/src/canvas/tools/click.rs:48— Session::double_click has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 14 (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.
Session::checkpointed (cognitive 26) crates/engine/src/session/undo.rs:263— Session::checkpointed has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (8 pts), boolean chains 1, match/switch 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.
Session::live_event (cognitive 26) crates/engine/src/sharing/live/events.rs:158— Session::live_event has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (22 pts), match/switch 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session::shape_builder_pointer (cognitive 24) crates/engine/src/canvas/shapebuilder.rs:594— Session::shape_builder_pointer has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, loops 1 (2 pts), match/switch 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session::vector_up (cognitive 22) crates/engine/src/canvas/vectoredit/pointer.rs:1052— Session::vector_up has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session::pen_update (cognitive 21) crates/engine/src/canvas/tools/pen.rs:126— Session::pen_update has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 3, loops 2, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Session::draw_drag (cognitive 20) crates/engine/src/canvas/tools/draw.rs:28— Session::draw_drag has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (17 pts), match/switch 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Session::execute (cognitive 20) crates/engine/src/session/exec.rs:71— Session::execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session::live_welcome (cognitive 19) crates/engine/src/sharing/live/events.rs:367— Session::live_welcome has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session::escape (cognitive 17) crates/engine/src/canvas/tools/keys.rs:101— Session::escape has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Session::pointer (cognitive 17) crates/engine/src/canvas/tools/pointer.rs:115— Session::pointer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Session::width_drag (cognitive 16) crates/engine/src/canvas/vectoredit/width.rs:293— Session::width_drag has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 7). 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.
Mapper::network (cognitive 68) crates/format/src/fig/map/layer.rs:606— Mapper::network has cognitive complexity 68 (threshold 15). Drivers by points: if/else 29 (48 pts), boolean chains 9, match/switch 4 (7 pts), loops 3 (4 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mapper::board_snapshot (cognitive 49) crates/format/src/fig/map/layer.rs:345— Mapper::board_snapshot has cognitive complexity 49 (threshold 15). Drivers by points: if/else 20 (40 pts), boolean chains 8, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mapper::instance (cognitive 47) crates/format/src/fig/map/component.rs:295— Mapper::instance has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (28 pts), loops 7 (9 pts), match/switch 3 (6 pts), boolean chains 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mapper::layer_filtered (cognitive 45) crates/format/src/fig/map/layer.rs:101— Mapper::layer_filtered has cognitive complexity 45 (threshold 15). Drivers by points: if/else 25 (29 pts), boolean chains 13, match/switch 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
Mapper::library_context (cognitive 36) crates/format/src/fig/map/document.rs:123— Mapper::library_context has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 4 (7 pts), boolean chains 4 (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.
Mapper::new (cognitive 31) crates/format/src/fig/map.rs:265— Mapper::new has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 5 (6 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.
Mapper::prop_refs (cognitive 28) crates/format/src/fig/map/component.rs:241— Mapper::prop_refs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (22 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mapper::variable_bindings (cognitive 26) crates/format/src/fig/map/variables.rs:5— Mapper::variable_bindings has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 3 (7 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mapper::connector_snapshot_children (cognitive 25) crates/format/src/fig/map/connector.rs:292— Mapper::connector_snapshot_children has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
Mapper::map_layer_children (cognitive 24) crates/format/src/fig/map/layer.rs:262— Mapper::map_layer_children has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (7 pts), match/switch 2 (5 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.
Mapper::geometry (cognitive 21) crates/format/src/fig/map/layer.rs:573— Mapper::geometry has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (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.
Mapper::text_path (cognitive 21) crates/format/src/fig/map/text.rs:142— Mapper::text_path has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 4, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Mapper::connector (cognitive 20) crates/format/src/fig/map/connector.rs:53— Mapper::connector has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 6 (7 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mapper::component (cognitive 19) crates/format/src/fig/map/component.rs:170— Mapper::component has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mapper::override_scope (cognitive 18) crates/format/src/fig/map/component.rs:99— Mapper::override_scope has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mapper::variables (cognitive 18) crates/format/src/fig/map/document.rs:248— Mapper::variables has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mapper::auto_layout (cognitive 18) crates/format/src/fig/map/layout.rs:5— Mapper::auto_layout has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 2, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Mapper::map_grid_tracks (cognitive 17) crates/format/src/fig/map/layout.rs:71— Mapper::map_grid_tracks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 2 (5 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.
Duplicated block (6 lines × 2) crates/collab-net/src/manage.rs:39— crates/collab-net/src/manage.rs:39-44 | crates/collab-net/src/manage.rs:73-78 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/engine/src/assets/components/patch.rs:317— crates/engine/src/assets/components/patch.rs:317-322 | crates/engine/src/assets/components/patch.rs:417-422 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/engine/src/content/synthetic_ds.rs:365— crates/engine/src/content/synthetic_ds.rs:365-370 | crates/engine/src/content/synthetic_ds.rs:427-432 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/engine/src/dev/annotations.rs:300— crates/engine/src/dev/annotations.rs:300-305 | crates/engine/src/dev/dev_resources.rs:187-192 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) crates/svg/src/lib.rs:1189— crates/svg/src/lib.rs:1189-1194 | crates/vectordrawable/src/text.rs:25-30 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) crates/ui-egui/src/icons/draw.rs:370— crates/ui-egui/src/icons/draw.rs:370-376 | crates/ui-egui/src/icons/draw.rs:894-899 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/ui-egui/src/icons/draw.rs:667— crates/ui-egui/src/icons/draw.rs:667-672 | crates/ui-egui/src/icons/draw.rs:674-679 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/ui-egui/src/icons/draw.rs:768— crates/ui-egui/src/icons/draw.rs:768-774 | crates/ui-egui/src/icons/draw.rs:961-966 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/ui-egui/src/icons/draw.rs:767— crates/ui-egui/src/icons/draw.rs:767-773 | crates/ui-egui/src/icons/draw.rs:967-972 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/ui-egui/src/panels/proto_panel.rs:374— crates/ui-egui/src/panels/proto_panel.rs:374-379 | crates/ui-egui/src/widgets.rs:963-968 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) crates/format/src/lib.rs:892— crates/format/src/lib.rs:892-897 | crates/format/src/lib.rs:954-959 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/ui-egui/src/panels/assets_panel.rs:692— crates/ui-egui/src/panels/assets_panel.rs:692-697 | crates/ui-egui/src/panels/assets_panel.rs:718-723 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/ui-egui/src/panels/dev_mode.rs:596— crates/ui-egui/src/panels/dev_mode.rs:596-601 | crates/ui-egui/src/panels/dev_mode.rs:614-619 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/engine/src/dev/codegen/arkui.rs:105— crates/engine/src/dev/codegen/arkui.rs:105-110 | crates/engine/src/dev/codegen/swift.rs:119-124 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) crates/format/src/penpot.rs:1443— crates/format/src/penpot.rs:1443-1448 | crates/format/src/penpot.rs:2505-2510 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/layout/src/lib.rs:128— crates/layout/src/lib.rs:128-133 | crates/layout/src/lib.rs:988-993 — 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.
Session::drag (cyclomatic 65) crates/engine/src/canvas/tools/drag.rs:183— Session::drag 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.
Session::vector_down (cyclomatic 58) crates/engine/src/canvas/vectoredit/pointer.rs:545— Session::vector_down 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.
Session::move_down (cyclomatic 49) crates/engine/src/canvas/tools/drag.rs:12— Session::move_down 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.
Session::up (cyclomatic 41) crates/engine/src/canvas/tools/draw.rs:102— Session::up 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.
Session::resize_drag (cyclomatic 37) crates/engine/src/canvas/tools/drag.rs:471— Session::resize_drag has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Session::vector_hover (cyclomatic 36) crates/engine/src/canvas/vectoredit/pointer.rs:360— Session::vector_hover 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.
Session::vector_drag (cyclomatic 35) crates/engine/src/canvas/vectoredit/pointer.rs:879— Session::vector_drag has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Session::hover (cyclomatic 34) crates/engine/src/canvas/tools/pointer.rs:196— Session::hover 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.
Session::live_event (cyclomatic 31) crates/engine/src/sharing/live/events.rs:158— Session::live_event 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.
Session::double_click (cyclomatic 29) crates/engine/src/canvas/tools/click.rs:48— Session::double_click 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.
Session::pointer (cyclomatic 26) crates/engine/src/canvas/tools/pointer.rs:115— Session::pointer has cyclomatic complexity 26 (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.
Session::draw_drag (cyclomatic 21) crates/engine/src/canvas/tools/draw.rs:28— Session::draw_drag 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.
Session::vector_up (cyclomatic 21) crates/engine/src/canvas/vectoredit/pointer.rs:1052— Session::vector_up 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.
Session::pen_update (cyclomatic 19) crates/engine/src/canvas/tools/pen.rs:126— Session::pen_update 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.
Session::shape_builder_pointer (cyclomatic 16) crates/engine/src/canvas/shapebuilder.rs:594— Session::shape_builder_pointer 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.
Mapper::network (cyclomatic 45) crates/format/src/fig/map/layer.rs:606— Mapper::network 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.
Mapper::layer_filtered (cyclomatic 40) crates/format/src/fig/map/layer.rs:101— Mapper::layer_filtered has cyclomatic complexity 40 (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.
Mapper::instance (cyclomatic 35) crates/format/src/fig/map/component.rs:295— Mapper::instance has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Mapper::board_snapshot (cyclomatic 26) crates/format/src/fig/map/layer.rs:345— Mapper::board_snapshot 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.
Mapper::variable_bindings (cyclomatic 23) crates/format/src/fig/map/variables.rs:5— Mapper::variable_bindings has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Mapper::connector_snapshot_children (cyclomatic 21) crates/format/src/fig/map/connector.rs:292— Mapper::connector_snapshot_children 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.
Mapper::text_path (cyclomatic 21) crates/format/src/fig/map/text.rs:142— Mapper::text_path 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.
Mapper::library_context (cyclomatic 20) crates/format/src/fig/map/document.rs:123— Mapper::library_context 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.
Mapper::auto_layout (cyclomatic 20) crates/format/src/fig/map/layout.rs:5— Mapper::auto_layout 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.
Mapper::new (cyclomatic 19) crates/format/src/fig/map.rs:265— Mapper::new 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.
Mapper::common (cyclomatic 18) crates/format/src/fig/map/layer.rs:481— Mapper::common 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.
Mapper::prop_refs (cyclomatic 17) crates/format/src/fig/map/component.rs:241— Mapper::prop_refs 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.
Mapper::connector (cyclomatic 17) crates/format/src/fig/map/connector.rs:53— Mapper::connector has cyclomatic complexity 17 (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.
Mapper::action (cyclomatic 17) crates/format/src/fig/map/proto.rs:69— Mapper::action has cyclomatic complexity 17 (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. This is NOT this file's highest cyclomatic complexity: figcraft_format::fig::map::proto::transition (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
TooManyMethods: Session crates/engine/src/lib.rs:118— TooManyMethods — 235 methods, declared across 28 files: vectoredit/pointer.rs (25), live/events.rs (23), session/undo.rs (18), live/sync.rs (18), +24 more file(s). The bar is 30 methods; this is 205 over it, 7.83× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Document crates/doc/src/lib.rs:192— TooManyMethods — 96 methods, declared across 6 files: src/lib.rs (73), src/ids.rs (8), src/library.rs (5), src/comments.rs (4), +2 more file(s). The bar is 30 methods; this is 66 over it, 3.20× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: FigApp crates/ui-egui/src/lib.rs:733— TooManyMethods — 75 methods, declared across 12 files: app/frame.rs (20), app/files.rs (16), app/commands.rs (13), src/app.rs (5), +8 more file(s). The bar is 30 methods; this is 45 over it, 2.50× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Store apps/figcraft-server/src/store.rs:331— TooManyMethods — 73 methods, declared across 7 files: store/files.rs (18), src/store.rs (17), store/library.rs (14), store/links.rs (10), +3 more file(s). The bar is 30 methods; this is 43 over it, 2.43× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Mapper crates/format/src/fig/map.rs:216— TooManyMethods — 51 methods, declared across 10 files: map/connector.rs (10), map/layer.rs (10), map/component.rs (9), map/document.rs (7), +6 more file(s). The bar is 30 methods; this is 21 over it, 1.70× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Ctx crates/format/src/rest.rs:416— TooManyMethods — 45 methods, declared across 3 files: src/rest.rs (26), rest/proto.rs (13), rest/variables.rs (6). The bar is 30 methods; this is 15 over it, 1.50× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: VectorNetwork crates/doc/src/vector.rs:163— TooManyMethods — 44 methods, declared across 3 files: src/vector.rs (25), src/vector_faces.rs (12), src/vector_regions.rs (7). The bar is 30 methods; this is 14 over it, 1.47× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Client crates/collab/src/client.rs:40— TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Kit crates/engine/src/content/templates/kit.rs:28— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Exporter crates/format/src/fig/export.rs:448— TooManyMethods — 40 methods, declared across 7 files: fig/export.rs (8), export/component.rs (7), export/layer.rs (7), export/paint.rs (5), +3 more file(s). The bar is 30 methods; this is 10 over it, 1.33× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: FontDb crates/text/src/fontdb.rs:607— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TextData crates/doc/src/text.rs:445— TooManyMethods — 34 methods, declared across 2 files: src/text.rs (33), src/colors.rs (1). The bar is 30 methods; this is 4 over it, 1.13× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Presenter crates/ui-egui/src/present.rs:263— TooManyMethods — 34 methods, declared across 4 files: present/navigate.rs (13), present/actions.rs (8), present/scroll.rs (7), src/present.rs (6). The bar is 30 methods; this is 4 over it, 1.13× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Exporter crates/format/src/penpot/export.rs:135— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
MethodTooLong: Session.drag crates/engine/src/canvas/tools/drag.rs:183— MethodTooLong — drag runs 204 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 104 over it, 2.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.
MethodTooLong: Session.vector_down crates/engine/src/canvas/vectoredit/pointer.rs:545— MethodTooLong — vector_down runs 204 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 104 over it, 2.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.
MethodTooLong: Mapper.network crates/format/src/fig/map/layer.rs:606— MethodTooLong — network runs 133 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× 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: FigApp.handle_ui_requests crates/ui-egui/src/app/commands.rs:119— MethodTooLong — handle_ui_requests runs 124 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Mapper.layer_filtered crates/format/src/fig/map/layer.rs:101— MethodTooLong — layer_filtered runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Exporter.assets crates/format/src/fig/export/assets.rs:105— MethodTooLong — assets runs 118 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× 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: Session.vector_drag crates/engine/src/canvas/vectoredit/pointer.rs:879— MethodTooLong — vector_drag runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Session.move_down crates/engine/src/canvas/tools/drag.rs:12— MethodTooLong — move_down runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 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: Session.resize_drag crates/engine/src/canvas/tools/drag.rs:471— MethodTooLong — resize_drag runs 113 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 13 over it, 1.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: Presenter.perform_at crates/ui-egui/src/present/actions.rs:106— MethodTooLong — perform_at runs 112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Exporter.text crates/format/src/fig/export/shape.rs:11— MethodTooLong — text runs 111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Mapper.instance crates/format/src/fig/map/component.rs:295— MethodTooLong — instance runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Session.up crates/engine/src/canvas/tools/draw.rs:102— MethodTooLong — up runs 104 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
figcraft_text::layout::layout (cognitive 100) crates/text/src/layout.rs:1153— figcraft_text::layout::layout has cognitive complexity 100 (threshold 15). Drivers by points: if/else 37 (64 pts), boolean chains 13, match/switch 6 (12 pts), loops 5 (11 pts) (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_text::layout::finish_layout (cognitive 75) crates/text/src/layout.rs:1033— figcraft_text::layout::finish_layout has cognitive complexity 75 (threshold 15). Drivers by points: if/else 17 (41 pts), loops 8 (18 pts), match/switch 4 (11 pts), boolean chains 5 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_text::layout::restyle_breaks (cognitive 57) crates/text/src/layout.rs:810— figcraft_text::layout::restyle_breaks has cognitive complexity 57 (threshold 15). Drivers by points: if/else 13 (41 pts), loops 4 (11 pts), match/switch 2 (3 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.
figcraft_text::layout::shape_segment (cognitive 53) crates/text/src/layout.rs:1600— figcraft_text::layout::shape_segment has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (29 pts), loops 9 (16 pts), boolean chains 8 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_text::color::scaled (cognitive 32) crates/text/src/color.rs:268— figcraft_text::color::scaled has cognitive complexity 32 (threshold 15). Drivers by points: loops 9 (27 pts), boolean chains 2, if/else 2, match/switch 1 (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
figcraft_text::layout::truncate_layout (cognitive 30) crates/text/src/layout.rs:975— figcraft_text::layout::truncate_layout has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_text::layout::shape_text (cognitive 28) crates/text/src/layout.rs:423— figcraft_text::layout::shape_text has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 5 (8 pts), boolean chains 5, match/switch 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.
figcraft_text::layout::break_lines (cognitive 28) crates/text/src/layout.rs:637— figcraft_text::layout::break_lines has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 7, match/switch 1 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_text::layout::ink_cuts (cognitive 23) crates/text/src/layout.rs:1485— figcraft_text::layout::ink_cuts has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (5 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_text::display::shape_arabic (cognitive 22) crates/text/src/display.rs:358— figcraft_text::display::shape_arabic has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_text::fontdb::index_bytes (cognitive 21) crates/text/src/fontdb.rs:1393— figcraft_text::fontdb::index_bytes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (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.
figcraft_text::display::visual_line (cognitive 17) crates/text/src/display.rs:42— figcraft_text::display::visual_line has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (4 pts), 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.
Ctx::bindings (cyclomatic 30) crates/format/src/rest/variables.rs:303— Ctx::bindings has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Ctx::expr (cyclomatic 26) crates/format/src/rest/proto.rs:385— Ctx::expr has cyclomatic complexity 26 (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.
Ctx::trigger (cyclomatic 23) crates/format/src/rest/proto.rs:169— Ctx::trigger 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.
Ctx::kind (cyclomatic 23) crates/format/src/rest.rs:616— Ctx::kind 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.
Ctx::common (cyclomatic 23) crates/format/src/rest.rs:716— Ctx::common has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Ctx::finish (cyclomatic 18) crates/format/src/rest.rs:1072— Ctx::finish 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.
Ctx::build_layer (cyclomatic 17) crates/format/src/rest.rs:551— Ctx::build_layer has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: figcraft_format::rest::override_group (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Ctx::resolve_slots (cyclomatic 17) crates/format/src/rest.rs:1202— Ctx::resolve_slots has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: figcraft_format::rest::override_group (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Ctx::vector (cyclomatic 16) crates/format/src/rest.rs:792— Ctx::vector has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: figcraft_format::rest::override_group (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Ctx::resolve_instances (cyclomatic 16) crates/format/src/rest.rs:1144— Ctx::resolve_instances has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: figcraft_format::rest::override_group (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Ctx::rename_props (cyclomatic 16) crates/format/src/rest.rs:1279— Ctx::rename_props has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: figcraft_format::rest::override_group (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Ctx::bindings (cognitive 55) crates/format/src/rest/variables.rs:303— Ctx::bindings has cognitive complexity 55 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 10 (18 pts), match/switch 4 (12 pts), boolean chains 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.
Ctx::finish (cognitive 31) crates/format/src/rest.rs:1072— Ctx::finish has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 5 (9 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.
Ctx::resolve_slots (cognitive 30) crates/format/src/rest.rs:1202— Ctx::resolve_slots has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 3 (7 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ctx::vector (cognitive 26) crates/format/src/rest.rs:792— Ctx::vector has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (4 pts), match/switch 3 (4 pts), boolean chains 3 (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.
Ctx::styles_take_bindings (cognitive 26) crates/format/src/rest.rs:990— Ctx::styles_take_bindings has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ctx::resolve_instances (cognitive 24) crates/format/src/rest.rs:1144— Ctx::resolve_instances has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 5 (6 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ctx::common (cognitive 23) crates/format/src/rest.rs:716— Ctx::common has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, match/switch 3 (4 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Ctx::trigger (cognitive 20) crates/format/src/rest/proto.rs:169— Ctx::trigger has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (7 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). 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.
Ctx::rename_props (cognitive 19) crates/format/src/rest.rs:1279— Ctx::rename_props has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 4 (6 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ctx::build_layer (cognitive 18) crates/format/src/rest.rs:551— Ctx::build_layer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 1, loops 1, match/switch 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, 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.
Ctx::image_key (cognitive 16) crates/format/src/rest.rs:1027— Ctx::image_key has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, match/switch 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.
figcraft_layout::layout_frame (cognitive 68) crates/layout/src/lib.rs:495— figcraft_layout::layout_frame has cognitive complexity 68 (threshold 15). Drivers by points: if/else 44 (57 pts), loops 5 (7 pts), boolean chains 4 (nesting depth added 15). 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.
figcraft_layout::grid_lines (cognitive 47) crates/layout/src/lib.rs:1089— figcraft_layout::grid_lines has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (28 pts), match/switch 4 (8 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
figcraft_layout::apply_constraints (cognitive 39) crates/layout/src/lib.rs:984— figcraft_layout::apply_constraints has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (29 pts), boolean chains 5, match/switch 2 (4 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_layout::layout_grid (cognitive 31) crates/layout/src/lib.rs:918— figcraft_layout::layout_grid has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 4, match/switch 3, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_layout::track_content (cognitive 23) crates/layout/src/lib.rs:831— figcraft_layout::track_content has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (5 pts), boolean chains 4 (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.
figcraft_layout::flow_items (cognitive 20) crates/layout/src/lib.rs:413— figcraft_layout::flow_items has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_layout::distribute (cognitive 19) crates/layout/src/lib.rs:616— figcraft_layout::distribute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), boolean chains 4 (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.
figcraft_layout::coherent_own_sizing (cognitive 18) crates/layout/src/lib.rs:185— figcraft_layout::coherent_own_sizing has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, match/switch 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.
figcraft_layout::place_flow_line (cognitive 18) crates/layout/src/lib.rs:446— figcraft_layout::place_flow_line has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_layout::grid_place (cognitive 17) crates/layout/src/lib.rs:723— figcraft_layout::grid_place has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_svg::import::group (cognitive 35) crates/svg/src/import.rs:232— figcraft_svg::import::group has cognitive complexity 35 (threshold 15). Drivers by points: if/else 24 (29 pts), boolean chains 6 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
figcraft_svg::import::text::text (cognitive 28) crates/svg/src/import/text.rs:164— figcraft_svg::import::text::text has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 5, loops 3 (5 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_svg::import::fx::primitive (cognitive 26) crates/svg/src/import/fx.rs:107— figcraft_svg::import::fx::primitive has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 7 (13 pts), if/else 5 (9 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 11). 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.
figcraft_svg::import::path (cognitive 25) crates/svg/src/import.rs:392— figcraft_svg::import::path has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (5 pts), boolean chains 2, match/switch 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_svg::import::nesting (cognitive 23) crates/svg/src/import.rs:673— figcraft_svg::import::nesting has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_svg::import::paint::pattern (cognitive 20) crates/svg/src/import/paint.rs:119— figcraft_svg::import::paint::pattern has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, match/switch 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_svg::import::closed_for_fill (cognitive 17) crates/svg/src/import.rs:481— figcraft_svg::import::closed_for_fill has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), boolean chains 4, match/switch 2 (4 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_svg::import::dash_offset (cognitive 17) crates/svg/src/import.rs:580— figcraft_svg::import::dash_offset has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_svg::import::too_deep (cognitive 17) crates/svg/src/import.rs:721— figcraft_svg::import::too_deep has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_svg::import::doctype_end (cognitive 16) crates/svg/src/import.rs:767— figcraft_svg::import::doctype_end has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VectorNetwork::rounded (cognitive 52) crates/doc/src/vector.rs:384— VectorNetwork::rounded has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (36 pts), loops 9 (12 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VectorNetwork::runs (cognitive 51) crates/doc/src/vector.rs:587— VectorNetwork::runs has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 7 (11 pts), boolean chains 4 (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.
VectorNetwork::cycles (cognitive 48) crates/doc/src/vector_faces.rs:198— VectorNetwork::cycles has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (36 pts), loops 6 (10 pts), boolean chains 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VectorNetwork::from_path (cognitive 38) crates/doc/src/vector.rs:195— VectorNetwork::from_path has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (33 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VectorNetwork::paint_to_with (cognitive 28) crates/doc/src/vector_faces.rs:127— VectorNetwork::paint_to_with has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (8 pts), loops 2 (7 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VectorNetwork::split_loops (cognitive 25) crates/doc/src/vector_faces.rs:297— VectorNetwork::split_loops has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VectorNetwork::region_path (cognitive 23) crates/doc/src/vector_regions.rs:48— VectorNetwork::region_path has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VectorNetwork::sanitize (cognitive 16) crates/doc/src/vector.rs:702— VectorNetwork::sanitize has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 3 (6 pts), boolean chains 1 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
TooManyFunctions: figcraft_render crates/render/src/lib.rs:92— TooManyFunctions — 34 free functions. The bar is 30 free functions; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyFunctions: figcraft_engine::canvas::textedit crates/engine/src/canvas/textedit.rs:74— TooManyFunctions — 33 free functions. The bar is 30 free functions; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyFunctions: figcraft_engine::dev::code_connect crates/engine/src/dev/code_connect.rs:39— TooManyFunctions — 33 free functions. The bar is 30 free functions; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyFunctions: figcraft_engine::sharing::branches crates/engine/src/sharing/branches.rs:33— TooManyFunctions — 33 free functions. The bar is 30 free functions; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyFunctions: figcraft_format::rest::props crates/format/src/rest/props.rs:24— TooManyFunctions — 33 free functions. The bar is 30 free functions; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyFunctions: figcraft_engine::cmd::variables crates/engine/src/cmd/variables.rs:18— TooManyFunctions — 32 free functions. The bar is 30 free functions; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyFunctions: figcraft_ui_egui::tabs crates/ui-egui/src/tabs.rs:52— TooManyFunctions — 32 free functions. The bar is 30 free functions; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyFunctions: figcraft_engine::extensions::plugins crates/engine/src/extensions/plugins.rs:40— TooManyFunctions — 31 free functions. The bar is 30 free functions; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (8 lines × 2) crates/collab/src/change.rs:338— crates/collab/src/change.rs:338-345 | crates/collab/src/change.rs:377-384 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/engine/src/canvas/snap.rs:89— crates/engine/src/canvas/snap.rs:89-96 | crates/engine/src/canvas/snap.rs:154-161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/engine/src/canvas/textedit.rs:569— crates/engine/src/canvas/textedit.rs:569-577 | crates/engine/src/canvas/textedit.rs:602-609 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/engine/src/dev/codegen/compose.rs:71— crates/engine/src/dev/codegen/compose.rs:71-78 | crates/engine/src/dev/codegen/swift.rs:47-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) crates/svg/src/lib.rs:1181— crates/svg/src/lib.rs:1181-1188 | crates/vectordrawable/src/text.rs:17-24 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) crates/ui-egui/src/icons/draw.rs:685— crates/ui-egui/src/icons/draw.rs:685-692 | crates/ui-egui/src/icons/draw.rs:759-766 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/ui-egui/src/icons/draw.rs:978— crates/ui-egui/src/icons/draw.rs:978-985 | crates/ui-egui/src/icons/draw.rs:986-993 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/ui-egui/src/panels/versions.rs:454— crates/ui-egui/src/panels/versions.rs:454-461 | crates/ui-egui/src/panels/versions.rs:508-515 — 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.
W::render_node (cognitive 63) crates/svg/src/lib.rs:517— W::render_node has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (41 pts), loops 5 (16 pts), boolean chains 6 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
W::simple_stroke (cognitive 31) crates/svg/src/lib.rs:779— W::simple_stroke has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 5 (7 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
W::filter_for (cognitive 28) crates/svg/src/lib.rs:351— W::filter_for has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 3, loops 3, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
W::text_element (cognitive 28) crates/svg/src/lib.rs:703— W::text_element has cognitive complexity 28 (threshold 15). Drivers by points: loops 3 (11 pts), if/else 7 (9 pts), match/switch 2 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
W::layer (cognitive 25) crates/svg/src/lib.rs:459— W::layer has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16, boolean chains 8, match/switch 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.
W::paint_attr (cognitive 22) crates/svg/src/lib.rs:223— W::paint_attr has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
W::drop_shadows (cognitive 18) crates/svg/src/lib.rs:1043— W::drop_shadows has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyFields: UiState crates/ui-egui/src/lib.rs:393— TooManyFields — 110 stored fields beside 2 methods. The bar is 30 stored fields; this is 80 over it, 3.67× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Node crates/doc/src/node.rs:441— TooManyFields — 47 stored fields beside 25 methods. The bar is 30 stored fields; this is 17 over it, 1.57× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Presenter crates/ui-egui/src/present.rs:263— TooManyFields — 45 stored fields beside 34 methods. The bar is 30 stored fields; this is 15 over it, 1.50× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Tokens crates/ui-egui/src/theme.rs:8— TooManyFields — 35 stored fields beside 3 methods. The bar is 30 stored fields; this is 5 over it, 1.17× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: FigApp crates/ui-egui/src/lib.rs:733— TooManyFields — 34 stored fields beside 75 methods. The bar is 30 stored fields; this is 4 over it, 1.13× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Prefs crates/engine/src/prefs.rs:28— TooManyFields — 33 stored fields. The bar is 30 stored fields; this is 3 over it, 1.10× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Face crates/text/src/fontdb.rs:85— TooManyFields — 31 stored fields beside 23 methods. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
figcraft_text::layout::layout (cyclomatic 50) crates/text/src/layout.rs:1153— figcraft_text::layout::layout has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_text::layout::finish_layout (cyclomatic 33) crates/text/src/layout.rs:1033— figcraft_text::layout::finish_layout has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_text::layout::shape_segment (cyclomatic 32) crates/text/src/layout.rs:1600— figcraft_text::layout::shape_segment has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_text::layout::restyle_breaks (cyclomatic 21) crates/text/src/layout.rs:810— figcraft_text::layout::restyle_breaks 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.
figcraft_text::layout::break_lines (cyclomatic 20) crates/text/src/layout.rs:637— figcraft_text::layout::break_lines 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.
figcraft_text::layout::shape_text (cyclomatic 17) crates/text/src/layout.rs:423— figcraft_text::layout::shape_text has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Duplicated block (7 lines × 2) crates/engine/src/assets/components.rs:245— crates/engine/src/assets/components.rs:245-251 | crates/engine/src/assets/components/variants.rs:128-134 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) crates/engine/src/canvas/distance.rs:92— crates/engine/src/canvas/distance.rs:92-98 | crates/engine/src/canvas/distance.rs:106-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/engine/src/cmd/structure.rs:621— crates/engine/src/cmd/structure.rs:621-627 | crates/engine/src/cmd/structure.rs:767-773 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/pdf/src/draw.rs:131— crates/pdf/src/draw.rs:131-137 | crates/render/src/draw.rs:298-304 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) crates/ui-egui/src/toolbar.rs:384— crates/ui-egui/src/toolbar.rs:384-390 | crates/ui-egui/src/toolbar.rs:430-436 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/engine/src/session/undo.rs:118— crates/engine/src/session/undo.rs:118-124 | crates/engine/src/session/undo.rs:156-162 — 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.
figcraft_render::draw::draw_layer (cyclomatic 48) crates/render/src/draw.rs:646— figcraft_render::draw::draw_layer has cyclomatic complexity 48 (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.
figcraft_render::draw::draw_content (cyclomatic 41) crates/render/src/draw.rs:867— figcraft_render::draw::draw_content 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.
figcraft_render::retained::patch (cyclomatic 32) crates/render/src/retained.rs:391— figcraft_render::retained::patch has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
figcraft_render::blur::progressive (cyclomatic 19) crates/render/src/blur.rs:94— figcraft_render::blur::progressive 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.
figcraft_render::draw::bounds_within (cyclomatic 18) crates/render/src/draw.rs:452— figcraft_render::draw::bounds_within 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.
figcraft_svg::import::fx::primitive (cyclomatic 28) crates/svg/src/import/fx.rs:107— figcraft_svg::import::fx::primitive has cyclomatic complexity 28 (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.
figcraft_svg::import::group (cyclomatic 26) crates/svg/src/import.rs:232— figcraft_svg::import::group 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.
figcraft_svg::import::text::text (cyclomatic 19) crates/svg/src/import/text.rs:164— figcraft_svg::import::text::text 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.
figcraft_svg::import::path (cyclomatic 16) crates/svg/src/import.rs:392— figcraft_svg::import::path 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.
figcraft_svg::import::paint::pattern (cyclomatic 16) crates/svg/src/import/paint.rs:119— figcraft_svg::import::paint::pattern 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.
figcraft_collab::diff::diff (cognitive 41) crates/collab/src/diff.rs:27— figcraft_collab::diff::diff has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 9 (12 pts), match/switch 3 (7 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.
figcraft_collab::merge::plan (cognitive 33) crates/collab/src/merge.rs:260— figcraft_collab::merge::plan has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 6 (10 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_collab::history::capture (cognitive 28) crates/collab/src/history.rs:91— figcraft_collab::history::capture has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (16 pts), boolean chains 6, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_collab::frac::midpoint (cognitive 21) crates/collab/src/frac.rs:119— figcraft_collab::frac::midpoint has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_collab::frac::between (cognitive 17) crates/collab/src/frac.rs:243— figcraft_collab::frac::between has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Hub::send_out (cognitive 29) crates/collab-net/src/hub.rs:717— Hub::send_out has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 4 (7 pts), match/switch 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Hub::handle (cognitive 20) crates/collab-net/src/hub.rs:211— Hub::handle has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Hub::run (cognitive 18) crates/collab-net/src/hub.rs:171— Hub::run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 3 (6 pts), 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.
Hub::join (cognitive 17) crates/collab-net/src/hub.rs:367— Hub::join has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 4 (5 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Hub::message (cognitive 16) crates/collab-net/src/hub.rs:274— Hub::message has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 4 (7 pts) (nesting depth added 7). 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.
figcraft_doc::geometry::layers_at (cognitive 22) crates/doc/src/geometry.rs:234— figcraft_doc::geometry::layers_at has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to one function item inside it that branches (rec). 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.
figcraft_doc::proto_expr::apply (cognitive 21) crates/doc/src/proto_expr.rs:264— figcraft_doc::proto_expr::apply has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 5 (9 pts), loops 1 (2 pts) (nesting depth added 10). 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.
figcraft_doc::geometry::hits_node_itself (cognitive 19) crates/doc/src/geometry.rs:62— figcraft_doc::geometry::hits_node_itself has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 6, loops 1 (3 pts), match/switch 1 (nesting depth added 7). 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.
figcraft_doc::geometry::hit_rec (cognitive 17) crates/doc/src/geometry.rs:195— figcraft_doc::geometry::hit_rec has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
figcraft_doc::geometry::level_target (cognitive 16) crates/doc/src/geometry.rs:297— figcraft_doc::geometry::level_target has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 6, loops 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.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×5
Off the main sequence: figcraft-color — figcraft-color: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
Off the main sequence: figcraft-doc — figcraft-doc: abstractness 0.00, instability 0.13, distance 0.88 — zone of pain — concrete and depended on by 14 project(s), so it's rigid to change.
Off the main sequence: figcraft-text — figcraft-text: abstractness 0.00, instability 0.18, distance 0.82 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
Off the main sequence: figcraft-pathops — figcraft-pathops: abstractness 0.00, instability 0.22, distance 0.78 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
Off the main sequence: figcraft-collab — figcraft-collab: abstractness 0.04, instability 0.25, distance 0.71 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
figcraft_layout::layout_frame (cyclomatic 36) crates/layout/src/lib.rs:495— figcraft_layout::layout_frame has cyclomatic complexity 36 (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.
figcraft_layout::apply_constraints (cyclomatic 29) crates/layout/src/lib.rs:984— figcraft_layout::apply_constraints 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.
figcraft_layout::layout_grid (cyclomatic 24) crates/layout/src/lib.rs:918— figcraft_layout::layout_grid 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.
figcraft_layout::grid_lines (cyclomatic 22) crates/layout/src/lib.rs:1089— figcraft_layout::grid_lines 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.
W::render_node (cyclomatic 28) crates/svg/src/lib.rs:517— W::render_node 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.
W::simple_stroke (cyclomatic 24) crates/svg/src/lib.rs:779— W::simple_stroke has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
W::layer (cyclomatic 23) crates/svg/src/lib.rs:459— W::layer has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
W::filter_for (cyclomatic 18) crates/svg/src/lib.rs:351— W::filter_for 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.
figcraft_collab::docprops::apply_indexed (cyclomatic 27) crates/collab/src/docprops.rs:408— figcraft_collab::docprops::apply_indexed has cyclomatic complexity 27 (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.
figcraft_collab::diff::diff (cyclomatic 25) crates/collab/src/diff.rs:27— figcraft_collab::diff::diff 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.
figcraft_collab::history::capture (cyclomatic 16) crates/collab/src/history.rs:91— figcraft_collab::history::capture 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.
figcraft_collab::merge::plan (cyclomatic 16) crates/collab/src/merge.rs:260— figcraft_collab::merge::plan 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.
VectorNetwork::rounded (cyclomatic 27) crates/doc/src/vector.rs:384— VectorNetwork::rounded 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.
VectorNetwork::runs (cyclomatic 23) crates/doc/src/vector.rs:587— VectorNetwork::runs 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.
VectorNetwork::from_path (cyclomatic 22) crates/doc/src/vector.rs:195— VectorNetwork::from_path 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.
VectorNetwork::cycles (cyclomatic 20) crates/doc/src/vector_faces.rs:198— VectorNetwork::cycles 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.
figcraft_doc::proto_expr::apply (cyclomatic 24) crates/doc/src/proto_expr.rs:264— figcraft_doc::proto_expr::apply has cyclomatic complexity 24 (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.
figcraft_doc::geometry::layers_at (cyclomatic 18) crates/doc/src/geometry.rs:234— figcraft_doc::geometry::layers_at 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 one function item inside it that branches (rec). 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.
figcraft_doc::geometry::hits_node_itself (cyclomatic 16) crates/doc/src/geometry.rs:62— figcraft_doc::geometry::hits_node_itself has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
figcraft_doc::geometry::hit_rec (cyclomatic 16) crates/doc/src/geometry.rs:195— figcraft_doc::geometry::hit_rec 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.
FigApp::handle_ui_requests (cognitive 59) crates/ui-egui/src/app/commands.rs:119— FigApp::handle_ui_requests has cognitive complexity 59 (threshold 15). Drivers by points: if/else 26 (54 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FigApp::frame (cognitive 51) crates/ui-egui/src/app.rs:211— FigApp::frame has cognitive complexity 51 (threshold 15). Drivers by points: if/else 25 (32 pts), boolean chains 14, match/switch 2 (4 pts), loops 1 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
FigApp::auto_save_tick (cognitive 30) crates/ui-egui/src/app/files.rs:238— FigApp::auto_save_tick has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 3 (7 pts), boolean chains 5, loops 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.
FigApp::mobile_buttons (cognitive 19) crates/ui-egui/src/app/frame.rs:225— FigApp::mobile_buttons has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_pdf::text::draw_text (cognitive 29) crates/pdf/src/text.rs:43— figcraft_pdf::text::draw_text has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 8 (12 pts), boolean chains 4 (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.
figcraft_pdf::text::glyph_runs (cognitive 25) crates/pdf/src/text.rs:167— figcraft_pdf::text::glyph_runs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_pdf::export_groups (cognitive 20) crates/pdf/src/lib.rs:97— figcraft_pdf::export_groups has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, loops 3 (4 pts), match/switch 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_pdf::write (cognitive 16) crates/pdf/src/lib.rs:164— figcraft_pdf::write has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (5 pts), match/switch 1 (2 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.
Walker::node (cognitive 28) crates/vectordrawable/src/walk.rs:107— Walker::node has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (14 pts), match/switch 2 (7 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Walker::strokes (cognitive 26) crates/vectordrawable/src/walk.rs:301— Walker::strokes has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Walker::fill (cognitive 20) crates/vectordrawable/src/walk.rs:344— Walker::fill has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 4 (7 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Walker::children (cognitive 17) crates/vectordrawable/src/walk.rs:231— Walker::children has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server::fixes (cognitive 23) crates/collab/src/server.rs:607— Server::fixes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 5 (7 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Server::receive (cognitive 22) crates/collab/src/server.rs:406— Server::receive has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 3 (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.
Server::join_as (cognitive 18) crates/collab/src/server.rs:315— Server::join_as has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5, match/switch 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.
Server::check_entries (cognitive 16) crates/collab/src/server.rs:563— Server::check_entries has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), match/switch 2 (4 pts), boolean chains 3, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_pathops::width::dashes (cognitive 20) crates/pathops/src/width.rs:188— figcraft_pathops::width::dashes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_pathops::stroke_outline_of (cognitive 18) crates/pathops/src/lib.rs:377— figcraft_pathops::stroke_outline_of has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, loops 1 (2 pts), match/switch 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
figcraft_pathops::arrange (cognitive 16) crates/pathops/src/lib.rs:273— figcraft_pathops::arrange has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 2 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
figcraft_pathops::path_end (cognitive 16) crates/pathops/src/lib.rs:428— figcraft_pathops::path_end has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClassTooLong: Exporter crates/format/src/penpot/export.rs:135— ClassTooLong — 1081 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 32 methods, 2 blocks, lines 135-1794. The bar is 400 significant lines; this is 681 over it, 2.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Document crates/doc/src/lib.rs:192— ClassTooLong — 669 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 96 methods, 3 blocks, lines 192-1289. The bar is 400 significant lines; this is 269 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: W crates/svg/src/lib.rs:76— ClassTooLong — 653 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 23 methods, 2 blocks, lines 76-1108. The bar is 400 significant lines; this is 253 over it, 1.63× 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: Ctx crates/format/src/rest.rs:416— ClassTooLong — 601 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 45 methods, 2 blocks, lines 416-1323. The bar is 400 significant lines; this is 201 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Change coupling: catalog.rs ↔ lib.rs crates/engine/src/catalog.rs:1— `crates/engine/src/catalog.rs` and `crates/ui-egui/src/lib.rs` 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 `7ba22fb2` M1: Crop image from the Object menu, the right-click menu and the ima…; `cf6bd4ee` M7: list the fonts a file uses that aren't installed (#752); `825cb1e7` M7: list the fonts a file uses that aren't installed (#752) — run `git show` on any of them.
Change coupling: proto_panel.rs ↔ present.rs crates/ui-egui/src/panels/proto_panel.rs:1— `crates/ui-egui/src/panels/proto_panel.rs` and `crates/ui-egui/src/present.rs` change together 54% of the time (13 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 — 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 13 shared commits counted here, the most recent 3 are `4b12a828` M7: refresh FigCraft brand colors and wordmark (at that commit the file was still `crates/ui-egui/src/proto_panel.rs`); `1768be29` #772: leave the presentation backdrop as the file sets it (owner deci… (at that commit the file was still `crates/ui-egui/src/proto_panel.rs`); `1fe78aec` M7: respect theme in presenter controls and backdrop (at that commit the file was still `crates/ui-egui/src/proto_panel.rs`) — run `git show` on any of them.
Change coupling: cmd.rs ↔ lib.rs crates/engine/src/cmd.rs:1— `crates/engine/src/cmd.rs` and `crates/ui-egui/src/lib.rs` change together 50% of the time (11 of the 22 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 11 shared commits counted here, the most recent 3 are `cf6bd4ee` M7: list the fonts a file uses that aren't installed (#752) (at that commit the file was still `crates/engine/src/cmd/mod.rs`); `825cb1e7` M7: list the fonts a file uses that aren't installed (#752) (at that commit the file was still `crates/engine/src/cmd/mod.rs`); `7a5885cd` M3: add Selection colors for mixed selections (#403) (at that commit the file was still `crates/engine/src/cmd/mod.rs`) — run `git show` on any of them.
Change coupling: hub.rs ↔ link.rs crates/collab-net/src/hub.rs:1— `crates/collab-net/src/hub.rs` and `crates/collab-net/src/link.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 5 shared commits counted here, the most recent 3 are `89529b3d` #889: drop the hub write-cap and core-limit changes (neither is read); `fbb4a22e` fix(collab-net): allow live sessions above 64 MiB and report accurate…; `8bcb0f78` #338: drop the start/end feat marker comments — run `git show` on any of them.
Duplicated block (10 lines × 2) apps/figcraft/src/control_server.rs:165— apps/figcraft/src/control_server.rs:165-174 | crates/mcp/src/server.rs:145-154 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) crates/engine/src/cmd/file/load.rs:497— crates/engine/src/cmd/file/load.rs:497-506 | crates/engine/src/cmd/file/load.rs:609-618 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/ui-egui/src/icons/draw.rs:563— crates/ui-egui/src/icons/draw.rs:563-572 | crates/ui-egui/src/icons/draw.rs:1026-1035 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/ui-egui/src/widgets/style_picker.rs:840— crates/ui-egui/src/widgets/style_picker.rs:840-849 | crates/ui-egui/src/widgets/style_picker.rs:872-881 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 3) crates/engine/src/canvas/vectoredit/ops.rs:572— crates/engine/src/canvas/vectoredit/ops.rs:572-576 | crates/ui-egui/src/menus/palette.rs:309-314 | crates/ui-egui/src/widgets/style_picker.rs:345-349 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (5 lines × 3) crates/engine/src/content/synthetic_ds.rs:364— crates/engine/src/content/synthetic_ds.rs:364-368 | crates/engine/src/content/synthetic_ds.rs:426-430 | crates/engine/src/content/synthetic_ds.rs:459-463 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) crates/engine/src/dev/codegen/arkui.rs:30— crates/engine/src/dev/codegen/arkui.rs:30-34 | crates/engine/src/dev/codegen/compose.rs:57-61 | crates/engine/src/dev/codegen/swift.rs:28-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (5 lines × 3) crates/ui-egui/src/dialogs/plugins_ui.rs:592— crates/ui-egui/src/dialogs/plugins_ui.rs:592-596 | crates/ui-egui/src/home/online.rs:364-368 | crates/ui-egui/src/present/chrome.rs:319-323 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
FigApp::handle_ui_requests (cyclomatic 67) crates/ui-egui/src/app/commands.rs:119— FigApp::handle_ui_requests has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FigApp::frame (cyclomatic 40) crates/ui-egui/src/app.rs:211— FigApp::frame has cyclomatic complexity 40 (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.
FigApp::auto_save_tick (cyclomatic 16) crates/ui-egui/src/app/files.rs:238— FigApp::auto_save_tick 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.
figcraft_collab_net::hub::conn::serve (cyclomatic 24) crates/collab-net/src/hub/conn.rs:186— figcraft_collab_net::hub::conn::serve 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.
figcraft_collab_net::join::take (cyclomatic 20) crates/collab-net/src/join.rs:204— figcraft_collab_net::join::take has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
figcraft_collab_net::guest::session (cyclomatic 16) crates/collab-net/src/guest.rs:241— figcraft_collab_net::guest::session has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Server::receive (cyclomatic 19) crates/collab/src/server.rs:406— Server::receive 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.
Server::join_as (cyclomatic 16) crates/collab/src/server.rs:315— Server::join_as 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.
Server::request (cyclomatic 16) crates/mcp/src/server.rs:247— Server::request has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Document::paste_nodes (cyclomatic 19) crates/doc/src/lib.rs:889— Document::paste_nodes 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.
Document::repair (cyclomatic 19) crates/doc/src/lib.rs:1156— Document::repair 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.
Document::validate (cyclomatic 17) crates/doc/src/lib.rs:1088— Document::validate has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Document::paste_nodes (cognitive 34) crates/doc/src/lib.rs:889— Document::paste_nodes has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 4 (8 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Document::validate (cognitive 24) crates/doc/src/lib.rs:1088— Document::validate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 9). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Document::repair (cognitive 24) crates/doc/src/lib.rs:1156— Document::repair has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6, loops 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft::control_server::serve_with_events (cognitive 33) apps/figcraft/src/control_server.rs:161— figcraft::control_server::serve_with_events has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 4 (13 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft::recovery::recover_all (cognitive 24) apps/figcraft/src/recovery.rs:360— figcraft::recovery::recover_all has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 4 (6 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft::main (cognitive 21) apps/figcraft/src/main.rs:137— figcraft::main has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 4, loops 1, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
figcraft_collab_net::hub::conn::serve (cognitive 33) crates/collab-net/src/hub/conn.rs:186— figcraft_collab_net::hub::conn::serve has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (18 pts), match/switch 5 (10 pts), boolean chains 5 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_collab_net::guest::session (cognitive 16) crates/collab-net/src/guest.rs:241— figcraft_collab_net::guest::session has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_collab_net::hub::conn::read_loop (cognitive 16) crates/collab-net/src/hub/conn.rs:325— figcraft_collab_net::hub::conn::read_loop has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Client::rejoin (cognitive 29) crates/collab/src/client.rs:555— Client::rejoin has cognitive complexity 29 (threshold 15). Drivers by points: loops 8 (15 pts), if/else 6 (11 pts), boolean chains 2, match/switch 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Client::travel (cognitive 22) crates/collab/src/client.rs:268— Client::travel has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), 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.
Client::flush (cognitive 16) crates/collab/src/client.rs:325— Client::flush has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextLayout::selection_rects (cognitive 23) crates/text/src/layout.rs:1869— TextLayout::selection_rects has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 6, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextLayout::caret (cognitive 20) crates/text/src/layout.rs:1759— TextLayout::caret has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextLayout::hit (cognitive 16) crates/text/src/layout.rs:1843— TextLayout::hit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_mcp::tools::get_node (cognitive 22) crates/mcp/src/tools.rs:865— figcraft_mcp::tools::get_node has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_mcp::tools::refuse_unknown_args (cognitive 19) crates/mcp/src/tools.rs:513— figcraft_mcp::tools::refuse_unknown_args has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (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.
figcraft_mcp::tools::inspect_document (cognitive 18) crates/mcp/src/tools.rs:792— figcraft_mcp::tools::inspect_document has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (11 lines × 2) crates/engine/src/canvas/shapebuilder.rs:155— crates/engine/src/canvas/shapebuilder.rs:155-165 | crates/engine/src/canvas/vectoredit/regions.rs:204-214 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) crates/engine/src/cmd/lists.rs:143— crates/engine/src/cmd/lists.rs:143-153 | crates/engine/src/cmd/lists.rs:224-234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) crates/mcp/src/headless.rs:81— crates/mcp/src/headless.rs:81-91 | crates/ui-egui/src/control.rs:1532-1542 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/engine/src/dev/annotations.rs:132— crates/engine/src/dev/annotations.rs:132-140 | crates/engine/src/dev/dev_measurements.rs:70-78 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) crates/mcp/src/headless.rs:177— crates/mcp/src/headless.rs:177-185 | crates/ui-egui/src/control.rs:998-1006 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) crates/engine/src/dev/codegen/compose.rs:117— crates/engine/src/dev/codegen/compose.rs:117-125 | crates/engine/src/dev/codegen/swift.rs:105-113 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Hub::handle (cyclomatic 25) crates/collab-net/src/hub.rs:211— Hub::handle has cyclomatic complexity 25 (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.
Hub::message (cyclomatic 19) crates/collab-net/src/hub.rs:274— Hub::message has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
figcraft::main (cyclomatic 22) apps/figcraft/src/main.rs:137— figcraft::main 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.
figcraft::recovery::recover_all (cyclomatic 17) apps/figcraft/src/recovery.rs:360— figcraft::recovery::recover_all 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.
Store::admin (cyclomatic 22) apps/figcraft-server/src/store/backend.rs:213— Store::admin has cyclomatic complexity 22 (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.
Store::load (cyclomatic 16) apps/figcraft-server/src/store/journal.rs:48— Store::load 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.
Walker::fill (cyclomatic 21) crates/vectordrawable/src/walk.rs:344— Walker::fill has cyclomatic complexity 21 (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.
Walker::node (cyclomatic 18) crates/vectordrawable/src/walk.rs:107— Walker::node 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.
Targets::gather_in (cyclomatic 19) crates/engine/src/canvas/snap.rs:73— Targets::gather_in 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.
Targets::gather_for_guide (cyclomatic 16) crates/engine/src/canvas/snap.rs:134— Targets::gather_for_guide 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.
Headless::key (cyclomatic 19) crates/mcp/src/headless.rs:133— Headless::key has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Headless::dispatch (cyclomatic 17) crates/mcp/src/headless.rs:240— Headless::dispatch has cyclomatic complexity 17 (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.
Markup::element (cognitive 51) crates/engine/src/dev/codegen/html.rs:293— Markup::element has cognitive complexity 51 (threshold 15). Drivers by points: if/else 15 (21 pts), match/switch 7 (16 pts), boolean chains 11, loops 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Markup::instance_call (cognitive 21) crates/engine/src/dev/codegen/html.rs:248— Markup::instance_call has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, match/switch 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.
Sim::check (cognitive 30) crates/collab/src/sim.rs:376— Sim::check has cognitive complexity 30 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (8 pts), boolean chains 5, match/switch 2 (5 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.
Sim::step (cognitive 16) crates/collab/src/sim.rs:310— Sim::step has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_geom::smoothed_polygon (cognitive 28) crates/geom/src/lib.rs:238— figcraft_geom::smoothed_polygon has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_geom::rounded_polygon (cognitive 24) crates/geom/src/lib.rs:167— figcraft_geom::rounded_polygon has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Targets::gather_for_guide (cognitive 27) crates/engine/src/canvas/snap.rs:134— Targets::gather_for_guide has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 4 (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.
Targets::gather_in (cognitive 25) crates/engine/src/canvas/snap.rs:73— Targets::gather_in has cognitive complexity 25 (threshold 15). Drivers by points: loops 6 (11 pts), if/else 5 (9 pts), boolean chains 3, match/switch 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.
Schema::decode (cognitive 24) crates/format/src/fig/kiwi.rs:251— Schema::decode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (6 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Schema::parse (cognitive 23) crates/format/src/fig/kiwi.rs:621— Schema::parse has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (7 pts), match/switch 2 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
xtask::layers::check (cognitive 24) xtask/src/layers.rs:32— xtask::layers::check has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
xtask::docs_check::repeats (cognitive 18) xtask/src/docs_check.rs:33— xtask::docs_check::repeats has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (4 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LayerImport::add_layer (cognitive 23) crates/format/src/penpot.rs:3319— LayerImport::add_layer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
LayerImport::add_children (cognitive 16) crates/format/src/penpot.rs:3417— LayerImport::add_children has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_cli::files::export (cognitive 22) apps/figcraft-cli/src/files.rs:247— figcraft_cli::files::export has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (4 pts), match/switch 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_cli::perf::measure_components (cognitive 16) apps/figcraft-cli/src/perf.rs:373— figcraft_cli::perf::measure_components has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Duplicated block (6 lines × 3) crates/ui-egui/src/icons/draw.rs:302— crates/ui-egui/src/icons/draw.rs:302-307 | crates/ui-egui/src/icons/draw.rs:550-555 | crates/ui-egui/src/icons/draw.rs:973-978 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) crates/ui-egui/src/icons/draw.rs:368— crates/ui-egui/src/icons/draw.rs:368-373 | crates/ui-egui/src/icons/draw.rs:563-568 | crates/ui-egui/src/icons/draw.rs:1026-1031 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Low cohesion: Desktop (LCOM4 8) apps/figcraft/src/services.rs:12— Desktop's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: WebServices (LCOM4 6) apps/figcraft-web/src/web.rs:243— WebServices's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Presenter::perform_at (cyclomatic 36) crates/ui-egui/src/present/actions.rs:106— Presenter::perform_at 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.
Markup::element (cyclomatic 35) crates/engine/src/dev/codegen/html.rs:293— Markup::element has cyclomatic complexity 35 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
figcraft_server::cli::run (cyclomatic 28) apps/figcraft-server/src/cli.rs:200— figcraft_server::cli::run has cyclomatic complexity 28 (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. This is NOT this file's highest cyclomatic complexity: figcraft_server::cli::parse (cyclomatic 32) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Expr::type_at (cyclomatic 24) crates/doc/src/proto_expr_parse.rs:85— Expr::type_at has cyclomatic complexity 24 (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.
TokenExpr::atom (cyclomatic 24) crates/format/src/penpot.rs:1922— TokenExpr::atom has cyclomatic complexity 24 (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.
Manifest::check (cyclomatic 23) crates/plugin/src/manifest.rs:338— Manifest::check 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.
Replica::apply_one (cyclomatic 21) crates/collab/src/replica.rs:218— Replica::apply_one 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.
Parser::primary (cyclomatic 21) crates/doc/src/proto_expr_parse.rs:415— Parser::primary 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.
Sources::source (cyclomatic 20) crates/format/src/rest/fig_sources.rs:198— Sources::source 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.
figcraft_pdf::text::draw_text (cyclomatic 20) crates/pdf/src/text.rs:43— figcraft_pdf::text::draw_text has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
figcraft_web::web::start (cyclomatic 19) apps/figcraft-web/src/web.rs:22— figcraft_web::web::start 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.
Client::rejoin (cyclomatic 19) crates/collab/src/client.rs:555— Client::rejoin has cyclomatic complexity 19 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Worker::new (cyclomatic 19) crates/ui-egui/src/canvas/render_worker.rs:420— Worker::new 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.
Popover::show (cyclomatic 19) crates/ui-egui/src/popover.rs:157— Popover::show 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.
LayerImport::add_layer (cyclomatic 18) crates/format/src/penpot.rs:3319— LayerImport::add_layer 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.
Param::check (cyclomatic 17) crates/plugin/src/manifest.rs:245— Param::check has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Config::check (cyclomatic 16) apps/figcraft-server/src/config.rs:225— Config::check 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.
Sim::check (cyclomatic 16) crates/collab/src/sim.rs:376— Sim::check has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
figcraft_geom::smoothed_polygon (cyclomatic 16) crates/geom/src/lib.rs:238— figcraft_geom::smoothed_polygon 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.
figcraft_mcp::tools::export (cyclomatic 16) crates/mcp/src/tools.rs:1029— figcraft_mcp::tools::export has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: figcraft_mcp::tools::call_tool (cyclomatic 24) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
figcraft_pathops::stroke_outline_of (cyclomatic 16) crates/pathops/src/lib.rs:377— figcraft_pathops::stroke_outline_of 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.
Presenter::perform_at (cognitive 47) crates/ui-egui/src/present/actions.rs:106— Presenter::perform_at has cognitive complexity 47 (threshold 15). Drivers by points: if/else 19 (36 pts), match/switch 3 (5 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Worker::new (cognitive 31) crates/ui-egui/src/canvas/render_worker.rs:420— Worker::new has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 4 (6 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Replica::apply_one (cognitive 29) crates/collab/src/replica.rs:218— Replica::apply_one has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 4 (7 pts), loops 2 (4 pts) (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Manifest::check (cognitive 29) crates/plugin/src/manifest.rs:338— Manifest::check has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser::primary (cognitive 27) crates/doc/src/proto_expr_parse.rs:415— Parser::primary has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 3 (5 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Expr::type_at (cognitive 25) crates/doc/src/proto_expr_parse.rs:85— Expr::type_at has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 7 (13 pts), if/else 8 (11 pts), boolean chains 1 (nesting depth added 9). 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.
Roles::new (cognitive 25) crates/engine/src/assets/token_roles.rs:53— Roles::new has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 6 (10 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.
Recents::refresh (cognitive 24) crates/ui-egui/src/home/home_recents.rs:453— Recents::refresh has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5, loops 2, match/switch 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.
Recovery::write (cognitive 23) apps/figcraft/src/recovery.rs:182— Recovery::write has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_server::cli::run (cognitive 23) apps/figcraft-server/src/cli.rs:200— figcraft_server::cli::run has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 12 (23 pts) (nesting depth added 11). 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.
Store::load (cognitive 22) apps/figcraft-server/src/store/journal.rs:48— Store::load has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 pts), match/switch 4 (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.
figcraft_web::web::start (cognitive 22) apps/figcraft-web/src/web.rs:22— figcraft_web::web::start has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (16 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Popover::show (cognitive 22) crates/ui-egui/src/popover.rs:157— Popover::show has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 8, match/switch 2 (3 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.
Color::parse_css (cognitive 19) crates/color/src/lib.rs:154— Color::parse_css has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Sources::source (cognitive 19) crates/format/src/rest/fig_sources.rs:198— Sources::source has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, match/switch 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.
Step::toward (cognitive 18) crates/collab/src/history.rs:251— Step::toward has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Headless::key (cognitive 18) crates/mcp/src/headless.rs:133— Headless::key has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
figcraft_plugin::widget::check_menu (cognitive 18) crates/plugin/src/widget.rs:262— figcraft_plugin::widget::check_menu has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 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.
Config::check (cognitive 17) apps/figcraft-server/src/config.rs:225— Config::check has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, 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.
Variables::flattener (cognitive 17) crates/doc/src/styles.rs:422— Variables::flattener has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 5 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReorderLayout::new (cognitive 17) crates/engine/src/selection/selection_reorder.rs:20— ReorderLayout::new has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 3 (5 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Node::outline_reach (cognitive 16) crates/doc/src/node.rs:932— Node::outline_reach has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×1
Edited copy of a member (12 corresponding lines) crates/pdf/src/draw.rs:69— crates/pdf/src/draw.rs:69-85 | crates/render/src/draw.rs:108-121 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) apps/figcraft-cli/src/files.rs:92— apps/figcraft-cli/src/files.rs:92-103 | crates/engine/src/cmd/file/save.rs:7-38 | crates/mcp/src/headless.rs:324-348 | crates/mcp/src/headless.rs:350-365 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (18 lines × 3) crates/format/src/penpot.rs:3663— crates/format/src/penpot.rs:3663-3680 | crates/format/src/penpot.rs:3713-3730 | crates/format/src/penpot.rs:3731-3748 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8–14 lines × 2) crates/engine/src/cmd/file/export.rs:177— crates/engine/src/cmd/file/export.rs:177-190 | crates/engine/src/cmd/file/export.rs:212-219 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13–14 lines × 2) crates/engine/src/cmd/file/load.rs:244— crates/engine/src/cmd/file/load.rs:244-257 | crates/engine/src/cmd/file/load.rs:289-301 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) crates/ui-egui/src/theme.rs:119— crates/ui-egui/src/theme.rs:119-130 | crates/ui-egui/src/theme.rs:159-170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 2) crates/ui-egui/src/theme.rs:107— crates/ui-egui/src/theme.rs:107-117 | crates/ui-egui/src/theme.rs:148-157 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9–10 lines × 2) crates/engine/src/canvas/drop.rs:153— crates/engine/src/canvas/drop.rs:153-162 | crates/engine/src/cmd/create.rs:140-148 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (3–10 lines × 3) crates/ui-egui/src/panels/typography/spacing.rs:131— crates/ui-egui/src/panels/typography/spacing.rs:131-140 | crates/ui-egui/src/widgets.rs:610-619 | crates/ui-egui/src/widgets.rs:1247-1249 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8–9 lines × 2) crates/ui-egui/src/icons/draw.rs:547— crates/ui-egui/src/icons/draw.rs:547-555 | crates/ui-egui/src/icons/draw.rs:971-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.
Duplicated block (7–9 lines × 2) crates/ui-egui/src/icons/draw.rs:583— crates/ui-egui/src/icons/draw.rs:583-589 | crates/ui-egui/src/icons/draw.rs:771-779 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 4) crates/ui-egui/src/icons/draw.rs:368— crates/ui-egui/src/icons/draw.rs:368-372 | crates/ui-egui/src/icons/draw.rs:550-554 | crates/ui-egui/src/icons/draw.rs:973-977 | crates/ui-egui/src/icons/draw.rs:1026-1030 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) crates/ui-egui/src/panels/layout_panel.rs:507— crates/ui-egui/src/panels/layout_panel.rs:507-515 | crates/ui-egui/src/panels/proto_panel.rs:1322-1330 | crates/ui-egui/src/panels/proto_panel.rs:1342-1352 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6 lines × 4) apps/figcraft-cli/src/files.rs:96— apps/figcraft-cli/src/files.rs:96-101 | crates/engine/src/cmd/file/save.rs:10-15 | crates/mcp/src/headless.rs:340-345 | crates/mcp/src/headless.rs:357-362 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Weak hash algorithm crates/format/src/fig/export.rs:618— 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+ (`sha2::Sha256::digest(…)`) 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.
Silent fallback default on Err apps/figcraft/src/gamepad.rs:28— `held` turns every `Err` into `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/engine/src/canvas/tools/keys.rs:170— `shape_handles` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/engine/src/canvas/vectoredit/regions.rs:259— `vector_region_hatch` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/engine/src/session/undo.rs:45— `undo_labels` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/engine/src/dev/component_codegen.rs:532— `js_string` turns every `Err` into `"\"\"".into()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/engine/src/fonts.rs:159— `refit_open` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/format/src/thumbnail.rs:139— `file_preview` turns every `Err` into `Preview::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/format/src/thumbnail.rs:151— `archive_preview` turns every `Err` into `Preview::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/render/src/image_profile.rs:88— `from_icc` turns every `Err` into `Source::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/render/src/image_profile.rs:124— `png_chunks` turns every `Err` into `Source::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ui-egui/src/canvas.rs:349— `describe` turns every `Err` into `String::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ui-egui/src/canvas/comments.rs:243— `pins` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ui-egui/src/canvas/guides.rs:65— `placed_guides` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ui-egui/src/canvas/selection_spacing.rs:151— `handles` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ui-egui/src/menus/palette.rs:372— `asset_sections` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ui-egui/src/panels/dev_mode.rs:301— `code` turns every `Err` into `String::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ui-egui/src/widgets/colorpicker.rs:239— `page_colors` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/ui-egui/src/widgets/colorpicker.rs:1185— `pattern_sources` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Duplicated predicate crates/engine/src/canvas/drop.rs:159— `!n.visible || n.locked || n.is_board_atom()` appears character-identically in 2 files — crates/engine/src/canvas/drop.rs, crates/engine/src/cmd/create.rs. 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 crates/ui-egui/src/panels/variable_ui.rs:434— `!r.has_focus() && !crate::a11y::field_focused(ui.ctx())` appears character-identically in 3 files — crates/ui-egui/src/panels/variable_ui.rs, crates/ui-egui/src/widgets/colorpicker.rs, crates/ui-egui/src/widgets/style_picker.rs. 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 crates/format/src/penpot.rs:5863— `(a.0 - b.0).abs() < 1e-3 && (a.1 - b.1).abs() < 1e-3` appears character-identically in 2 files — crates/format/src/penpot.rs, crates/render/src/glass.rs. 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 crates/engine/src/assets/components/sync.rs:280— `figcraft_text::auto_size(n) && ((w - n.width).abs() > 1e-6 || (h - n.height).abs() > 1e-6)` appears character-identically in 2 files — crates/engine/src/assets/components/sync.rs, crates/engine/src/derived.rs. 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 crates/engine/src/canvas/vectoredit/transform.rs:166— `get(p, "ids").is_some() || get(p, "id").is_some()` appears character-identically in 2 files — crates/engine/src/canvas/vectoredit/transform.rs, crates/engine/src/dev/annotations.rs. 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 crates/engine/src/dev/codegen/arkui.rs:209— `k.is_frame_like() || matches!(k, NodeKind::Group)` appears character-identically in 4 files — crates/engine/src/dev/codegen/arkui.rs, crates/engine/src/dev/codegen/compose.rs, crates/engine/src/dev/codegen/flutter.rs, crates/engine/src/dev/codegen/swift.rs. 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 crates/pdf/src/draw.rs:132— `n.stroke.sides.is_some() || (n.stroke.dashes.is_empty() && closed && n.stroke.align != StrokeAlign::Center)` appears character-identically in 3 files — crates/pdf/src/draw.rs, crates/render/src/draw.rs, crates/vectordrawable/src/stroke.rs. 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 crates/engine/src/dev/annotations.rs:137— `out.len() >= MAX_LISTED || visited > 200_000` appears character-identically in 2 files — crates/engine/src/dev/annotations.rs, crates/engine/src/dev/dev_measurements.rs. 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 crates/ui-egui/src/canvas/overlays.rs:518— `p.layout.is_none() || n.child_layout.absolute` appears character-identically in 2 files — crates/ui-egui/src/canvas/overlays.rs, crates/ui-egui/src/panels/right.rs. 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 crates/engine/src/cmd/structure.rs:1012— `r.x0.is_finite() && r.y0.is_finite() && r.x1.is_finite() && r.y1.is_finite()` appears character-identically in 2 files — crates/engine/src/cmd/structure.rs, crates/pdf/src/lib.rs. 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 crates/ui-egui/src/widgets.rs:1085— `resp.dragged() || resp.clicked() || resp.drag_started()` appears character-identically in 2 files — crates/ui-egui/src/widgets.rs, crates/ui-egui/src/widgets/colorpicker.rs. 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 crates/ui-egui/src/panels/typography/fields.rs:513— `s.is_empty() || s.eq_ignore_ascii_case("auto")` appears character-identically in 2 files — crates/ui-egui/src/panels/typography/fields.rs, crates/ui-egui/src/panels/typography/spacing.rs. 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 crates/color/src/lib.rs:359— `w.is_finite() && h.is_finite() && w > 0.0 && h > 0.0` appears character-identically in 3 files — crates/color/src/lib.rs, crates/engine/src/cmd/view.rs, crates/vectordrawable/src/lib.rs. 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.
Subsumed condition operand crates/ui-egui/src/inspect_fields_tests.rs:45— `error.contains("fields")` can never decide this `||` — every value satisfying `error.contains("fields")` also satisfies `error.contains("field")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/format/src/fig/export/common.rs:58— `k.starts_with("strokes/")` can never decide this `||` — every value satisfying `k.starts_with("strokes/")` also satisfies `k.starts_with("stroke")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/engine/src/effects_tests.rs:62— `err.contains("offset")` can never decide this `&&` — every value satisfying `err.contains("offsetX, offsetY")` also satisfies `err.contains("offset")`, so the `&&` chain is already decided by the former. The expression is equivalent to the chain without it, which means it is narrower than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand crates/engine/src/variable_props_tests.rs:95— `e.contains("Theme/palette/surface")` can never decide this `&&` — every value satisfying `e.contains("Other/Theme/palette/surface")` also satisfies `e.contains("Theme/palette/surface")`, so the `&&` chain is already decided by the former. The expression is equivalent to the chain without it, which means it is narrower than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
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 — 3 of 23 project(s) overshoot their size bounds, lowering Project Cohesion to 7.4/10. The most over is `crates/engine` (60913 LoC, 306 module-visible types across 23 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
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.
Logging is not universal — Only 9/11 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `apps/figcraft-cli`, `xtask`.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Outdated: crc32fast — `crc32fast` is locked at 1.5.3 but 1.5.4 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in apps/figcraft-server/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p crc32fast` and commit the updated REDACTED.
Outdated: flate2 — `flate2` is locked at 1.1.10 but 1.1.11 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/collab/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p flate2` and commit the updated REDACTED.
Outdated: icu_segmenter — `icu_segmenter` is locked at 2.3.0 but 2.4.0 is the current stable release on crates.io, and it already satisfies the `"2.3"` requirement declared in crates/text/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p icu_segmenter` and commit the updated REDACTED.
Outdated: js-sys — `js-sys` is locked at 0.3.106 but 0.3.107 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in apps/figcraft-web/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p js-sys` and commit the updated REDACTED.
Outdated: log — `log` is locked at 0.4.34 but 0.4.35 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in apps/figcraft-server/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p log` and commit the updated REDACTED.
Outdated: rustix — `rustix` is locked at 1.1.5 but 1.1.6 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in apps/figcraft-server/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rustix` and commit the updated REDACTED.
Outdated: toml — `toml` is locked at 1.1.8+spec-1.1.0 but 1.2.1+spec-1.1.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in apps/figcraft-server/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p toml` and commit the updated REDACTED.
Outdated: wasm-bindgen — `wasm-bindgen` is locked at 0.2.129 but 0.2.130 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in apps/figcraft-web/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p wasm-bindgen` and commit the updated REDACTED.
Outdated: wasm-bindgen-futures — `wasm-bindgen-futures` is locked at 0.4.79 but 0.4.80 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in apps/figcraft-web/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p wasm-bindgen-futures` and commit the updated REDACTED.
Outdated: web-sys — `web-sys` is locked at 0.3.106 but 0.3.107 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in apps/figcraft-web/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p web-sys` and commit the updated REDACTED.
Outdated: webbrowser — `webbrowser` is locked at 1.2.5 but 1.2.6 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in apps/figcraft/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p webbrowser` and commit the updated REDACTED.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1b3ba-5b15-7db4-9fc1-e06cb10c4868 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 14 · Warnings: 1387 · Recommendations: 46 · Info: 11 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 07-11-2026 @ 01:58 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.