Public report of rhaiscript/rhai, published 27 October 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). 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, 27 October 2026, 23:54 UTC · Survey ID cd_b11f89095572401297c1fcba084b96e3
rhaiscript/rhai
Measured 27 October 2026, 23:51 UTC, at code version ddad140
No regression since the last survey
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
No change since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 75,830 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 0.8 person-years · Weakest lens: Security and Compliance, 53
Findings by how serious they are
53 critical475 serious17 minor
23 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
27 October 2026, 23:51 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
43of 43 dimensions measured by tools.
533of 545 findings point to an exact file and line, so you can open each one in the code. The other 12 concern the repository as a whole, such as missing documentation.
43dimensions across 6 lenses, read from 75,830 lines of product code in 2 projects.
rhaiscript/rhai falls short of our standard for production, in part because it has pipeline tools referenced by a changeable name. It scores 62 out of 100 and is rated Adequate, and all 53 of its critical findings are security problems in the build pipeline.
Security and Compliance, at 53, is the weakest lens and counts most in the score. The best first step is recording design decisions, worth about 5 points. Pinning the build actions that handle secrets would lift Security and Compliance itself, worth about 2 points. Raising Security and Compliance to 70 would lift the score to about 68.
Fifty pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. One pipeline step installs packages that can change without warning. Pinning each tool to an exact version and pinning what the pipeline installs would close both risks. Passing outside input through environment variables would fix the pipeline step that puts outside input straight into a shell command, and limiting each secret to its own step would deal with the secret exposed to more of the pipeline than needed.
The product code is 75,830 lines, about €110,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.
Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 9 findings
These 9 critical or serious findings were in the previous survey, on 13 October 2026, and are gone from this one.
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) src/module/mod.rs
€36,000 to €180,000, for 606 to 1,922 hours of work, about 0.8 person-years for 1 to 2 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.9 at a score of 62. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 75,830 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: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 5 points · Low effort · ADR Quality
2
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED.
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 €110,000 to build again, about 0.8 person-years of work. Its weakest lens is Security and Compliance, at 53 (Adequate). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance 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 5 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.4 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 53,375 lines over the last 90 days, which is about 216,465 lines a year. At that pace, the extra work comes to an estimated 21.3 to 128 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, 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.
159 modules, with 346 dependencies between them. 2 loops run through 39 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 119 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.
rhai.eval.target uses rhai.types.position, so a change to rhai.types.position can break rhai.eval.target, while a change to rhai.eval.target can't break rhai.types.position.
Position
Below the diagonal: rhai.eval.target uses a module listed above it, which is the healthy direction.
7→25 rhai.eval.target uses rhai.types.dynamicpart of a loop✕
Connections
1 pair of types, where a type in rhai.eval.target uses a type in rhai.types.dynamic.
rhai.eval.target uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.eval.target, while a change to rhai.eval.target can't break rhai.types.dynamic.
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.
8→36 rhai.grain.bytecode.chain uses rhai.grain.programpart of a loop✕
Connections
3 pairs of types, where a type in rhai.grain.bytecode.chain uses a type in rhai.grain.program.
rhai.grain.bytecode.chain uses rhai.grain.program, so a change to rhai.grain.program can break rhai.grain.bytecode.chain, while a change to rhai.grain.bytecode.chain can't break rhai.grain.program.
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.
rhai.grain.bytecode.op uses rhai.types.token, so a change to rhai.types.token can break rhai.grain.bytecode.op, while a change to rhai.grain.bytecode.op can't break rhai.types.token.
Position
Below the diagonal: rhai.grain.bytecode.op uses a module listed above it, which is the healthy direction.
9→36 rhai.grain.bytecode.op uses rhai.grain.programpart of a loop✕
Connections
2 pairs of types, where a type in rhai.grain.bytecode.op uses a type in rhai.grain.program.
rhai.grain.bytecode.op uses rhai.grain.program, so a change to rhai.grain.program can break rhai.grain.bytecode.op, while a change to rhai.grain.bytecode.op can't break rhai.grain.program.
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.
rhai.grain.bytecode.positions uses rhai.grain.pos, so a change to rhai.grain.pos can break rhai.grain.bytecode.positions, while a change to rhai.grain.bytecode.positions can't break rhai.grain.pos.
Position
Below the diagonal: rhai.grain.bytecode.positions uses a module listed above it, which is the healthy direction.
rhai.grain.bytecode.positions uses rhai.types.position, so a change to rhai.types.position can break rhai.grain.bytecode.positions, while a change to rhai.grain.bytecode.positions can't break rhai.types.position.
Position
Below the diagonal: rhai.grain.bytecode.positions uses a module listed above it, which is the healthy direction.
rhai.types.error uses rhai.grain.pos, so a change to rhai.grain.pos can break rhai.types.error, while a change to rhai.types.error can't break rhai.grain.pos.
Position
Below the diagonal: rhai.types.error uses a module listed above it, which is the healthy direction.
rhai.types.error uses rhai.types.position, so a change to rhai.types.position can break rhai.types.error, while a change to rhai.types.error can't break rhai.types.position.
Position
Below the diagonal: rhai.types.error uses a module listed above it, which is the healthy direction.
rhai.types.immutable_string uses rhai.eval.target, so a change to rhai.eval.target can break rhai.types.immutable_string, while a change to rhai.types.immutable_string can't break rhai.eval.target.
Position
Below the diagonal: rhai.types.immutable_string uses a module listed above it, which is the healthy direction.
rhai.eval.cache uses rhai.func.function, so a change to rhai.func.function can break rhai.eval.cache, while a change to rhai.eval.cache can't break rhai.func.function.
Position
Below the diagonal: rhai.eval.cache uses a module listed above it, which is the healthy direction.
rhai.eval.cache uses rhai.types.immutable_string, so a change to rhai.types.immutable_string can break rhai.eval.cache, while a change to rhai.eval.cache can't break rhai.types.immutable_string.
Position
Below the diagonal: rhai.eval.cache uses a module listed above it, which is the healthy direction.
rhai.eval.debugger uses rhai.types.position, so a change to rhai.types.position can break rhai.eval.debugger, while a change to rhai.eval.debugger can't break rhai.types.position.
Position
Below the diagonal: rhai.eval.debugger uses a module listed above it, which is the healthy direction.
rhai.eval.debugger uses rhai.types.immutable_string, so a change to rhai.types.immutable_string can break rhai.eval.debugger, while a change to rhai.eval.debugger can't break rhai.types.immutable_string.
Position
Below the diagonal: rhai.eval.debugger uses a module listed above it, which is the healthy direction.
14→25 rhai.eval.debugger uses rhai.types.dynamicpart of a loop✕
Connections
1 pair of types, where a type in rhai.eval.debugger uses a type in rhai.types.dynamic.
rhai.eval.debugger uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.eval.debugger, while a change to rhai.eval.debugger can't break rhai.types.dynamic.
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.
14→30 rhai.eval.debugger uses rhai.ast.astpart of a loop✕
Connections
1 pair of types, where a type in rhai.eval.debugger uses a type in rhai.ast.ast.
rhai.eval.debugger uses rhai.ast.ast, so a change to rhai.ast.ast can break rhai.eval.debugger, while a change to rhai.eval.debugger can't break rhai.ast.ast.
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.
rhai.types.scope uses rhai.types.immutable_string, so a change to rhai.types.immutable_string can break rhai.types.scope, while a change to rhai.types.scope can't break rhai.types.immutable_string.
Position
Below the diagonal: rhai.types.scope uses a module listed above it, which is the healthy direction.
15→16 rhai.types.scope uses rhai.api.definitionspart of a loop✕
Connections
1 pair of types, where a type in rhai.types.scope uses a type in rhai.api.definitions.
rhai.types.scope uses rhai.api.definitions, so a change to rhai.api.definitions can break rhai.types.scope, while a change to rhai.types.scope can't break rhai.api.definitions.
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.
15→25 rhai.types.scope uses rhai.types.dynamicpart of a loop✕
Connections
2 pairs of types, where a type in rhai.types.scope uses a type in rhai.types.dynamic.
rhai.types.scope uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.types.scope, while a change to rhai.types.scope can't break rhai.types.dynamic.
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.
rhai.api.definitions uses rhai.types.scope, so a change to rhai.types.scope can break rhai.api.definitions, while a change to rhai.api.definitions can't break rhai.types.scope.
Position
Below the diagonal: rhai.api.definitions uses a module listed above it, which is the healthy direction.
16→22 rhai.api.definitions uses rhai.enginepart of a loop✕
Connections
2 pairs of types, where a type in rhai.api.definitions uses a type in rhai.engine.
rhai.api.definitions uses rhai.engine, so a change to rhai.engine can break rhai.api.definitions, while a change to rhai.api.definitions can't break rhai.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.
rhai.eval.global_state uses rhai.types.immutable_string, so a change to rhai.types.immutable_string can break rhai.eval.global_state, while a change to rhai.eval.global_state can't break rhai.types.immutable_string.
Position
Below the diagonal: rhai.eval.global_state uses a module listed above it, which is the healthy direction.
rhai.eval.global_state uses rhai.eval.debugger, so a change to rhai.eval.debugger can break rhai.eval.global_state, while a change to rhai.eval.global_state can't break rhai.eval.debugger.
Position
Below the diagonal: rhai.eval.global_state uses a module listed above it, which is the healthy direction.
17→25 rhai.eval.global_state uses rhai.types.dynamicpart of a loop✕
Connections
1 pair of types, where a type in rhai.eval.global_state uses a type in rhai.types.dynamic.
rhai.eval.global_state uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.eval.global_state, while a change to rhai.eval.global_state can't break rhai.types.dynamic.
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.
rhai.func.native uses rhai.types.position, so a change to rhai.types.position can break rhai.func.native, while a change to rhai.func.native can't break rhai.types.position.
Position
Below the diagonal: rhai.func.native uses a module listed above it, which is the healthy direction.
rhai.func.native uses rhai.eval.debugger, so a change to rhai.eval.debugger can break rhai.func.native, while a change to rhai.func.native can't break rhai.eval.debugger.
Position
Below the diagonal: rhai.func.native uses a module listed above it, which is the healthy direction.
rhai.func.native uses rhai.types.scope, so a change to rhai.types.scope can break rhai.func.native, while a change to rhai.func.native can't break rhai.types.scope.
Position
Below the diagonal: rhai.func.native uses a module listed above it, which is the healthy direction.
rhai.func.native uses rhai.eval.global_state, so a change to rhai.eval.global_state can break rhai.func.native, while a change to rhai.func.native can't break rhai.eval.global_state.
Position
Below the diagonal: rhai.func.native uses a module listed above it, which is the healthy direction.
18→22 rhai.func.native uses rhai.enginepart of a loop✕
Connections
2 pairs of types, where a type in rhai.func.native uses a type in rhai.engine.
rhai.func.native uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.func.native, while a change to rhai.func.native can't break rhai.types.dynamic.
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.
rhai.func.script uses rhai.func.function, so a change to rhai.func.function can break rhai.func.script, while a change to rhai.func.script can't break rhai.func.function.
Position
Below the diagonal: rhai.func.script uses a module listed above it, which is the healthy direction.
rhai.func.script uses rhai.types.position, so a change to rhai.types.position can break rhai.func.script, while a change to rhai.func.script can't break rhai.types.position.
Position
Below the diagonal: rhai.func.script uses a module listed above it, which is the healthy direction.
rhai.func.script uses rhai.types.immutable_string, so a change to rhai.types.immutable_string can break rhai.func.script, while a change to rhai.func.script can't break rhai.types.immutable_string.
Position
Below the diagonal: rhai.func.script uses a module listed above it, which is the healthy direction.
rhai.func.script uses rhai.eval.global_state, so a change to rhai.eval.global_state can break rhai.func.script, while a change to rhai.func.script can't break rhai.eval.global_state.
Position
Below the diagonal: rhai.func.script uses a module listed above it, which is the healthy direction.
rhai.optimizer uses rhai.types.token, so a change to rhai.types.token can break rhai.optimizer, while a change to rhai.optimizer can't break rhai.types.token.
Position
Below the diagonal: rhai.optimizer uses a module listed above it, which is the healthy direction.
rhai.optimizer uses rhai.types.immutable_string, so a change to rhai.types.immutable_string can break rhai.optimizer, while a change to rhai.optimizer can't break rhai.types.immutable_string.
Position
Below the diagonal: rhai.optimizer uses a module listed above it, which is the healthy direction.
rhai.optimizer uses rhai.eval.cache, so a change to rhai.eval.cache can break rhai.optimizer, while a change to rhai.optimizer can't break rhai.eval.cache.
Position
Below the diagonal: rhai.optimizer uses a module listed above it, which is the healthy direction.
rhai.optimizer uses rhai.types.scope, so a change to rhai.types.scope can break rhai.optimizer, while a change to rhai.optimizer can't break rhai.types.scope.
Position
Below the diagonal: rhai.optimizer uses a module listed above it, which is the healthy direction.
rhai.optimizer uses rhai.eval.global_state, so a change to rhai.eval.global_state can break rhai.optimizer, while a change to rhai.optimizer can't break rhai.eval.global_state.
Position
Below the diagonal: rhai.optimizer uses a module listed above it, which is the healthy direction.
20→22 rhai.optimizer uses rhai.enginepart of a loop✕
Connections
1 pair of types, where a type in rhai.optimizer uses a type in rhai.engine.
rhai.optimizer uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.optimizer, while a change to rhai.optimizer can't break rhai.types.dynamic.
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.
20→26 rhai.optimizer uses rhai.ast.stmtpart of a loop✕
Connections
1 pair of types, where a type in rhai.optimizer uses a type in rhai.ast.stmt.
rhai.parser uses rhai.types.position, so a change to rhai.types.position can break rhai.parser, while a change to rhai.parser can't break rhai.types.position.
Position
Below the diagonal: rhai.parser uses a module listed above it, which is the healthy direction.
rhai.parser uses rhai.eval.global_state, so a change to rhai.eval.global_state can break rhai.parser, while a change to rhai.parser can't break rhai.eval.global_state.
Position
Below the diagonal: rhai.parser uses a module listed above it, which is the healthy direction.
21→32 rhai.parser uses rhai.ast.exprpart of a loop✕
Connections
1 pair of types, where a type in rhai.parser uses a type in rhai.ast.expr.
The types involved
rhai.parser.parser$module → rhai.ast.expr.Expr
Direction
rhai.parser uses rhai.ast.expr, so a change to rhai.ast.expr can break rhai.parser, while a change to rhai.parser can't break rhai.ast.expr.
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 rhai.engine uses a type in rhai.func.function.
The types involved
rhai.engine.Engine → rhai.func.function.FnAccess
Direction
rhai.engine uses rhai.func.function, so a change to rhai.func.function can break rhai.engine, while a change to rhai.engine can't break rhai.func.function.
Position
Below the diagonal: rhai.engine uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in rhai.engine uses a type in rhai.types.position.
The types involved
rhai.engine.Engine → rhai.types.position.Position
Direction
rhai.engine uses rhai.types.position, so a change to rhai.types.position can break rhai.engine, while a change to rhai.engine can't break rhai.types.position.
Position
Below the diagonal: rhai.engine uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in rhai.engine uses a type in rhai_codegen.module.
The types involved
rhai.engine.Engine → rhai_codegen.module.Module
Direction
rhai.engine uses rhai_codegen.module, so a change to rhai_codegen.module can break rhai.engine, while a change to rhai.engine can't break rhai_codegen.module.
Position
Below the diagonal: rhai.engine uses a module listed above it, which is the healthy direction.
rhai.engine uses rhai.types.immutable_string, so a change to rhai.types.immutable_string can break rhai.engine, while a change to rhai.engine can't break rhai.types.immutable_string.
Position
Below the diagonal: rhai.engine uses a module listed above it, which is the healthy direction.
rhai.engine uses rhai.eval.debugger, so a change to rhai.eval.debugger can break rhai.engine, while a change to rhai.engine can't break rhai.eval.debugger.
Position
Below the diagonal: rhai.engine uses a module listed above it, which is the healthy direction.
rhai.engine uses rhai.api.definitions, so a change to rhai.api.definitions can break rhai.engine, while a change to rhai.engine can't break rhai.api.definitions.
Position
Below the diagonal: rhai.engine uses a module listed above it, which is the healthy direction.
rhai.engine uses rhai.eval.global_state, so a change to rhai.eval.global_state can break rhai.engine, while a change to rhai.engine can't break rhai.eval.global_state.
Position
Below the diagonal: rhai.engine uses a module listed above it, which is the healthy direction.
rhai.engine uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.engine, while a change to rhai.engine can't break rhai.types.dynamic.
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.
22→26 rhai.engine uses rhai.ast.stmtpart of a loop✕
Connections
2 pairs of types, where a type in rhai.engine uses a type in rhai.ast.stmt.
The types involved
rhai.engine.Engine → rhai.ast.stmt.OpAssignment
rhai.engine.Engine → rhai.ast.stmt.Stmt
Direction
rhai.engine uses rhai.ast.stmt, so a change to rhai.ast.stmt can break rhai.engine, while a change to rhai.engine can't break rhai.ast.stmt.
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.
22→30 rhai.engine uses rhai.ast.astpart of a loop✕
Connections
2 pairs of types, where a type in rhai.engine uses a type in rhai.ast.ast.
The types involved
rhai.engine.Engine → rhai.ast.ast.AST
rhai.engine.Engine → rhai.ast.ast.ASTNode
Direction
rhai.engine uses rhai.ast.ast, so a change to rhai.ast.ast can break rhai.engine, while a change to rhai.engine can't break rhai.ast.ast.
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.
22→32 rhai.engine uses rhai.ast.exprpart of a loop✕
Connections
2 pairs of types, where a type in rhai.engine uses a type in rhai.ast.expr.
The types involved
rhai.engine.Engine → rhai.ast.expr.Expr
rhai.engine.Engine → rhai.ast.expr.FnCallExpr
Direction
rhai.engine uses rhai.ast.expr, so a change to rhai.ast.expr can break rhai.engine, while a change to rhai.engine can't break rhai.ast.expr.
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.
22→37 rhai.engine uses rhai.api.custom_syntaxpart of a loop✕
Connections
1 pair of types, where a type in rhai.engine uses a type in rhai.api.custom_syntax.
rhai.engine uses rhai.api.custom_syntax, so a change to rhai.api.custom_syntax can break rhai.engine, while a change to rhai.engine can't break rhai.api.custom_syntax.
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.
rhai.module.resolvers uses rhai.types.position, so a change to rhai.types.position can break rhai.module.resolvers, while a change to rhai.module.resolvers can't break rhai.types.position.
Position
Below the diagonal: rhai.module.resolvers uses a module listed above it, which is the healthy direction.
rhai.module.resolvers uses rhai.types.scope, so a change to rhai.types.scope can break rhai.module.resolvers, while a change to rhai.module.resolvers can't break rhai.types.scope.
Position
Below the diagonal: rhai.module.resolvers uses a module listed above it, which is the healthy direction.
rhai.module.resolvers uses rhai.eval.global_state, so a change to rhai.eval.global_state can break rhai.module.resolvers, while a change to rhai.module.resolvers can't break rhai.eval.global_state.
Position
Below the diagonal: rhai.module.resolvers uses a module listed above it, which is the healthy direction.
rhai.module.resolvers uses rhai.func.native, so a change to rhai.func.native can break rhai.module.resolvers, while a change to rhai.module.resolvers can't break rhai.func.native.
Position
Below the diagonal: rhai.module.resolvers uses a module listed above it, which is the healthy direction.
rhai.module.resolvers uses rhai.engine, so a change to rhai.engine can break rhai.module.resolvers, while a change to rhai.module.resolvers can't break rhai.engine.
Position
Below the diagonal: rhai.module.resolvers uses a module listed above it, which is the healthy direction.
rhai.types.fn_ptr uses rhai.types.immutable_string, so a change to rhai.types.immutable_string can break rhai.types.fn_ptr, while a change to rhai.types.fn_ptr can't break rhai.types.immutable_string.
Position
Below the diagonal: rhai.types.fn_ptr uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in rhai.types.fn_ptr uses a type in rhai.types.scope.
The types involved
rhai.types.fn_ptr.FnPtr → rhai.types.scope.Scope
Direction
rhai.types.fn_ptr uses rhai.types.scope, so a change to rhai.types.scope can break rhai.types.fn_ptr, while a change to rhai.types.fn_ptr can't break rhai.types.scope.
Position
Below the diagonal: rhai.types.fn_ptr uses a module listed above it, which is the healthy direction.
rhai.types.fn_ptr uses rhai.eval.global_state, so a change to rhai.eval.global_state can break rhai.types.fn_ptr, while a change to rhai.types.fn_ptr can't break rhai.eval.global_state.
Position
Below the diagonal: rhai.types.fn_ptr uses a module listed above it, which is the healthy direction.
rhai.types.fn_ptr uses rhai.func.native, so a change to rhai.func.native can break rhai.types.fn_ptr, while a change to rhai.types.fn_ptr can't break rhai.func.native.
Position
Below the diagonal: rhai.types.fn_ptr uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in rhai.types.fn_ptr uses a type in rhai.engine.
The types involved
rhai.types.fn_ptr.FnPtr → rhai.engine.Engine
Direction
rhai.types.fn_ptr uses rhai.engine, so a change to rhai.engine can break rhai.types.fn_ptr, while a change to rhai.types.fn_ptr can't break rhai.engine.
Position
Below the diagonal: rhai.types.fn_ptr uses a module listed above it, which is the healthy direction.
24→25 rhai.types.fn_ptr uses rhai.types.dynamicpart of a loop✕
Connections
1 pair of types, where a type in rhai.types.fn_ptr uses a type in rhai.types.dynamic.
rhai.types.fn_ptr uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.types.fn_ptr, while a change to rhai.types.fn_ptr can't break rhai.types.dynamic.
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→30 rhai.types.fn_ptr uses rhai.ast.astpart of a loop✕
Connections
1 pair of types, where a type in rhai.types.fn_ptr uses a type in rhai.ast.ast.
The types involved
rhai.types.fn_ptr.FnPtr → rhai.ast.ast.AST
Direction
rhai.types.fn_ptr uses rhai.ast.ast, so a change to rhai.ast.ast can break rhai.types.fn_ptr, while a change to rhai.types.fn_ptr can't break rhai.ast.ast.
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.
rhai.types.dynamic uses rhai.eval.target, so a change to rhai.eval.target can break rhai.types.dynamic, while a change to rhai.types.dynamic can't break rhai.eval.target.
Position
Below the diagonal: rhai.types.dynamic uses a module listed above it, which is the healthy direction.
rhai.types.dynamic uses rhai.types.fn_ptr, so a change to rhai.types.fn_ptr can break rhai.types.dynamic, while a change to rhai.types.dynamic can't break rhai.types.fn_ptr.
Position
Below the diagonal: rhai.types.dynamic uses a module listed above it, which is the healthy direction.
rhai.ast.stmt uses rhai.types.position, so a change to rhai.types.position can break rhai.ast.stmt, while a change to rhai.ast.stmt can't break rhai.types.position.
Position
Below the diagonal: rhai.ast.stmt uses a module listed above it, which is the healthy direction.
rhai.ast.stmt uses rhai.types.token, so a change to rhai.types.token can break rhai.ast.stmt, while a change to rhai.ast.stmt can't break rhai.types.token.
Position
Below the diagonal: rhai.ast.stmt uses a module listed above it, which is the healthy direction.
rhai.ast.stmt uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.ast.stmt, while a change to rhai.ast.stmt can't break rhai.types.dynamic.
Position
Below the diagonal: rhai.ast.stmt uses a module listed above it, which is the healthy direction.
26→30 rhai.ast.stmt uses rhai.ast.astpart of a loop✕
Connections
1 pair of types, where a type in rhai.ast.stmt uses a type in rhai.ast.ast.
The types involved
rhai.ast.stmt.Stmt → rhai.ast.ast.ASTNode
Direction
rhai.ast.stmt uses rhai.ast.ast, so a change to rhai.ast.ast can break rhai.ast.stmt, while a change to rhai.ast.stmt can't break rhai.ast.ast.
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.
26→32 rhai.ast.stmt uses rhai.ast.exprpart of a loop✕
Connections
1 pair of types, where a type in rhai.ast.stmt uses a type in rhai.ast.expr.
The types involved
rhai.ast.stmt.FlowControl → rhai.ast.expr.Expr
Direction
rhai.ast.stmt uses rhai.ast.expr, so a change to rhai.ast.expr can break rhai.ast.stmt, while a change to rhai.ast.stmt can't break rhai.ast.expr.
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.
rhai.eval.eval_context uses rhai.types.position, so a change to rhai.types.position can break rhai.eval.eval_context, while a change to rhai.eval.eval_context can't break rhai.types.position.
Position
Below the diagonal: rhai.eval.eval_context uses a module listed above it, which is the healthy direction.
rhai.eval.eval_context uses rhai.eval.target, so a change to rhai.eval.target can break rhai.eval.eval_context, while a change to rhai.eval.eval_context can't break rhai.eval.target.
Position
Below the diagonal: rhai.eval.eval_context uses a module listed above it, which is the healthy direction.
rhai.eval.eval_context uses rhai.types.immutable_string, so a change to rhai.types.immutable_string can break rhai.eval.eval_context, while a change to rhai.eval.eval_context can't break rhai.types.immutable_string.
Position
Below the diagonal: rhai.eval.eval_context uses a module listed above it, which is the healthy direction.
rhai.eval.eval_context uses rhai.eval.cache, so a change to rhai.eval.cache can break rhai.eval.eval_context, while a change to rhai.eval.eval_context can't break rhai.eval.cache.
Position
Below the diagonal: rhai.eval.eval_context uses a module listed above it, which is the healthy direction.
rhai.eval.eval_context uses rhai.eval.debugger, so a change to rhai.eval.debugger can break rhai.eval.eval_context, while a change to rhai.eval.eval_context can't break rhai.eval.debugger.
Position
Below the diagonal: rhai.eval.eval_context uses a module listed above it, which is the healthy direction.
rhai.eval.eval_context uses rhai.types.scope, so a change to rhai.types.scope can break rhai.eval.eval_context, while a change to rhai.eval.eval_context can't break rhai.types.scope.
Position
Below the diagonal: rhai.eval.eval_context uses a module listed above it, which is the healthy direction.
rhai.eval.eval_context uses rhai.eval.global_state, so a change to rhai.eval.global_state can break rhai.eval.eval_context, while a change to rhai.eval.eval_context can't break rhai.eval.global_state.
Position
Below the diagonal: rhai.eval.eval_context uses a module listed above it, which is the healthy direction.
rhai.eval.eval_context uses rhai.engine, so a change to rhai.engine can break rhai.eval.eval_context, while a change to rhai.eval.eval_context can't break rhai.engine.
Position
Below the diagonal: rhai.eval.eval_context uses a module listed above it, which is the healthy direction.
rhai.eval.eval_context uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.eval.eval_context, while a change to rhai.eval.eval_context can't break rhai.types.dynamic.
Position
Below the diagonal: rhai.eval.eval_context uses a module listed above it, which is the healthy direction.
27→37 rhai.eval.eval_context uses rhai.api.custom_syntaxpart of a loop✕
Connections
1 pair of types, where a type in rhai.eval.eval_context uses a type in rhai.api.custom_syntax.
rhai.eval.eval_context uses rhai.api.custom_syntax, so a change to rhai.api.custom_syntax can break rhai.eval.eval_context, while a change to rhai.eval.eval_context can't break rhai.api.custom_syntax.
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.
rhai.grain.bytecode.switch uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.grain.bytecode.switch, while a change to rhai.grain.bytecode.switch can't break rhai.types.dynamic.
Position
Below the diagonal: rhai.grain.bytecode.switch uses a module listed above it, which is the healthy direction.
28→36 rhai.grain.bytecode.switch uses rhai.grain.programpart of a loop✕
Connections
1 pair of types, where a type in rhai.grain.bytecode.switch uses a type in rhai.grain.program.
rhai.grain.bytecode.switch uses rhai.grain.program, so a change to rhai.grain.program can break rhai.grain.bytecode.switch, while a change to rhai.grain.bytecode.switch can't break rhai.grain.program.
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.
rhai.packages.string_basic uses rhai.types.position, so a change to rhai.types.position can break rhai.packages.string_basic, while a change to rhai.packages.string_basic can't break rhai.types.position.
Position
Below the diagonal: rhai.packages.string_basic uses a module listed above it, which is the healthy direction.
rhai.packages.string_basic uses rhai.types.immutable_string, so a change to rhai.types.immutable_string can break rhai.packages.string_basic, while a change to rhai.packages.string_basic can't break rhai.types.immutable_string.
Position
Below the diagonal: rhai.packages.string_basic uses a module listed above it, which is the healthy direction.
rhai.packages.string_basic uses rhai.eval.cache, so a change to rhai.eval.cache can break rhai.packages.string_basic, while a change to rhai.packages.string_basic can't break rhai.eval.cache.
Position
Below the diagonal: rhai.packages.string_basic uses a module listed above it, which is the healthy direction.
rhai.packages.string_basic uses rhai.eval.global_state, so a change to rhai.eval.global_state can break rhai.packages.string_basic, while a change to rhai.packages.string_basic can't break rhai.eval.global_state.
Position
Below the diagonal: rhai.packages.string_basic uses a module listed above it, which is the healthy direction.
rhai.packages.string_basic uses rhai.func.native, so a change to rhai.func.native can break rhai.packages.string_basic, while a change to rhai.packages.string_basic can't break rhai.func.native.
Position
Below the diagonal: rhai.packages.string_basic uses a module listed above it, which is the healthy direction.
rhai.packages.string_basic uses rhai.engine, so a change to rhai.engine can break rhai.packages.string_basic, while a change to rhai.packages.string_basic can't break rhai.engine.
Position
Below the diagonal: rhai.packages.string_basic uses a module listed above it, which is the healthy direction.
rhai.packages.string_basic uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.packages.string_basic, while a change to rhai.packages.string_basic can't break rhai.types.dynamic.
Position
Below the diagonal: rhai.packages.string_basic uses a module listed above it, which is the healthy direction.
rhai.ast.ast uses rhai.types.position, so a change to rhai.types.position can break rhai.ast.ast, while a change to rhai.ast.ast can't break rhai.types.position.
Position
Below the diagonal: rhai.ast.ast uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in rhai.ast.ast uses a type in rhai_codegen.module.
The types involved
rhai.ast.ast.AST → rhai_codegen.module.Module
Direction
rhai.ast.ast uses rhai_codegen.module, so a change to rhai_codegen.module can break rhai.ast.ast, while a change to rhai.ast.ast can't break rhai_codegen.module.
Position
Below the diagonal: rhai.ast.ast uses a module listed above it, which is the healthy direction.
rhai.ast.ast uses rhai.types.immutable_string, so a change to rhai.types.immutable_string can break rhai.ast.ast, while a change to rhai.ast.ast can't break rhai.types.immutable_string.
Position
Below the diagonal: rhai.ast.ast uses a module listed above it, which is the healthy direction.
rhai.grain.bytecode.verify uses rhai.grain.bytecode.chunk, so a change to rhai.grain.bytecode.chunk can break rhai.grain.bytecode.verify, while a change to rhai.grain.bytecode.verify can't break rhai.grain.bytecode.chunk.
Position
Below the diagonal: rhai.grain.bytecode.verify uses a module listed above it, which is the healthy direction.
rhai.grain.bytecode.verify uses rhai.grain.bytecode.chain, so a change to rhai.grain.bytecode.chain can break rhai.grain.bytecode.verify, while a change to rhai.grain.bytecode.verify can't break rhai.grain.bytecode.chain.
Position
Below the diagonal: rhai.grain.bytecode.verify uses a module listed above it, which is the healthy direction.
rhai.grain.bytecode.verify uses rhai.grain.bytecode.op, so a change to rhai.grain.bytecode.op can break rhai.grain.bytecode.verify, while a change to rhai.grain.bytecode.verify can't break rhai.grain.bytecode.op.
Position
Below the diagonal: rhai.grain.bytecode.verify uses a module listed above it, which is the healthy direction.
rhai.grain.bytecode.verify uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.grain.bytecode.verify, while a change to rhai.grain.bytecode.verify can't break rhai.types.dynamic.
Position
Below the diagonal: rhai.grain.bytecode.verify uses a module listed above it, which is the healthy direction.
rhai.grain.bytecode.verify uses rhai.grain.bytecode.switch, so a change to rhai.grain.bytecode.switch can break rhai.grain.bytecode.verify, while a change to rhai.grain.bytecode.verify can't break rhai.grain.bytecode.switch.
Position
Below the diagonal: rhai.grain.bytecode.verify uses a module listed above it, which is the healthy direction.
rhai.ast.expr uses rhai.types.position, so a change to rhai.types.position can break rhai.ast.expr, while a change to rhai.ast.expr can't break rhai.types.position.
Position
Below the diagonal: rhai.ast.expr uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in rhai.ast.expr uses a type in rhai.types.token.
The types involved
rhai.ast.expr.Expr → rhai.types.token.Token
rhai.ast.expr.FnCallExpr → rhai.types.token.Token
Direction
rhai.ast.expr uses rhai.types.token, so a change to rhai.types.token can break rhai.ast.expr, while a change to rhai.ast.expr can't break rhai.types.token.
Position
Below the diagonal: rhai.ast.expr uses a module listed above it, which is the healthy direction.
rhai.ast.expr uses rhai.types.immutable_string, so a change to rhai.types.immutable_string can break rhai.ast.expr, while a change to rhai.ast.expr can't break rhai.types.immutable_string.
Position
Below the diagonal: rhai.ast.expr uses a module listed above it, which is the healthy direction.
rhai.ast.expr uses rhai.eval.global_state, so a change to rhai.eval.global_state can break rhai.ast.expr, while a change to rhai.ast.expr can't break rhai.eval.global_state.
Position
Below the diagonal: rhai.ast.expr uses a module listed above it, which is the healthy direction.
rhai.ast.expr uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.ast.expr, while a change to rhai.ast.expr can't break rhai.types.dynamic.
Position
Below the diagonal: rhai.ast.expr uses a module listed above it, which is the healthy direction.
rhai.bin.rhai-dbg uses rhai.types.position, so a change to rhai.types.position can break rhai.bin.rhai-dbg, while a change to rhai.bin.rhai-dbg can't break rhai.types.position.
Position
Below the diagonal: rhai.bin.rhai-dbg uses a module listed above it, which is the healthy direction.
rhai.bin.rhai-dbg uses rhai.types.error, so a change to rhai.types.error can break rhai.bin.rhai-dbg, while a change to rhai.bin.rhai-dbg can't break rhai.types.error.
Position
Below the diagonal: rhai.bin.rhai-dbg uses a module listed above it, which is the healthy direction.
rhai.bin.rhai-dbg uses rhai.eval.debugger, so a change to rhai.eval.debugger can break rhai.bin.rhai-dbg, while a change to rhai.bin.rhai-dbg can't break rhai.eval.debugger.
Position
Below the diagonal: rhai.bin.rhai-dbg uses a module listed above it, which is the healthy direction.
rhai.bin.rhai-dbg uses rhai.engine, so a change to rhai.engine can break rhai.bin.rhai-dbg, while a change to rhai.bin.rhai-dbg can't break rhai.engine.
Position
Below the diagonal: rhai.bin.rhai-dbg uses a module listed above it, which is the healthy direction.
rhai.bin.rhai-dbg uses rhai.eval.eval_context, so a change to rhai.eval.eval_context can break rhai.bin.rhai-dbg, while a change to rhai.bin.rhai-dbg can't break rhai.eval.eval_context.
Position
Below the diagonal: rhai.bin.rhai-dbg uses a module listed above it, which is the healthy direction.
rhai.bin.rhai-dbg uses rhai.ast.ast, so a change to rhai.ast.ast can break rhai.bin.rhai-dbg, while a change to rhai.bin.rhai-dbg can't break rhai.ast.ast.
Position
Below the diagonal: rhai.bin.rhai-dbg uses a module listed above it, which is the healthy direction.
rhai.grain.format.read uses rhai.grain.bytecode.positions, so a change to rhai.grain.bytecode.positions can break rhai.grain.format.read, while a change to rhai.grain.format.read can't break rhai.grain.bytecode.positions.
Position
Below the diagonal: rhai.grain.format.read uses a module listed above it, which is the healthy direction.
rhai.grain.format.read uses rhai.grain.bytecode.verify, so a change to rhai.grain.bytecode.verify can break rhai.grain.format.read, while a change to rhai.grain.format.read can't break rhai.grain.bytecode.verify.
Position
Below the diagonal: rhai.grain.format.read uses a module listed above it, which is the healthy direction.
rhai.module uses rhai.func.function, so a change to rhai.func.function can break rhai.module, while a change to rhai.module can't break rhai.func.function.
Position
Below the diagonal: rhai.module uses a module listed above it, which is the healthy direction.
rhai.module uses rhai_codegen.module, so a change to rhai_codegen.module can break rhai.module, while a change to rhai.module can't break rhai_codegen.module.
Position
Below the diagonal: rhai.module uses a module listed above it, which is the healthy direction.
rhai.module uses rhai.types.immutable_string, so a change to rhai.types.immutable_string can break rhai.module, while a change to rhai.module can't break rhai.types.immutable_string.
Position
Below the diagonal: rhai.module uses a module listed above it, which is the healthy direction.
rhai.module uses rhai.api.definitions, so a change to rhai.api.definitions can break rhai.module, while a change to rhai.module can't break rhai.api.definitions.
Position
Below the diagonal: rhai.module uses a module listed above it, which is the healthy direction.
rhai.module uses rhai.eval.global_state, so a change to rhai.eval.global_state can break rhai.module, while a change to rhai.module can't break rhai.eval.global_state.
Position
Below the diagonal: rhai.module uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in rhai.module uses a type in rhai.types.dynamic.
The types involved
rhai.module.Module → rhai.types.dynamic.Dynamic
Direction
rhai.module uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.module, while a change to rhai.module can't break rhai.types.dynamic.
Position
Below the diagonal: rhai.module uses a module listed above it, which is the healthy direction.
rhai.grain.program uses rhai.func.function, so a change to rhai.func.function can break rhai.grain.program, while a change to rhai.grain.program can't break rhai.func.function.
Position
Below the diagonal: rhai.grain.program uses a module listed above it, which is the healthy direction.
rhai.grain.program uses rhai.grain.bytecode.chunk, so a change to rhai.grain.bytecode.chunk can break rhai.grain.program, while a change to rhai.grain.program can't break rhai.grain.bytecode.chunk.
Position
Below the diagonal: rhai.grain.program uses a module listed above it, which is the healthy direction.
rhai.grain.program uses rhai.types.position, so a change to rhai.types.position can break rhai.grain.program, while a change to rhai.grain.program can't break rhai.types.position.
Position
Below the diagonal: rhai.grain.program uses a module listed above it, which is the healthy direction.
rhai.grain.program uses rhai.types.token, so a change to rhai.types.token can break rhai.grain.program, while a change to rhai.grain.program can't break rhai.types.token.
Position
Below the diagonal: rhai.grain.program uses a module listed above it, which is the healthy direction.
rhai.grain.program uses rhai.grain.bytecode.chain, so a change to rhai.grain.bytecode.chain can break rhai.grain.program, while a change to rhai.grain.program can't break rhai.grain.bytecode.chain.
Position
Below the diagonal: rhai.grain.program uses a module listed above it, which is the healthy direction.
rhai.grain.program uses rhai.grain.bytecode.op, so a change to rhai.grain.bytecode.op can break rhai.grain.program, while a change to rhai.grain.program can't break rhai.grain.bytecode.op.
Position
Below the diagonal: rhai.grain.program uses a module listed above it, which is the healthy direction.
rhai.grain.program uses rhai.grain.bytecode.positions, so a change to rhai.grain.bytecode.positions can break rhai.grain.program, while a change to rhai.grain.program can't break rhai.grain.bytecode.positions.
Position
Below the diagonal: rhai.grain.program uses a module listed above it, which is the healthy direction.
rhai.grain.program uses rhai.types.immutable_string, so a change to rhai.types.immutable_string can break rhai.grain.program, while a change to rhai.grain.program can't break rhai.types.immutable_string.
Position
Below the diagonal: rhai.grain.program uses a module listed above it, which is the healthy direction.
rhai.grain.program uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.grain.program, while a change to rhai.grain.program can't break rhai.types.dynamic.
Position
Below the diagonal: rhai.grain.program uses a module listed above it, which is the healthy direction.
rhai.grain.program uses rhai.grain.bytecode.switch, so a change to rhai.grain.bytecode.switch can break rhai.grain.program, while a change to rhai.grain.program can't break rhai.grain.bytecode.switch.
Position
Below the diagonal: rhai.grain.program uses a module listed above it, which is the healthy direction.
rhai.grain.program uses rhai.ast.ast, so a change to rhai.ast.ast can break rhai.grain.program, while a change to rhai.grain.program can't break rhai.ast.ast.
Position
Below the diagonal: rhai.grain.program uses a module listed above it, which is the healthy direction.
rhai.grain.program uses rhai.grain.bytecode.verify, so a change to rhai.grain.bytecode.verify can break rhai.grain.program, while a change to rhai.grain.program can't break rhai.grain.bytecode.verify.
Position
Below the diagonal: rhai.grain.program uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in rhai.grain.program uses a type in rhai.ast.expr.
The types involved
rhai.grain.program.Parts → rhai.ast.expr.Expr
rhai.grain.program.Program → rhai.ast.expr.Expr
Direction
rhai.grain.program uses rhai.ast.expr, so a change to rhai.ast.expr can break rhai.grain.program, while a change to rhai.grain.program can't break rhai.ast.expr.
Position
Below the diagonal: rhai.grain.program uses a module listed above it, which is the healthy direction.
rhai.api.custom_syntax uses rhai.grain.bytecode.chunk, so a change to rhai.grain.bytecode.chunk can break rhai.api.custom_syntax, while a change to rhai.api.custom_syntax can't break rhai.grain.bytecode.chunk.
Position
Below the diagonal: rhai.api.custom_syntax uses a module listed above it, which is the healthy direction.
rhai.api.custom_syntax uses rhai.types.position, so a change to rhai.types.position can break rhai.api.custom_syntax, while a change to rhai.api.custom_syntax can't break rhai.types.position.
Position
Below the diagonal: rhai.api.custom_syntax uses a module listed above it, which is the healthy direction.
rhai.api.custom_syntax uses rhai.eval.target, so a change to rhai.eval.target can break rhai.api.custom_syntax, while a change to rhai.api.custom_syntax can't break rhai.eval.target.
Position
Below the diagonal: rhai.api.custom_syntax uses a module listed above it, which is the healthy direction.
rhai.api.custom_syntax uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.api.custom_syntax, while a change to rhai.api.custom_syntax can't break rhai.types.dynamic.
Position
Below the diagonal: rhai.api.custom_syntax uses a module listed above it, which is the healthy direction.
rhai.api.custom_syntax uses rhai.eval.eval_context, so a change to rhai.eval.eval_context can break rhai.api.custom_syntax, while a change to rhai.api.custom_syntax can't break rhai.eval.eval_context.
Position
Below the diagonal: rhai.api.custom_syntax uses a module listed above it, which is the healthy direction.
rhai.api.custom_syntax uses rhai.ast.expr, so a change to rhai.ast.expr can break rhai.api.custom_syntax, while a change to rhai.api.custom_syntax can't break rhai.ast.expr.
Position
Below the diagonal: rhai.api.custom_syntax uses a module listed above it, which is the healthy direction.
rhai.api.custom_syntax uses rhai.grain.program, so a change to rhai.grain.program can break rhai.api.custom_syntax, while a change to rhai.api.custom_syntax can't break rhai.grain.program.
Position
Below the diagonal: rhai.api.custom_syntax uses a module listed above it, which is the healthy direction.
rhai.grain.compile uses rhai.func.function, so a change to rhai.func.function can break rhai.grain.compile, while a change to rhai.grain.compile can't break rhai.func.function.
Position
Below the diagonal: rhai.grain.compile uses a module listed above it, which is the healthy direction.
rhai.grain.compile uses rhai.types.position, so a change to rhai.types.position can break rhai.grain.compile, while a change to rhai.grain.compile can't break rhai.types.position.
Position
Below the diagonal: rhai.grain.compile uses a module listed above it, which is the healthy direction.
rhai.grain.compile uses rhai.types.token, so a change to rhai.types.token can break rhai.grain.compile, while a change to rhai.grain.compile can't break rhai.types.token.
Position
Below the diagonal: rhai.grain.compile uses a module listed above it, which is the healthy direction.
rhai.grain.compile uses rhai.grain.bytecode.chain, so a change to rhai.grain.bytecode.chain can break rhai.grain.compile, while a change to rhai.grain.compile can't break rhai.grain.bytecode.chain.
Position
Below the diagonal: rhai.grain.compile uses a module listed above it, which is the healthy direction.
rhai.grain.compile uses rhai.grain.bytecode.op, so a change to rhai.grain.bytecode.op can break rhai.grain.compile, while a change to rhai.grain.compile can't break rhai.grain.bytecode.op.
Position
Below the diagonal: rhai.grain.compile uses a module listed above it, which is the healthy direction.
rhai.grain.compile uses rhai.types.immutable_string, so a change to rhai.types.immutable_string can break rhai.grain.compile, while a change to rhai.grain.compile can't break rhai.types.immutable_string.
Position
Below the diagonal: rhai.grain.compile uses a module listed above it, which is the healthy direction.
rhai.grain.compile uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.grain.compile, while a change to rhai.grain.compile can't break rhai.types.dynamic.
Position
Below the diagonal: rhai.grain.compile uses a module listed above it, which is the healthy direction.
rhai.grain.compile uses rhai.ast.stmt, so a change to rhai.ast.stmt can break rhai.grain.compile, while a change to rhai.grain.compile can't break rhai.ast.stmt.
Position
Below the diagonal: rhai.grain.compile uses a module listed above it, which is the healthy direction.
rhai.grain.compile uses rhai.grain.bytecode.switch, so a change to rhai.grain.bytecode.switch can break rhai.grain.compile, while a change to rhai.grain.compile can't break rhai.grain.bytecode.switch.
Position
Below the diagonal: rhai.grain.compile uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in rhai.grain.compile uses a type in rhai.ast.ast.
The types involved
rhai.grain.compile.Compiler → rhai.ast.ast.AST
rhai.grain.compile.Lowering → rhai.ast.ast.AST
Direction
rhai.grain.compile uses rhai.ast.ast, so a change to rhai.ast.ast can break rhai.grain.compile, while a change to rhai.grain.compile can't break rhai.ast.ast.
Position
Below the diagonal: rhai.grain.compile uses a module listed above it, which is the healthy direction.
rhai.grain.compile uses rhai.ast.expr, so a change to rhai.ast.expr can break rhai.grain.compile, while a change to rhai.grain.compile can't break rhai.ast.expr.
Position
Below the diagonal: rhai.grain.compile uses a module listed above it, which is the healthy direction.
rhai.grain.compile uses rhai.grain.program, so a change to rhai.grain.program can break rhai.grain.compile, while a change to rhai.grain.compile can't break rhai.grain.program.
Position
Below the diagonal: rhai.grain.compile uses a module listed above it, which is the healthy direction.
rhai.grain.format.write uses rhai.grain.bytecode.chunk, so a change to rhai.grain.bytecode.chunk can break rhai.grain.format.write, while a change to rhai.grain.format.write can't break rhai.grain.bytecode.chunk.
Position
Below the diagonal: rhai.grain.format.write uses a module listed above it, which is the healthy direction.
rhai.grain.format.write uses rhai.types.position, so a change to rhai.types.position can break rhai.grain.format.write, while a change to rhai.grain.format.write can't break rhai.types.position.
Position
Below the diagonal: rhai.grain.format.write uses a module listed above it, which is the healthy direction.
rhai.grain.format.write uses rhai.types.token, so a change to rhai.types.token can break rhai.grain.format.write, while a change to rhai.grain.format.write can't break rhai.types.token.
Position
Below the diagonal: rhai.grain.format.write uses a module listed above it, which is the healthy direction.
rhai.grain.format.write uses rhai.grain.bytecode.chain, so a change to rhai.grain.bytecode.chain can break rhai.grain.format.write, while a change to rhai.grain.format.write can't break rhai.grain.bytecode.chain.
Position
Below the diagonal: rhai.grain.format.write uses a module listed above it, which is the healthy direction.
rhai.grain.format.write uses rhai.grain.bytecode.op, so a change to rhai.grain.bytecode.op can break rhai.grain.format.write, while a change to rhai.grain.format.write can't break rhai.grain.bytecode.op.
Position
Below the diagonal: rhai.grain.format.write uses a module listed above it, which is the healthy direction.
rhai.grain.format.write uses rhai.grain.bytecode.positions, so a change to rhai.grain.bytecode.positions can break rhai.grain.format.write, while a change to rhai.grain.format.write can't break rhai.grain.bytecode.positions.
Position
Below the diagonal: rhai.grain.format.write uses a module listed above it, which is the healthy direction.
rhai.grain.format.write uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.grain.format.write, while a change to rhai.grain.format.write can't break rhai.types.dynamic.
Position
Below the diagonal: rhai.grain.format.write uses a module listed above it, which is the healthy direction.
rhai.grain.format.write uses rhai.grain.program, so a change to rhai.grain.program can break rhai.grain.format.write, while a change to rhai.grain.format.write can't break rhai.grain.program.
Position
Below the diagonal: rhai.grain.format.write uses a module listed above it, which is the healthy direction.
rhai.grain.vm uses rhai.grain.bytecode.chunk, so a change to rhai.grain.bytecode.chunk can break rhai.grain.vm, while a change to rhai.grain.vm can't break rhai.grain.bytecode.chunk.
Position
Below the diagonal: rhai.grain.vm uses a module listed above it, which is the healthy direction.
rhai.grain.vm uses rhai.types.position, so a change to rhai.types.position can break rhai.grain.vm, while a change to rhai.grain.vm can't break rhai.types.position.
Position
Below the diagonal: rhai.grain.vm uses a module listed above it, which is the healthy direction.
rhai.grain.vm uses rhai.grain.bytecode.chain, so a change to rhai.grain.bytecode.chain can break rhai.grain.vm, while a change to rhai.grain.vm can't break rhai.grain.bytecode.chain.
Position
Below the diagonal: rhai.grain.vm uses a module listed above it, which is the healthy direction.
rhai.grain.vm uses rhai.grain.bytecode.op, so a change to rhai.grain.bytecode.op can break rhai.grain.vm, while a change to rhai.grain.vm can't break rhai.grain.bytecode.op.
Position
Below the diagonal: rhai.grain.vm uses a module listed above it, which is the healthy direction.
rhai.grain.vm uses rhai.types.error, so a change to rhai.types.error can break rhai.grain.vm, while a change to rhai.grain.vm can't break rhai.types.error.
Position
Below the diagonal: rhai.grain.vm uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in rhai.grain.vm uses a type in rhai.eval.cache.
The types involved
rhai.grain.vm.Vm → rhai.eval.cache.Caches
rhai.grain.vm.vm$module → rhai.eval.cache.Caches
Direction
rhai.grain.vm uses rhai.eval.cache, so a change to rhai.eval.cache can break rhai.grain.vm, while a change to rhai.grain.vm can't break rhai.eval.cache.
Position
Below the diagonal: rhai.grain.vm uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in rhai.grain.vm uses a type in rhai.types.scope.
The types involved
rhai.grain.vm.Vm → rhai.types.scope.Scope
rhai.grain.vm.vm$module → rhai.types.scope.Scope
Direction
rhai.grain.vm uses rhai.types.scope, so a change to rhai.types.scope can break rhai.grain.vm, while a change to rhai.grain.vm can't break rhai.types.scope.
Position
Below the diagonal: rhai.grain.vm uses a module listed above it, which is the healthy direction.
rhai.grain.vm uses rhai.eval.global_state, so a change to rhai.eval.global_state can break rhai.grain.vm, while a change to rhai.grain.vm can't break rhai.eval.global_state.
Position
Below the diagonal: rhai.grain.vm uses a module listed above it, which is the healthy direction.
rhai.grain.vm uses rhai.types.dynamic, so a change to rhai.types.dynamic can break rhai.grain.vm, while a change to rhai.grain.vm can't break rhai.types.dynamic.
Position
Below the diagonal: rhai.grain.vm uses a module listed above it, which is the healthy direction.
rhai.grain.vm uses rhai.grain.program, so a change to rhai.grain.program can break rhai.grain.vm, while a change to rhai.grain.vm can't break rhai.grain.program.
Position
Below the diagonal: rhai.grain.vm uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 83% · 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
81
High / Critical
A03:2025 — Software Supply Chain Failures
9
Medium
Roadmap
Begin by establishing a formal process for recording significant design decisions in a dedicated ADR folder to ensure architectural clarity. Simultaneously, address the eighteen high-churn complexity hotspots in mod.rs, stmt.rs, and expr.rs to stabilize the core codebase. Finally, resolve the identified security vulnerabilities in REDACTED and REDACTED by pinning actions and packages to mitigate supply chain risks.
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.
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.
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 — 53
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 — 475
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 — 17
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 23
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 43 of 43 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.8 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 43 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, 533 of 545 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.rs) and this repository declares a Cargo test suite (repository root, 96 test files), but it was not re-run: the analyzer environment could not run it. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 26 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, and no committed Cargo.lock resolves them to versions, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (76 contributor(s) across 5034 commit(s) sampled, automation and bot accounts excluded). One of them holds 89% of the history; the other 75 hold 0.1% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check'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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check 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.
GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, 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.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and 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
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — 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.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
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").
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
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.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
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.
78 function(s) exceeded the cyclomatic complexity threshold of 15; the worst was rhai::func::builtin::get_builtin_binary_op_fn at 321. A further 7 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 Token::literal_syntax at 80 — they are counted neither in the figure above nor in this dimension's score. 4 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: src/types/token.rs (Token::literal_syntax at 80), src/types/parse_error.rs (ParseErrorType::fmt at 49), src/serde/de.rs (DynamicDeserializer::deserialize_any at 28), src/serde/serialize.rs (Dynamic::serialize at 22). 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.
+ 10 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with rhai::func::builtin::get_builtin_binary_op_fn (cyclomatic 321), rhai::tokenizer::get_next_token_inner (cyclomatic 152), Vm::run_frame (cyclomatic 145). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cyclomatic Complexity from 3.7 to about 5.1/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
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.
+ 9 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 4 bodies over 120 down to 120 or less in Cognitive Complexity — start with Vm::run_frame (cognitive 274), rhai::func::builtin::get_builtin_binary_op_fn (cognitive 231), Engine::eval_stmt (cognitive 206). — 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 4 together lifts Cognitive Complexity from 3.5 to about 4.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; 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.8 / 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.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 22 FileTooLong finding(s) in God Classes — start with mod.rs (3), stmt.rs (2), parser.rs. — One of this dimension's main actionable groups (22 warning-level).
Resolve the 17 MethodTooLong finding(s) in God Classes — start with mod.rs (5), call.rs (2), func_call.rs (2). — One of this dimension's main actionable groups (17 warning-level).
Resolve the 10 FunctionTooLong finding(s) in God Classes — start with optimizer.rs (3), builtin.rs (2), code.rs (2). — One of this dimension's main actionable groups (10 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.
166 duplicated block group(s) detected. A further 9 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 9 of the 175 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 55 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 14 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with array_basic.rs (4), mod.rs (2), builtin.rs (2). — One of this dimension's main actionable groups (14 warning-level).
Resolve the 12 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with parser.rs (3), func_call.rs (2), rhai-dbg.rs (2). — One of this dimension's main actionable groups (12 warning-level).
Resolve the 11 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with mod.rs (3), ser.rs (2), builtin.rs. — One of this dimension's main actionable groups (11 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 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
2 production modules (Cargo), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence, with abstractness counted on 1 of the 2 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with ser.rs, immutable_string.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.
683 test methods: 201 unit, 482 integration, 0 BDD, 0 e2e. The Rust suite contributes 683 `#[test]` function(s) across 96 file(s) declaring at least one; its unit/integration split is Cargo's own — 78 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.
Inverted test pyramid
✓ On the Gold path — maintain.
Detailed fixes: d9_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 100 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository commits no Cargo.lock, so its graph was resolved here: its manifests' `[dependencies]` and `[build-dependencies]` closed over the crates.io index, each crate at the newest release its requirement admits (what a fresh `cargo generate-lockfile` picks, not a graph the repository has pinned). Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. 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 18 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (2), stmt.rs (2), expr.rs (2). — One of this dimension's main actionable groups (18 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
18 deducted task-comment markers across 75830 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.
XxxComment · ×11src/parser.rs:2063
TodoComment · ×7tests/unary_after_binary.rs:4
What to do
Resolve the 11 XxxComment finding(s) in Explicit Debt — start with chaining.rs (7), parser.rs (3), expr.rs. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 7 TodoComment finding(s) in Explicit Debt — start with native.rs (2), custom_type.rs (2), unary_after_binary.rs. — One of this dimension's main actionable groups (7 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
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. 8 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: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
1 of 2 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: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
81 finding(s): 0 critical, 53 high, 28 medium, 0 low. 50 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 4 file(s) — `codegen/src/rhai_module.rs` (line 70), `src/packages/lang_core.rs` (line 212), `src/parser.rs` (line 365), `src/tokenizer.rs` (line 391, line 517, line 754, …) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 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 50 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 (50 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
2 of 120 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is fuzz/fuzz_targets/scripting.rs. Counted over 120 of the 210 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 Change coupling finding(s) in Change Coupling — start with verify.rs. — One of this dimension's main actionable groups (1 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.
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
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.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · 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.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 1 of 3 project(s) that lack one — worth up to 0.7 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.
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 model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability5.5 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `codegen`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
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
Enable Dependabot/Renovate or a dependency-review gate.
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.
Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · 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 — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 73 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
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
AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
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 — ~22217 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
D12 Dependency Hygiene — Not scored — 26 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, and no committed Cargo.lock resolves them to versions, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — Naming consistency is measured on C# 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+ projects each declaring an entity of their own. 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# and Visual Basic 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.
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Cargo manifest — not scanned yet).
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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.
D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Cargo manifest — not scanned yet).
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (20 value object(s))
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
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
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
M4 Documentation accuracy — Not applicable: the 8 current-state document(s) make no claim of a kind M4 checks.
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
PF2 Allocation hygiene — Not applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb.
PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — No web surface: 143 Rust file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation and obsolete TLS versions, and none was found. 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. If this codebase starts serving HTTP, the dimension reactivates automatically.
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.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Engine::eval_stmt (cyclomatic 111) src/eval/stmt.rs:193— Engine::eval_stmt has cyclomatic complexity 111 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Engine::parse_primary (cyclomatic 60) src/parser.rs:1334— Engine::parse_primary has cyclomatic complexity 60 (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.
Engine::eval_dot_index_chain_raw (cyclomatic 48) src/eval/chaining.rs:224— Engine::eval_dot_index_chain_raw has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Engine::get_indexed_mut (cyclomatic 47) src/eval/indexing.rs:37— Engine::get_indexed_mut 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.
Engine::parse_stmt (cyclomatic 43) src/parser.rs:3275— Engine::parse_stmt has cyclomatic complexity 43 (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.
Engine::parse_custom_syntax (cyclomatic 42) src/parser.rs:2475— Engine::parse_custom_syntax has cyclomatic complexity 42 (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.
Engine::exec_native_fn_call (cyclomatic 33) src/func/func_call.rs:576— Engine::exec_native_fn_call 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.
Engine::make_function_call (cyclomatic 32) src/func/call.rs:432— Engine::make_function_call has cyclomatic complexity 32 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Engine::parse_switch (cyclomatic 32) src/parser.rs:1123— Engine::parse_switch 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.
Engine::parse_binary_op (cyclomatic 32) src/parser.rs:2260— Engine::parse_binary_op 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.
Engine::eval_expr (cyclomatic 30) src/eval/expr.rs:205— Engine::eval_expr 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.
Engine::make_method_call (cyclomatic 29) src/func/call.rs:61— Engine::make_method_call 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.
Engine::parse_postfix (cyclomatic 29) src/parser.rs:1675— Engine::parse_postfix 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.
Engine::parse_fn (cyclomatic 25) src/parser.rs:3604— Engine::parse_fn 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.
Engine::register_custom_syntax (cyclomatic 24) src/api/custom_syntax.rs:401— Engine::register_custom_syntax 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.
Engine::call_script_fn (cyclomatic 24) src/func/script.rs:284— Engine::call_script_fn 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.
Engine::parse_fn_call (cyclomatic 21) src/parser.rs:612— Engine::parse_fn_call 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.
Engine::parse_index_chain (cyclomatic 21) src/parser.rs:792— Engine::parse_index_chain has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to one function item inside it that branches (check_argument_types). 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.
Engine::make_dot_expr (cyclomatic 21) src/parser.rs:2106— Engine::make_dot_expr 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.
Engine::parse_map_literal (cyclomatic 20) src/parser.rs:1004— Engine::parse_map_literal 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.
Engine::make_assignment_stmt (cyclomatic 20) src/parser.rs:1995— Engine::make_assignment_stmt has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to one function item inside it that branches. 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.
Engine::exec_fn_call (cyclomatic 19) src/func/func_call.rs:837— Engine::exec_fn_call 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.
Engine::eval_fn_call_expr (cyclomatic 16) src/func/call.rs:923— Engine::eval_fn_call_expr has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Engine::resolve_fn (cyclomatic 16) src/func/func_call.rs:401— Engine::resolve_fn has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Engine::exec_qualified_fn_call_raw (cyclomatic 16) src/func/func_call.rs:1011— Engine::exec_qualified_fn_call_raw has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Engine::eval_stmt (cognitive 206) src/eval/stmt.rs:193— Engine::eval_stmt has cognitive complexity 206 (threshold 15). Drivers by points: if/else 50 (118 pts), match/switch 20 (55 pts), loops 9 (25 pts), boolean chains 8 (nesting depth added 119). 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.
Engine::eval_dot_index_chain_raw (cognitive 99) src/eval/chaining.rs:224— Engine::eval_dot_index_chain_raw has cognitive complexity 99 (threshold 15). Drivers by points: if/else 21 (52 pts), match/switch 18 (45 pts), boolean chains 2 (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Engine::get_indexed_mut (cognitive 91) src/eval/indexing.rs:37— Engine::get_indexed_mut has cognitive complexity 91 (threshold 15). Drivers by points: if/else 38 (77 pts), boolean chains 9, match/switch 3 (5 pts) (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.
Engine::parse_primary (cognitive 61) src/parser.rs:1334— Engine::parse_primary has cognitive complexity 61 (threshold 15). Drivers by points: match/switch 14 (32 pts), if/else 9 (22 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 32). 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.
Engine::parse_switch (cognitive 60) src/parser.rs:1123— Engine::parse_switch has cognitive complexity 60 (threshold 15). Drivers by points: if/else 14 (37 pts), match/switch 6 (16 pts), loops 3 (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.
Engine::make_method_call (cognitive 59) src/func/call.rs:61— Engine::make_method_call has cognitive complexity 59 (threshold 15). Drivers by points: if/else 15 (44 pts), match/switch 5 (12 pts), boolean chains 3 (nesting depth added 36). 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.
Engine::parse_binary_op (cognitive 58) src/parser.rs:2260— Engine::parse_binary_op has cognitive complexity 58 (threshold 15). Drivers by points: if/else 23 (45 pts), match/switch 4 (8 pts), boolean chains 4, 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.
Engine::exec_native_fn_call (cognitive 55) src/func/func_call.rs:576— Engine::exec_native_fn_call has cognitive complexity 55 (threshold 15). Drivers by points: if/else 18 (33 pts), match/switch 7 (18 pts), boolean chains 4 (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.
Engine::parse_custom_syntax (cognitive 50) src/parser.rs:2475— Engine::parse_custom_syntax has cognitive complexity 50 (threshold 15). Drivers by points: match/switch 13 (37 pts), if/else 4 (8 pts), boolean chains 4, loops 1 (nesting depth added 28). 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.
Engine::parse_stmt (cognitive 49) src/parser.rs:3275— Engine::parse_stmt has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (31 pts), match/switch 8 (15 pts), boolean chains 2, loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Engine::exec_fn_call (cognitive 45) src/func/func_call.rs:837— Engine::exec_fn_call has cognitive complexity 45 (threshold 15). Drivers by points: if/else 14 (30 pts), match/switch 4 (13 pts), boolean chains 2 (nesting depth added 25). 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.
Engine::make_function_call (cognitive 43) src/func/call.rs:432— Engine::make_function_call has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 7 (16 pts), match/switch 4 (6 pts), boolean chains 5 (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.
Engine::resolve_fn (cognitive 38) src/func/func_call.rs:401— Engine::resolve_fn has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (27 pts), match/switch 2 (5 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 21). 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.
Engine::eval_expr (cognitive 36) src/eval/expr.rs:205— Engine::eval_expr has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 6 (12 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.
Engine::eval_fn_call_expr (cognitive 36) src/func/call.rs:923— Engine::eval_fn_call_expr has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (33 pts), boolean chains 3 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Engine::parse_fn_call (cognitive 34) src/parser.rs:612— Engine::parse_fn_call has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 3 (5 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.
Engine::call_script_fn (cognitive 33) src/func/script.rs:284— Engine::call_script_fn has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (20 pts), match/switch 6 (12 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Engine::parse_postfix (cognitive 30) src/parser.rs:1675— Engine::parse_postfix has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 8 (18 pts), if/else 5 (9 pts), boolean chains 2, loops 1 (nesting depth added 14). 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.
Engine::register_custom_syntax (cognitive 22) src/api/custom_syntax.rs:401— Engine::register_custom_syntax has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (9 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Engine::make_dot_expr (cognitive 21) src/parser.rs:2106— Engine::make_dot_expr has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Engine::parse_let (cognitive 21) src/parser.rs:2945— Engine::parse_let has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, match/switch 4 (8 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Engine::exec_qualified_fn_call_raw (cognitive 20) src/func/func_call.rs:1011— Engine::exec_qualified_fn_call_raw has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 1 (2 pts), 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.
Engine::parse_fn (cognitive 20) src/parser.rs:3604— Engine::parse_fn has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 8 (13 pts), if/else 2 (5 pts), loops 1 (2 pts) (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.
Engine::search_namespace (cognitive 19) src/eval/expr.rs:135— Engine::search_namespace has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (15 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 12). 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.
Engine::parse_anon_fn (cognitive 18) src/parser.rs:3826— Engine::parse_anon_fn has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (7 pts), match/switch 2 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rhai::func::builtin::get_builtin_binary_op_fn (cognitive 231) src/func/builtin.rs:87— rhai::func::builtin::get_builtin_binary_op_fn has cognitive complexity 231 (threshold 15). Drivers by points: if/else 82 (174 pts), match/switch 34 (50 pts), boolean chains 7 (nesting depth added 108). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rhai::tokenizer::get_next_token_inner (cognitive 168) src/tokenizer.rs:858— rhai::tokenizer::get_next_token_inner has cognitive complexity 168 (threshold 15). Drivers by points: if/else 37 (106 pts), match/switch 15 (50 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 108). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rhai::optimizer::optimize_stmt (cognitive 119) src/optimizer.rs:398— rhai::optimizer::optimize_stmt has cognitive complexity 119 (threshold 15). Drivers by points: if/else 32 (74 pts), match/switch 14 (27 pts), loops 3 (10 pts), boolean chains 8 (nesting depth added 62). Of this number, 117 points are the body's own statements and 2 belong to one function item inside it that branches. 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.
rhai::optimizer::optimize_expr (cognitive 118) src/optimizer.rs:934— rhai::optimizer::optimize_expr has cognitive complexity 118 (threshold 15). Drivers by points: if/else 26 (62 pts), match/switch 12 (28 pts), boolean chains 20, loops 4 (8 pts) (nesting depth added 56). 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.
rhai::bin::rhai-dbg::debug_callback (cognitive 98) src/bin/rhai-dbg.rs:230— rhai::bin::rhai-dbg::debug_callback has cognitive complexity 98 (threshold 15). Drivers by points: if/else 23 (62 pts), match/switch 8 (25 pts), loops 3 (9 pts), boolean chains 2 (nesting depth added 62). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rhai::bin::rhai-repl::main (cognitive 86) src/bin/rhai-repl.rs:292— rhai::bin::rhai-repl::main has cognitive complexity 86 (threshold 15). Drivers by points: if/else 16 (46 pts), match/switch 7 (21 pts), loops 6 (18 pts), boolean chains 1 (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rhai::api::formatting::map_std_type_name (cognitive 76) src/api/formatting.rs:15— rhai::api::formatting::map_std_type_name has cognitive complexity 76 (threshold 15). Drivers by points: if/else 50 (66 pts), boolean chains 9, match/switch 1 (nesting depth added 16). 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.
rhai::optimizer::optimize_stmt_block (cognitive 70) src/optimizer.rs:152— rhai::optimizer::optimize_stmt_block has cognitive complexity 70 (threshold 15). Drivers by points: if/else 17 (34 pts), match/switch 5 (15 pts), boolean chains 11, loops 5 (10 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.
rhai::tokenizer::parse_string_literal (cognitive 55) src/tokenizer.rs:516— rhai::tokenizer::parse_string_literal has cognitive complexity 55 (threshold 15). Drivers by points: if/else 15 (34 pts), match/switch 4 (10 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rhai::grain::bytecode::code::assemble (cognitive 47) src/grain/bytecode/code.rs:375— rhai::grain::bytecode::code::assemble has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (34 pts), match/switch 4 (11 pts), loops 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.
rhai::func::builtin::get_builtin_op_assignment_fn (cognitive 41) src/func/builtin.rs:699— rhai::func::builtin::get_builtin_op_assignment_fn has cognitive complexity 41 (threshold 15). Drivers by points: match/switch 16 (21 pts), if/else 9 (19 pts), boolean chains 1 (nesting depth added 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
rhai::grain::bytecode::verify::verify_chunk (cognitive 40) src/grain/bytecode/verify.rs:348— rhai::grain::bytecode::verify::verify_chunk has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 4 (9 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rhai::grain::format::write::put_constant (cognitive 24) src/grain/format/write.rs:380— rhai::grain::format::write::put_constant has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (16 pts), loops 3 (6 pts), match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
rhai::tokenizer::scan_block_comment (cognitive 21) src/tokenizer.rs:753— rhai::tokenizer::scan_block_comment has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rhai::grain::bytecode::verify::required_caps (cognitive 20) src/grain/bytecode/verify.rs:586— rhai::grain::bytecode::verify::required_caps has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 4 (9 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
rhai::grain::bytecode::verify::constant_caps (cognitive 19) src/grain/bytecode/verify.rs:150— rhai::grain::bytecode::verify::constant_caps has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
rhai::tokenizer::parse_raw_string_literal (cognitive 19) src/tokenizer.rs:390— rhai::tokenizer::parse_raw_string_literal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (4 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.
rhai::bin::rhai-dbg::print_source (cognitive 18) src/bin/rhai-dbg.rs:13— rhai::bin::rhai-dbg::print_source has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 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.
rhai::grain::format::read::read (cognitive 18) src/grain/format/read.rs:115— rhai::grain::format::read::read has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (8 pts), if/else 6, match/switch 2 (4 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rhai::packages::array_basic::array_functions::sort_with_builtin_desc (cognitive 18) src/packages/array_basic.rs:1734— rhai::packages::array_basic::array_functions::sort_with_builtin_desc has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, match/switch 6 (9 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.
rhai::packages::string_more::string_functions::sub_string (cognitive 17) src/packages/string_more.rs:922— rhai::packages::string_more::string_functions::sub_string has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
rhai::packages::string_more::string_functions::crop (cognitive 17) src/packages/string_more.rs:1073— rhai::packages::string_more::string_functions::crop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
rhai::bin::rhai-dbg::load_script (cognitive 16) src/bin/rhai-dbg.rs:164— rhai::bin::rhai-dbg::load_script has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 5 (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.
FileTooLong: vm/mod.rs src/grain/vm/mod.rs— FileTooLong — 2880 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 95% of them inside a single declaration: Vm (2 blocks, 314-4980). The bar is 500 significant lines; this is 2380 over it, 5.76× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/parser.rs src/parser.rs— FileTooLong — 2616 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 2116 over it, 5.23× 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: types/dynamic.rs src/types/dynamic.rs— FileTooLong — 1610 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 93% of them inside a single declaration: Dynamic (28 blocks, 184-3075). The bar is 500 significant lines; this is 1110 over it, 3.22× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: module/mod.rs src/module/mod.rs— FileTooLong — 1543 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 78% of them inside a single declaration: Module (9 blocks, 645-3032). The bar is 500 significant lines; this is 1043 over it, 3.09× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: compile/mod.rs src/grain/compile/mod.rs— FileTooLong — 1468 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 82% of them inside a single declaration: Lowering (2 blocks, 302-2593). The bar is 500 significant lines; this is 968 over it, 2.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/tokenizer.rs src/tokenizer.rs— FileTooLong — 1180 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 680 over it, 2.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/optimizer.rs src/optimizer.rs— FileTooLong — 965 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 465 over it, 1.93× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: func/builtin.rs src/func/builtin.rs— FileTooLong — 829 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 329 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: types/token.rs src/types/token.rs— FileTooLong — 746 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 246 over it, 1.49× 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: packages/array_basic.rs src/packages/array_basic.rs— FileTooLong — 727 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 61 free functions. The bar is 500 significant lines; this is 227 over it, 1.45× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: bytecode/code.rs src/grain/bytecode/code.rs— FileTooLong — 725 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 225 over it, 1.45× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: packages/string_more.rs src/packages/string_more.rs— FileTooLong — 702 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 59 free functions. The bar is 500 significant lines; this is 202 over it, 1.40× 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: func/func_call.rs src/func/func_call.rs— FileTooLong — 684 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: Engine (272-1137). The bar is 500 significant lines; this is 184 over it, 1.37× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: func/call.rs src/func/call.rs— FileTooLong — 667 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 97% of them inside a single declaration: Engine (24-1050). The bar is 500 significant lines; this is 167 over it, 1.33× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: eval/stmt.rs src/eval/stmt.rs— FileTooLong — 589 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 99% of them inside a single declaration: Engine (13-992). The bar is 500 significant lines; this is 89 over it, 1.18× 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: bytecode/verify.rs src/grain/bytecode/verify.rs— FileTooLong — 577 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 77 over it, 1.15× 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: packages/logic.rs src/packages/logic.rs— FileTooLong — 575 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 75 over it, 1.15× 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: ast/stmt.rs src/ast/stmt.rs— FileTooLong — 573 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 73 over it, 1.15× 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: eval/chaining.rs src/eval/chaining.rs— FileTooLong — 534 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 96% of them inside a single declaration: Engine (35-817). The bar is 500 significant lines; this is 34 over it, 1.07× 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: ast/expr.rs src/ast/expr.rs— FileTooLong — 523 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 23 over it, 1.05× 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: api/deprecated.rs src/api/deprecated.rs— FileTooLong — 521 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 21 over it, 1.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: func/native.rs src/func/native.rs— FileTooLong — 504 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 4 over it, 1.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
rhai::func::builtin::get_builtin_binary_op_fn (cyclomatic 321) src/func/builtin.rs:87— rhai::func::builtin::get_builtin_binary_op_fn has cyclomatic complexity 321 (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.
rhai::tokenizer::get_next_token_inner (cyclomatic 152) src/tokenizer.rs:858— rhai::tokenizer::get_next_token_inner has cyclomatic complexity 152 (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.
rhai::optimizer::optimize_expr (cyclomatic 115) src/optimizer.rs:934— rhai::optimizer::optimize_expr has cyclomatic complexity 115 (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.
rhai::func::builtin::get_builtin_op_assignment_fn (cyclomatic 111) src/func/builtin.rs:699— rhai::func::builtin::get_builtin_op_assignment_fn has cyclomatic complexity 111 (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.
rhai::optimizer::optimize_stmt (cyclomatic 80) src/optimizer.rs:398— rhai::optimizer::optimize_stmt has cyclomatic complexity 80 (threshold 15). Of this number, 77 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rhai::grain::bytecode::code::assemble (cyclomatic 79) src/grain/bytecode/code.rs:375— rhai::grain::bytecode::code::assemble has cyclomatic complexity 79 (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.
rhai::bin::rhai-dbg::debug_callback (cyclomatic 68) src/bin/rhai-dbg.rs:230— rhai::bin::rhai-dbg::debug_callback has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
rhai::api::formatting::map_std_type_name (cyclomatic 46) src/api/formatting.rs:15— rhai::api::formatting::map_std_type_name has cyclomatic complexity 46 (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.
rhai::bin::rhai-repl::main (cyclomatic 44) src/bin/rhai-repl.rs:292— rhai::bin::rhai-repl::main 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.
rhai::optimizer::optimize_stmt_block (cyclomatic 44) src/optimizer.rs:152— rhai::optimizer::optimize_stmt_block 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.
rhai::tokenizer::parse_string_literal (cyclomatic 44) src/tokenizer.rs:516— rhai::tokenizer::parse_string_literal 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.
rhai::grain::bytecode::verify::verify_chunk (cyclomatic 31) src/grain/bytecode/verify.rs:348— rhai::grain::bytecode::verify::verify_chunk 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. This is NOT this file's highest cyclomatic complexity: rhai::grain::bytecode::verify::effect (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.
rhai::grain::bytecode::code::encoded_width (cyclomatic 24) src/grain/bytecode/code.rs:783— rhai::grain::bytecode::code::encoded_width 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. This is NOT this file's highest cyclomatic complexity: rhai::grain::bytecode::code::decode (cyclomatic 75) 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.
rhai::grain::bytecode::verify::required_caps (cyclomatic 23) src/grain/bytecode/verify.rs:586— rhai::grain::bytecode::verify::required_caps 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. This is NOT this file's highest cyclomatic complexity: rhai::grain::bytecode::verify::effect (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.
rhai::packages::array_basic::array_functions::sort_with_builtin_desc (cyclomatic 22) src/packages/array_basic.rs:1734— rhai::packages::array_basic::array_functions::sort_with_builtin_desc 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.
rhai::grain::format::read::get_constant (cyclomatic 21) src/grain/format/read.rs:462— rhai::grain::format::read::get_constant 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.
rhai::grain::format::write::put_constant (cyclomatic 20) src/grain/format/write.rs:380— rhai::grain::format::write::put_constant 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.
rhai::api::formatting::format_param_type_for_display (cyclomatic 19) src/api/formatting.rs:127— rhai::api::formatting::format_param_type_for_display 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.
rhai::grain::bytecode::verify::constant_caps (cyclomatic 16) src/grain/bytecode/verify.rs:150— rhai::grain::bytecode::verify::constant_caps has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: rhai::grain::bytecode::verify::effect (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.
rhai::grain::format::read::read (cyclomatic 16) src/grain/format/read.rs:115— rhai::grain::format::read::read 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.
rhai::tokenizer::parse_raw_string_literal (cyclomatic 16) src/tokenizer.rs:390— rhai::tokenizer::parse_raw_string_literal has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Hotspot: src/grain/vm/mod.rs src/grain/vm/mod.rs:3699— src/grain/vm/mod.rs changed 67 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 145 in Vm::run_frame at line 3699. 17 of those changes were fix/bug commits, and the other 50 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/grain/vm/mod.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: src/grain/compile/mod.rs src/grain/compile/mod.rs:1012— src/grain/compile/mod.rs changed 47 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 65 in Lowering::lower_statement at line 1012. 13 of those changes were fix/bug commits, and the other 34 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/grain/compile/mod.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: src/eval/stmt.rs src/eval/stmt.rs:193— src/eval/stmt.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 111 in Engine::eval_stmt at line 193. 4 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/eval/stmt.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: src/grain/bytecode/code.rs src/grain/bytecode/code.rs:375— src/grain/bytecode/code.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 79 in rhai::grain::bytecode::code::assemble at line 375. 4 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/grain/bytecode/code.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: src/parser.rs src/parser.rs:1334— src/parser.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in Engine::parse_primary at line 1334. 1 of those changes was a fix/bug commit, and the other 15 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/parser.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: src/optimizer.rs src/optimizer.rs:398— src/optimizer.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in rhai::optimizer::optimize_stmt at line 398. 2 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/optimizer.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: src/grain/bytecode/verify.rs src/grain/bytecode/verify.rs:714— src/grain/bytecode/verify.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in rhai::grain::bytecode::verify::effect at line 714. 4 of those changes were fix/bug commits, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/grain/bytecode/verify.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: src/func/call.rs src/func/call.rs:432— src/func/call.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in Engine::make_function_call at line 432. 4 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/func/call.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: src/grain/bytecode/op.rs src/grain/bytecode/op.rs:906— src/grain/bytecode/op.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in Op::disassemble at line 906. 4 of those changes were fix/bug commits, and the other 17 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/grain/bytecode/op.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: src/func/func_call.rs src/func/func_call.rs:576— src/func/func_call.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in Engine::exec_native_fn_call at line 576. 2 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/func/func_call.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: src/grain/format/read.rs src/grain/format/read.rs:462— src/grain/format/read.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in rhai::grain::format::read::get_constant at line 462. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/grain/format/read.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: src/eval/expr.rs src/eval/expr.rs:205— src/eval/expr.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in Engine::eval_expr at line 205. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/eval/expr.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: src/tokenizer.rs src/tokenizer.rs:1726— src/tokenizer.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in TokenIterator::next at line 1726. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/tokenizer.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: src/func/script.rs src/func/script.rs:284— src/func/script.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in Engine::call_script_fn at line 284. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/func/script.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: src/grain/format/write.rs src/grain/format/write.rs:380— src/grain/format/write.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in rhai::grain::format::write::put_constant at line 380. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/grain/format/write.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: src/ast/expr.rs src/ast/expr.rs:359— src/ast/expr.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in Expr::get_literal_value at line 359. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/ast/expr.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: src/types/error.rs src/types/error.rs:134— src/types/error.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in EvalAltResult::display at line 134. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/types/error.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: src/ast/stmt.rs src/ast/stmt.rs:700— src/ast/stmt.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in Stmt::is_pure at line 700. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 01:58:14 +01:00' --until='2026-10-27 01:58:14 +01:00' --full-history --no-merges -- src/ast/stmt.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.
MethodTooLong: Vm.run_frame src/grain/vm/mod.rs:3699— MethodTooLong — run_frame runs 818 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 718 over it, 8.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: Engine.eval_stmt src/eval/stmt.rs:193— MethodTooLong — eval_stmt runs 465 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 365 over it, 4.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Engine.eval_dot_index_chain_raw src/eval/chaining.rs:224— MethodTooLong — eval_dot_index_chain_raw runs 387 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 287 over it, 3.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Lowering.lower_statement src/grain/compile/mod.rs:1012— MethodTooLong — lower_statement runs 330 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 230 over it, 3.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Engine.get_indexed_mut src/eval/indexing.rs:37— MethodTooLong — get_indexed_mut runs 243 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 143 over it, 2.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.
MethodTooLong: Engine.make_method_call src/func/call.rs:61— MethodTooLong — make_method_call runs 232 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 132 over it, 2.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Engine.make_function_call src/func/call.rs:432— MethodTooLong — make_function_call runs 216 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 116 over it, 2.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Engine.call_script_fn src/func/script.rs:284— MethodTooLong — call_script_fn runs 175 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 75 over it, 1.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Engine.exec_native_fn_call src/func/func_call.rs:576— MethodTooLong — exec_native_fn_call runs 160 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 60 over it, 1.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Vm.walk_chain src/grain/vm/mod.rs:1300— MethodTooLong — walk_chain runs 148 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 48 over it, 1.48× 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: Engine.eval_expr src/eval/expr.rs:205— MethodTooLong — eval_expr 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.
MethodTooLong: Dynamic.fmt src/types/dynamic.rs:640— MethodTooLong — fmt runs 132 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 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Lowering.switch src/grain/compile/mod.rs:565— MethodTooLong — switch runs 128 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 28 over it, 1.28× 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: Vm.call_by_reference src/grain/vm/mod.rs:2775— MethodTooLong — call_by_reference runs 120 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 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Dynamic.fmt src/types/dynamic.rs:484— MethodTooLong — fmt 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: Engine.resolve_fn src/func/func_call.rs:401— MethodTooLong — resolve_fn runs 108 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 8 over it, 1.08× 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: EvalAltResult.display src/types/error.rs:134— MethodTooLong — display runs 106 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 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (7 lines × 2) codegen/src/lib.rs:280— codegen/src/lib.rs:280-286 | codegen/src/lib.rs:314-320 — 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) src/api/definitions/mod.rs:408— src/api/definitions/mod.rs:408-414 | src/api/definitions/mod.rs:422-428 — 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) src/api/eval.rs:124— src/api/eval.rs:124-130 | src/api/run.rs:58-64 — 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 (7 lines × 2) src/func/builtin.rs:296— src/func/builtin.rs:296-302 | src/func/builtin.rs:820-826 — 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) src/func/builtin.rs:404— src/func/builtin.rs:404-410 | src/func/builtin.rs:539-545 — 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) src/packages/array_basic.rs:1655— src/packages/array_basic.rs:1655-1661 | src/packages/array_basic.rs:1758-1764 — 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) src/packages/array_basic.rs:1663— src/packages/array_basic.rs:1663-1669 | src/packages/array_basic.rs:1770-1776 — 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) src/packages/array_basic.rs:1689— src/packages/array_basic.rs:1689-1695 | src/packages/array_basic.rs:1808-1814 — 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) src/parser.rs:1555— src/parser.rs:1555-1561 | src/parser.rs:1630-1636 — 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) src/types/dynamic.rs:505— src/types/dynamic.rs:505-511 | src/types/dynamic.rs:673-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 (7 lines × 2) src/grain/vm/mod.rs:4523— src/grain/vm/mod.rs:4523-4536 | src/grain/vm/mod.rs:4552-4558 — 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) src/parser.rs:2649— src/parser.rs:2649-2655 | src/parser.rs:2686-2692 — 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) src/packages/array_basic.rs:1977— src/packages/array_basic.rs:1977-1983 | src/packages/array_basic.rs:2124-2130 — 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) src/func/function.rs:128— src/func/function.rs:128-134 | src/func/function.rs:142-148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/func/builtin.rs:70— src/func/builtin.rs:70-78 | src/types/dynamic.rs:1254-1262 — 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) src/func/func_call.rs:346— src/func/func_call.rs:346-354 | src/func/func_call.rs:366-374 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/optimizer.rs:477— src/optimizer.rs:477-485 | src/optimizer.rs:488-496 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/types/dynamic.rs:570— src/types/dynamic.rs:570-578 | src/types/dynamic.rs:738-746 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/parser.rs:828— src/parser.rs:828-836 | src/parser.rs:868-877 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/parser.rs:1131— src/parser.rs:1131-1139 | src/parser.rs:3142-3150 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/ast/expr.rs:303— src/ast/expr.rs:303-311 | src/ast/expr.rs:316-324 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/func/func_call.rs:737— src/func/func_call.rs:737-745 | src/func/func_call.rs:754-762 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/packages/time_basic.rs:126— src/packages/time_basic.rs:126-134 | src/packages/time_basic.rs:150-158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/bin/rhai-dbg.rs:171— src/bin/rhai-dbg.rs:171-179 | src/bin/rhai-repl.rs:126-134 — before extracting anything, compare `src/bin/rhai-dbg.rs` and `src/bin/rhai-repl.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) src/bin/rhai-dbg.rs:109— src/bin/rhai-dbg.rs:109-117 | src/bin/rhai-repl.rs:36-44 — before extracting anything, compare `src/bin/rhai-dbg.rs` and `src/bin/rhai-repl.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) src/parser.rs:818— src/parser.rs:818-826 | src/parser.rs:858-866 — 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.
XxxComment src/parser.rs:2063— // xxx[???]... = rhs, xxx.prop... = rhs — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment src/parser.rs:2312— // [xxx..] | (xxx..) | {xxx..} | xxx.., | xxx..; | xxx.. => — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment src/parser.rs:2313— // [xxx..=] | (xxx..=) | {xxx..=} | xxx..=, | xxx..=; | xxx..= => — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment src/eval/chaining.rs:264— // xxx[idx].expr... | xxx[idx][expr]... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment src/eval/chaining.rs:327— // xxx[rhs] op= new_val — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment src/eval/chaining.rs:395— // xxx[rhs] — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment src/eval/chaining.rs:463— // {xxx:map}.id op= ??? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment src/eval/chaining.rs:493— // {xxx:map}.id — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment src/eval/chaining.rs:616— // {xxx:map}.sub_lhs[expr] | {xxx:map}.sub_lhs.expr — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment src/eval/chaining.rs:646— // {xxx:map}.fn_name(arg_expr_list)[expr] | {xxx:map}.fn_name(arg_expr_list).expr — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
XxxComment src/ast/expr.rs:200— /// xxx `.` method `(` expr `,` ... `)` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Duplicated block (10 lines × 2) src/func/builtin.rs:545— src/func/builtin.rs:545-554 | src/func/builtin.rs:587-596 — 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) src/grain/bytecode/op.rs:911— src/grain/bytecode/op.rs:911-920 | src/grain/bytecode/op.rs:923-932 — 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) src/grain/bytecode/verify.rs:662— src/grain/bytecode/verify.rs:662-671 | src/grain/bytecode/verify.rs:680-689 — 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) src/grain/compile/mod.rs:704— src/grain/compile/mod.rs:704-713 | src/grain/compile/mod.rs:748-757 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/grain/vm/mod.rs:2592— src/grain/vm/mod.rs:2592-2601 | src/grain/vm/mod.rs:2614-2623 — 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) src/grain/vm/mod.rs:2590— src/grain/vm/mod.rs:2590-2599 | src/grain/vm/mod.rs:2604-2613 — 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) src/packages/string_more.rs:1319— src/packages/string_more.rs:1319-1328 | src/packages/string_more.rs:1396-1405 — 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) src/serde/ser.rs:515— src/serde/ser.rs:515-524 | src/serde/ser.rs:550-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 (10 lines × 2) src/serde/ser.rs:632— src/serde/ser.rs:632-641 | src/serde/ser.rs:671-680 — 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) codegen/src/custom_type.rs:148— codegen/src/custom_type.rs:148-159 | codegen/src/custom_type.rs:164-173 — 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) src/func/func_call.rs:773— src/func/func_call.rs:773-782 | src/func/func_call.rs:798-807 — 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.
FunctionTooLong: rhai::func::builtin::get_builtin_binary_op_fn src/func/builtin.rs:87— FunctionTooLong — rhai::func::builtin::get_builtin_binary_op_fn runs 454 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 354 over it, 4.54× 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: rhai::optimizer::optimize_stmt src/optimizer.rs:398— FunctionTooLong — rhai::optimizer::optimize_stmt runs 321 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 221 over it, 3.21× 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: rhai::func::builtin::get_builtin_op_assignment_fn src/func/builtin.rs:699— FunctionTooLong — rhai::func::builtin::get_builtin_op_assignment_fn runs 319 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 219 over it, 3.19× 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: rhai::optimizer::optimize_expr src/optimizer.rs:934— FunctionTooLong — rhai::optimizer::optimize_expr runs 289 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 189 over it, 2.89× 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: rhai::bin::rhai-dbg::debug_callback src/bin/rhai-dbg.rs:230— FunctionTooLong — rhai::bin::rhai-dbg::debug_callback runs 284 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 184 over it, 2.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rhai::grain::bytecode::code::assemble src/grain/bytecode/code.rs:375— FunctionTooLong — rhai::grain::bytecode::code::assemble runs 262 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 162 over it, 2.62× 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: rhai::bin::rhai-repl::main src/bin/rhai-repl.rs:292— FunctionTooLong — rhai::bin::rhai-repl::main runs 209 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 109 over it, 2.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rhai::grain::bytecode::code::decode src/grain/bytecode/code.rs:885— FunctionTooLong — rhai::grain::bytecode::code::decode runs 173 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 73 over it, 1.73× 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: rhai::grain::bytecode::verify::verify_chunk src/grain/bytecode/verify.rs:348— FunctionTooLong — rhai::grain::bytecode::verify::verify_chunk runs 144 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 44 over it, 1.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: rhai::optimizer::optimize_stmt_block src/optimizer.rs:152— FunctionTooLong — rhai::optimizer::optimize_stmt_block runs 139 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 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (11 lines × 2) src/ast/stmt.rs:575— src/ast/stmt.rs:575-585 | src/ast/stmt.rs:605-615 — 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) src/eval/target.rs:228— src/eval/target.rs:228-238 | src/eval/target.rs:266-276 — 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) src/module/resolvers/collection.rs:160— src/module/resolvers/collection.rs:160-170 | src/module/resolvers/collection.rs:182-192 — 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) src/packages/string_more.rs:941— src/packages/string_more.rs:941-951 | src/packages/string_more.rs:1092-1102 — 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) src/parser.rs:2205— src/parser.rs:2205-2215 | src/parser.rs:2240-2250 — 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) src/tokenizer.rs:1268— src/tokenizer.rs:1268-1278 | src/tokenizer.rs:1325-1335 — 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) src/types/dynamic.rs:610— src/types/dynamic.rs:610-620 | src/types/dynamic.rs:777-787 — 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) src/grain/format/mod.rs:387— src/grain/format/mod.rs:387-397 | src/grain/pos/varint.rs:71-81 — 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) src/packages/array_basic.rs:164— src/packages/array_basic.rs:164-174 | src/packages/blob_basic.rs:262-272 — before extracting anything, compare `src/packages/array_basic.rs` and `src/packages/blob_basic.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) codegen/ui_tests/rhai_fn_index_getter_return.rs:18— codegen/ui_tests/rhai_fn_index_getter_return.rs:18-28 | codegen/ui_tests/rhai_fn_setter_return.rs:19-29 — 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) src/ast/ast.rs:498— src/ast/ast.rs:498-502 | src/ast/ast.rs:592-596 — 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) src/func/native.rs:349— src/func/native.rs:349-353 | src/func/native.rs:421-425 — 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) src/grain/vm/mod.rs:2854— src/grain/vm/mod.rs:2854-2858 | src/grain/vm/mod.rs:2994-2998 — 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) src/optimizer.rs:575— src/optimizer.rs:575-579 | src/optimizer.rs:632-636 — 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) src/optimizer.rs:984— src/optimizer.rs:984-988 | src/optimizer.rs:1088-1092 — 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) src/packages/array_basic.rs:459— src/packages/array_basic.rs:459-463 | src/packages/blob_basic.rs:574-578 — before extracting anything, compare `src/packages/array_basic.rs` and `src/packages/blob_basic.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/packages/array_basic.rs:530— src/packages/array_basic.rs:530-534 | src/packages/blob_basic.rs:647-651 — before extracting anything, compare `src/packages/array_basic.rs` and `src/packages/blob_basic.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/packages/array_basic.rs:547— src/packages/array_basic.rs:547-551 | src/packages/blob_basic.rs:666-670 — before extracting anything, compare `src/packages/array_basic.rs` and `src/packages/blob_basic.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) src/optimizer.rs:967— src/optimizer.rs:967-971 | src/optimizer.rs:1015-1019 — 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) src/optimizer.rs:1132— src/optimizer.rs:1132-1136 | src/optimizer.rs:1141-1145 — 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 lines × 2) src/api/deprecated.rs:972— src/api/deprecated.rs:972-984 | src/api/deprecated.rs:1043-1055 — 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 lines × 2) src/func/builtin.rs:59— src/func/builtin.rs:59-71 | src/types/dynamic.rs:1232-1244 — 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 (13 lines × 2) src/func/builtin.rs:275— src/func/builtin.rs:275-287 | src/func/builtin.rs:799-811 — 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 lines × 2) src/packages/array_basic.rs:221— src/packages/array_basic.rs:221-233 | src/packages/blob_basic.rs:329-341 — before extracting anything, compare `src/packages/array_basic.rs` and `src/packages/blob_basic.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) src/packages/array_basic.rs:1697— src/packages/array_basic.rs:1697-1709 | src/packages/array_basic.rs:1820-1832 — 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 lines × 2) src/serde/deserialize.rs:101— src/serde/deserialize.rs:101-113 | src/serde/ser.rs:193-205 — before extracting anything, compare `src/serde/deserialize.rs` and `src/serde/ser.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) src/serde/deserialize.rs:116— src/serde/deserialize.rs:116-128 | src/serde/ser.rs:209-221 — before extracting anything, compare `src/serde/deserialize.rs` and `src/serde/ser.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) src/serde/deserialize.rs:133— src/serde/deserialize.rs:133-145 | src/serde/ser.rs:227-239 — before extracting anything, compare `src/serde/deserialize.rs` and `src/serde/ser.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) src/serde/ser.rs:616— src/serde/ser.rs:616-628 | src/serde/ser.rs:655-667 — 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.
Dynamic::try_cast_result (cognitive 40) src/types/dynamic.rs:1500— Dynamic::try_cast_result has cognitive complexity 40 (threshold 15). Drivers by points: match/switch 14 (26 pts), if/else 14 (nesting depth added 12). 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.
Dynamic::downcast_ref (cognitive 38) src/types/dynamic.rs:1876— Dynamic::downcast_ref has cognitive complexity 38 (threshold 15). Drivers by points: match/switch 13 (25 pts), if/else 13 (nesting depth added 12). 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. This shape REPEATS in the file: one other method here (Dynamic::downcast_mut) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Dynamic::downcast_mut (cognitive 38) src/types/dynamic.rs:1979— Dynamic::downcast_mut has cognitive complexity 38 (threshold 15). Drivers by points: match/switch 13 (25 pts), if/else 13 (nesting depth added 12). 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. This shape REPEATS in the file: one other method here (Dynamic::downcast_ref) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Dynamic::fmt (cognitive 33) src/types/dynamic.rs:640— Dynamic::fmt has cognitive complexity 33 (threshold 15). Drivers by points: if/else 23 (42 pts), loops 3 (9 pts), match/switch 4 (8 pts), boolean chains 1 (nesting depth added 29). 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. This shape REPEATS in the file: one other method here (Dynamic::fmt::checked_debug_fmt) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Dynamic::fmt (cognitive 30) src/types/dynamic.rs:484— Dynamic::fmt has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22 (40 pts), match/switch 4 (8 pts), loops 2 (6 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. This shape REPEATS in the file: one other method here (Dynamic::fmt::display_fmt_print) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Dynamic::hash (cognitive 21) src/types/dynamic.rs:390— Dynamic::hash has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (19 pts), match/switch 2 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Dynamic::fmt::checked_debug_fmt (cognitive 19) src/types/dynamic.rs:749— Dynamic::fmt::checked_debug_fmt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), match/switch 2 (3 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. This shape REPEATS in the file: one other method here (Dynamic::fmt) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Dynamic::fmt::display_fmt_print (cognitive 17) src/types/dynamic.rs:581— Dynamic::fmt::display_fmt_print has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (Dynamic::fmt) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
TooManyMethods: Engine src/engine.rs:92— TooManyMethods — 228 methods, declared across 32 files: src/parser.rs (32), api/limits.rs (20), api/options.rs (20), api/register.rs (19), +28 more file(s). The bar is 30 methods; this is 198 over it, 7.60× 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: Module src/module/mod.rs:645— TooManyMethods — 112 methods, declared across 5 files: module/mod.rs (86), module/grain.rs (9), module/lazy.rs (9), api/deprecated.rs (6), +1 more file(s). The bar is 30 methods; this is 82 over it, 3.73× 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: Dynamic src/types/dynamic.rs:55— TooManyMethods — 69 methods, declared across 2 files: types/dynamic.rs (67), api/deprecated.rs (2). The bar is 30 methods; this is 39 over it, 2.30× 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: Vm src/grain/vm/mod.rs:314— TooManyMethods — 63 methods. The bar is 30 methods; this is 33 over it, 2.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.
TooManyMethods: Lowering src/grain/compile/mod.rs:302— TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Program src/grain/program.rs:89— TooManyMethods — 50 methods, declared across 2 files: grain/program.rs (46), format/mod.rs (4). The bar is 30 methods; this is 20 over it, 1.67× 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: Scope src/types/scope.rs:62— TooManyMethods — 36 methods, declared across 2 files: types/scope.rs (35), definitions/mod.rs (1). The bar is 30 methods; this is 6 over it, 1.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: AST src/ast/ast.rs:22— TooManyMethods — 33 methods, declared across 2 files: ast/ast.rs (31), api/deprecated.rs (2). The bar is 30 methods; this is 3 over it, 1.10× 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.
Dynamic::fmt (cyclomatic 45) src/types/dynamic.rs:640— Dynamic::fmt has cyclomatic complexity 45 (threshold 15). Of this number, 34 points are the body's own statements and 11 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Dynamic::fmt (cyclomatic 41) src/types/dynamic.rs:484— Dynamic::fmt has cyclomatic complexity 41 (threshold 15). Of this number, 32 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Dynamic::hash (cyclomatic 29) src/types/dynamic.rs:390— Dynamic::hash 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.
Dynamic::try_cast_result (cyclomatic 29) src/types/dynamic.rs:1500— Dynamic::try_cast_result 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.
Dynamic::downcast_ref (cyclomatic 28) src/types/dynamic.rs:1876— Dynamic::downcast_ref 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 shape REPEATS in the file: one other method here (Dynamic::downcast_mut) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Dynamic::downcast_mut (cyclomatic 28) src/types/dynamic.rs:1979— Dynamic::downcast_mut 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 shape REPEATS in the file: one other method here (Dynamic::downcast_ref) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Dynamic::is_hashable (cyclomatic 24) src/types/dynamic.rs:1206— Dynamic::is_hashable has cyclomatic complexity 24 (threshold 15). Of this number, 19 points are the body's own statements and 5 belong to one function item inside it that branches. 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.
TodoComment tests/unary_after_binary.rs:4— // TODO also add test case for unary after compound — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/lib.rs:96— // TODO: Further audit no_std compatibility — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/func/native.rs:34— // TODO: Further audit no_std compatibility — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/func/native.rs:41— // TODO: Further audit no_std compatibility — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/packages/arithmetic.rs:536— // TODO: Remove this limit when `rust-decimal` is updated with the fix. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment codegen/src/custom_type.rs:208— // TODO store (with lazy static) the vec of string — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment codegen/src/custom_type.rs:209— // TODO maybe optimization, reverse the order of segments — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Duplicated block (12 lines × 2) src/bin/rhai-dbg.rs:409— src/bin/rhai-dbg.rs:409-420 | src/bin/rhai-dbg.rs:432-443 — 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) src/packages/logic.rs:240— src/packages/logic.rs:240-251 | src/packages/logic.rs:259-270 — 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) src/packages/logic.rs:278— src/packages/logic.rs:278-289 | src/packages/logic.rs:297-308 — 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) src/packages/logic.rs:516— src/packages/logic.rs:516-527 | src/packages/logic.rs:535-546 — 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) src/packages/logic.rs:554— src/packages/logic.rs:554-565 | src/packages/logic.rs:573-584 — 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) src/serde/ser.rs:500— src/serde/ser.rs:500-511 | src/serde/ser.rs:535-546 — 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) src/packages/array_basic.rs:188— src/packages/array_basic.rs:188-200 | src/packages/map_basic.rs:160-171 — 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) src/ast/expr.rs:558— src/ast/expr.rs:558-565 | src/ast/expr.rs:615-622 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) src/bin/rhai-repl.rs:36— src/bin/rhai-repl.rs:36-43 | src/bin/rhai-run.rs:19-26 — 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) src/packages/array_basic.rs:1680— src/packages/array_basic.rs:1680-1687 | src/packages/array_basic.rs:1795-1802 — 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) src/parser.rs:2613— src/parser.rs:2613-2620 | src/parser.rs:2622-2629 — 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) src/parser.rs:3626— src/parser.rs:3626-3633 | src/parser.rs:3645-3652 — 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) src/parser.rs:3701— src/parser.rs:3701-3708 | src/parser.rs:3874-3881 — 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) src/types/fn_ptr.rs:275— src/types/fn_ptr.rs:275-282 | src/types/fn_ptr.rs:315-322 — 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) src/func/builtin.rs:308— src/func/builtin.rs:308-313 | src/func/builtin.rs:832-837 — 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) src/grain/compile/mod.rs:585— src/grain/compile/mod.rs:585-590 | src/grain/compile/mod.rs:613-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 (6 lines × 2) src/grain/vm/mod.rs:4270— src/grain/vm/mod.rs:4270-4275 | src/grain/vm/mod.rs:4447-4452 — 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) src/packages/array_basic.rs:1672— src/packages/array_basic.rs:1672-1677 | src/packages/array_basic.rs:1783-1788 — 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) src/types/dynamic.rs:1882— src/types/dynamic.rs:1882-1887 | src/types/dynamic.rs:1985-1990 — 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) src/tokenizer.rs:1230— src/tokenizer.rs:1230-1235 | src/tokenizer.rs:1406-1411 — 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) src/packages/bit_field.rs:106— src/packages/bit_field.rs:106-111 | src/packages/bit_field.rs:196-201 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) src/bin/rhai-dbg.rs:88— src/bin/rhai-dbg.rs:88-102 | src/bin/rhai-repl.rs:15-29 — before extracting anything, compare `src/bin/rhai-dbg.rs` and `src/bin/rhai-repl.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) src/packages/bit_field.rs:134— src/packages/bit_field.rs:134-148 | src/packages/bit_field.rs:230-244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) src/packages/map_basic.rs:412— src/packages/map_basic.rs:412-426 | src/packages/map_basic.rs:476-490 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) src/parser.rs:650— src/parser.rs:650-664 | src/parser.rs:1864-1878 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) src/serde/deserialize.rs:152— src/serde/deserialize.rs:152-166 | src/serde/ser.rs:245-259 — before extracting anything, compare `src/serde/deserialize.rs` and `src/serde/ser.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15 lines × 2) src/serde/deserialize.rs:170— src/serde/deserialize.rs:170-184 | src/serde/ser.rs:263-277 — before extracting anything, compare `src/serde/deserialize.rs` and `src/serde/ser.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Lowering::lower_statement (cyclomatic 65) src/grain/compile/mod.rs:1012— Lowering::lower_statement 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.
Lowering::expression (cyclomatic 33) src/grain/compile/mod.rs:1622— Lowering::expression has cyclomatic complexity 33 (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.
Lowering::switch (cyclomatic 24) src/grain/compile/mod.rs:565— Lowering::switch 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.
Lowering::chain (cyclomatic 20) src/grain/compile/mod.rs:406— Lowering::chain 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.
Lowering::lower_call (cyclomatic 18) src/grain/compile/mod.rs:1855— Lowering::lower_call 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.
Lowering::lower_statement (cognitive 83) src/grain/compile/mod.rs:1012— Lowering::lower_statement has cognitive complexity 83 (threshold 15). Drivers by points: if/else 29 (52 pts), match/switch 11 (21 pts), loops 3 (8 pts), boolean chains 2 (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.
Lowering::switch (cognitive 34) src/grain/compile/mod.rs:565— Lowering::switch has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 8 (11 pts), match/switch 4 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lowering::lower_call (cognitive 33) src/grain/compile/mod.rs:1855— Lowering::lower_call has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 4 (9 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.
Lowering::chain (cognitive 26) src/grain/compile/mod.rs:406— Lowering::chain has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 4 (8 pts), loops 2 (4 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.
Lowering::expression (cognitive 18) src/grain/compile/mod.rs:1622— Lowering::expression has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (6 pts), match/switch 2 (3 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.
rhai_codegen::custom_type::scan_fields (cognitive 69) codegen/src/custom_type.rs:238— rhai_codegen::custom_type::scan_fields has cognitive complexity 69 (threshold 15). Drivers by points: if/else 19 (42 pts), match/switch 7 (19 pts), loops 3 (6 pts), boolean chains 2 (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.
rhai_codegen::rhai_module::generate_body (cognitive 44) codegen/src/rhai_module.rs:29— rhai_codegen::rhai_module::generate_body has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (23 pts), match/switch 4 (13 pts), loops 5 (6 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rhai_codegen::custom_type::derive_custom_type_impl (cognitive 28) codegen/src/custom_type.rs:20— rhai_codegen::custom_type::derive_custom_type_impl has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 5 (14 pts), if/else 5 (9 pts), loops 3 (5 pts) (nesting depth added 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
rhai_codegen::rhai_module::check_rename_collisions (cognitive 22) codegen/src/rhai_module.rs:299— rhai_codegen::rhai_module::check_rename_collisions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 12). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
rhai_codegen::attrs::doc_attributes (cognitive 18) codegen/src/attrs.rs:134— rhai_codegen::attrs::doc_attributes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (17 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.
Module::eval_ast_as_new_raw (cognitive 28) src/module/mod.rs:2456— Module::eval_ast_as_new_raw has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Module::eval_grain_as_new_raw (cognitive 28) src/module/mod.rs:2620— Module::eval_grain_as_new_raw has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (22 pts), 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.
Module::parse (cognitive 23) codegen/src/module.rs:137— Module::parse has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 4 (8 pts), loops 3 (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.
Module::build_index::index_module (cognitive 23) src/module/mod.rs:2777— Module::build_index::index_module has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 4, match/switch 2 (4 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.
Module::write_definition (cognitive 16) src/api/definitions/mod.rs:400— Module::write_definition has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3, match/switch 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClassTooLong: Vm src/grain/vm/mod.rs:314— ClassTooLong — 2723 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 63 methods, 2 blocks, lines 314-4980. The bar is 400 significant lines; this is 2323 over it, 6.81× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Dynamic src/types/dynamic.rs:55— ClassTooLong — 1491 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 69 methods, 28 blocks, lines 184-3075. The bar is 400 significant lines; this is 1091 over it, 3.73× 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: Module src/module/mod.rs:645— ClassTooLong — 1204 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 112 methods, 9 blocks, lines 645-3032. The bar is 400 significant lines; this is 804 over it, 3.01× 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: Lowering src/grain/compile/mod.rs:302— ClassTooLong — 1198 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 51 methods, 2 blocks, lines 302-2593. The bar is 400 significant lines; this is 798 over it, 3.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DynamicSerializer src/serde/ser.rs:16— ClassTooLong — 422 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 1 methods, 8 blocks, lines 16-681. The bar is 400 significant lines; this is 22 over it, 1.06× 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 (16 lines × 2) src/bin/rhai-dbg.rs:185— src/bin/rhai-dbg.rs:185-200 | src/bin/rhai-repl.rs:142-157 — before extracting anything, compare `src/bin/rhai-dbg.rs` and `src/bin/rhai-repl.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) src/optimizer.rs:1158— src/optimizer.rs:1158-1173 | src/optimizer.rs:1194-1209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) src/packages/string_more.rs:957— src/packages/string_more.rs:957-972 | src/packages/string_more.rs:1110-1125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) src/types/dynamic.rs:592— src/types/dynamic.rs:592-607 | src/types/dynamic.rs:759-774 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) codegen/ui_tests/rhai_fn_rename_collision_oneattr_multiple.rs:13— codegen/ui_tests/rhai_fn_rename_collision_oneattr_multiple.rs:13-30 | codegen/ui_tests/rhai_mod_unknown_type.rs:12-27 — 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 (12 lines × 4) src/func/native.rs:325— src/func/native.rs:325-336 | src/func/native.rs:360-371 | src/func/native.rs:393-404 | src/func/native.rs:432-443 — 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 (12 lines × 4) src/packages/logic.rs:316— src/packages/logic.rs:316-327 | src/packages/logic.rs:335-346 | src/packages/logic.rs:392-403 | src/packages/logic.rs:411-422 — 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 (12 lines × 4) src/packages/logic.rs:354— src/packages/logic.rs:354-365 | src/packages/logic.rs:373-384 | src/packages/logic.rs:430-441 | src/packages/logic.rs:449-460 — 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 (12 lines × 4) src/packages/logic.rs:592— src/packages/logic.rs:592-603 | src/packages/logic.rs:611-622 | src/packages/logic.rs:668-679 | src/packages/logic.rs:687-698 — 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 (12 lines × 4) src/packages/logic.rs:630— src/packages/logic.rs:630-641 | src/packages/logic.rs:649-660 | src/packages/logic.rs:706-717 | src/packages/logic.rs:725-736 — 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.
Vm::run_frame (cognitive 274) src/grain/vm/mod.rs:3699— Vm::run_frame has cognitive complexity 274 (threshold 15). Drivers by points: if/else 77 (229 pts), match/switch 10 (30 pts), boolean chains 8, loops 3 (7 pts) (nesting depth added 176). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Vm::call_syntactic (cognitive 27) src/grain/vm/mod.rs:2567— Vm::call_syntactic has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (21 pts), match/switch 2 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Vm::walk_chain (cognitive 19) src/grain/vm/mod.rs:1300— Vm::walk_chain has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 4 (6 pts), loops 1 (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.
Vm::walk_property (cognitive 16) src/grain/vm/mod.rs:1857— Vm::walk_property has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (4 members, 50+ identical tokens) src/func/native.rs:314— src/func/native.rs:314-336 | src/func/native.rs:348-371 | src/func/native.rs:382-404 | src/func/native.rs:420-443 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/module/mod.rs:2058— src/module/mod.rs:2058-2089 | src/module/mod.rs:2095-2128 | src/module/mod.rs:2133-2186 | src/module/mod.rs:2199-2258 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/packages/math_basic.rs:463— src/packages/math_basic.rs:463-476 | src/packages/math_basic.rs:480-493 | src/packages/math_basic.rs:497-510 | src/packages/math_basic.rs:514-527 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/serde/deserialize.rs:115— src/serde/deserialize.rs:115-130 | src/serde/deserialize.rs:132-147 | src/serde/ser.rs:208-223 | src/serde/ser.rs:226-241 — 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 (17 lines × 2) src/eval/data_check.rs:35— src/eval/data_check.rs:35-51 | src/eval/data_check.rs:77-93 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) src/parser.rs:3373— src/parser.rs:3373-3389 | src/parser.rs:3834-3850 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) src/serde/deserialize.rs:66— src/serde/deserialize.rs:66-82 | src/serde/ser.rs:158-174 — before extracting anything, compare `src/serde/deserialize.rs` and `src/serde/ser.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (17 lines × 2) codegen/ui_tests/first_shared_ref.rs:12— codegen/ui_tests/first_shared_ref.rs:12-28 | codegen/ui_tests/non_clonable.rs:12-28 — 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 (11 lines × 6) src/packages/logic.rs:238— src/packages/logic.rs:238-248 | src/packages/logic.rs:257-267 | src/packages/logic.rs:352-362 | src/packages/logic.rs:371-381 | src/packages/logic.rs:428-438 | src/packages/logic.rs:447-457 — all 6 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 (11 lines × 6) src/packages/logic.rs:276— src/packages/logic.rs:276-286 | src/packages/logic.rs:295-305 | src/packages/logic.rs:314-324 | src/packages/logic.rs:333-343 | src/packages/logic.rs:390-400 | src/packages/logic.rs:409-419 — all 6 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 (11 lines × 6) src/packages/logic.rs:514— src/packages/logic.rs:514-524 | src/packages/logic.rs:533-543 | src/packages/logic.rs:628-638 | src/packages/logic.rs:647-657 | src/packages/logic.rs:704-714 | src/packages/logic.rs:723-733 — all 6 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 (11 lines × 6) src/packages/logic.rs:552— src/packages/logic.rs:552-562 | src/packages/logic.rs:571-581 | src/packages/logic.rs:590-600 | src/packages/logic.rs:609-619 | src/packages/logic.rs:666-676 | src/packages/logic.rs:685-695 — all 6 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 (7–8 lines × 2) src/func/builtin.rs:599— src/func/builtin.rs:599-606 | src/func/builtin.rs:610-616 — 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–8 lines × 2) src/func/func_call.rs:591— src/func/func_call.rs:591-597 | src/func/func_call.rs:851-858 — 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–8 lines × 2) src/func/function.rs:161— src/func/function.rs:161-167 | src/func/function.rs:268-275 — 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–8 lines × 2) src/packages/string_more.rs:1591— src/packages/string_more.rs:1591-1597 | src/packages/string_more.rs:1671-1678 — 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.
Expr::fmt (cyclomatic 33) src/ast/expr.rs:241— Expr::fmt has cyclomatic complexity 33 (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.
Expr::get_literal_value (cyclomatic 28) src/ast/expr.rs:359— Expr::get_literal_value 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.
Expr::walk (cyclomatic 23) src/ast/expr.rs:749— Expr::walk 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.
rhai_codegen::custom_type::scan_fields (cyclomatic 31) codegen/src/custom_type.rs:238— rhai_codegen::custom_type::scan_fields 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.
rhai_codegen::rhai_module::generate_body (cyclomatic 22) codegen/src/rhai_module.rs:29— rhai_codegen::rhai_module::generate_body 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.
rhai_codegen::custom_type::derive_custom_type_impl (cyclomatic 18) codegen/src/custom_type.rs:20— rhai_codegen::custom_type::derive_custom_type_impl 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.
Expr::walk (cognitive 36) src/ast/expr.rs:749— Expr::walk has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 6 (12 pts), match/switch 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.
Expr::fmt (cognitive 24) src/ast/expr.rs:241— Expr::fmt has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 2 (3 pts) (nesting depth added 12). 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.
Expr::get_literal_value (cognitive 19) src/ast/expr.rs:359— Expr::get_literal_value has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 2 (5 pts), loops 2 (4 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.
Duplicated block (12 lines × 3) src/api/eval.rs:209— src/api/eval.rs:209-220 | src/api/eval.rs:322-333 | src/api/eval.rs:356-367 — 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 (12 lines × 3) src/packages/array_basic.rs:811— src/packages/array_basic.rs:811-822 | src/packages/array_basic.rs:903-914 | src/packages/array_basic.rs:2269-2280 — 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 (12 lines × 3) src/parser.rs:658— src/parser.rs:658-669 | src/parser.rs:726-737 | src/parser.rs:1872-1883 — 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.
Vm::run_frame (cyclomatic 145) src/grain/vm/mod.rs:3699— Vm::run_frame has cyclomatic complexity 145 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Vm::call_by_reference (cyclomatic 17) src/grain/vm/mod.rs:2775— Vm::call_by_reference 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.
Stmt::walk (cyclomatic 50) src/ast/stmt.rs:837— Stmt::walk 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.
Stmt::is_pure (cyclomatic 22) src/ast/stmt.rs:700— Stmt::is_pure 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.
ExportedFn::generate_impl (cognitive 29) codegen/src/function.rs:661— ExportedFn::generate_impl has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 5 (14 pts), if/else 10 (13 pts), boolean chains 1, loops 1 (nesting depth added 12). 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.
ExportedFn::parse (cognitive 19) codegen/src/function.rs:281— ExportedFn::parse has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 7 (14 pts), if/else 3 (4 pts), loops 1 (nesting depth added 8). 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.
FnPtr::_call_raw (cognitive 19) src/types/fn_ptr.rs:434— FnPtr::_call_raw has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FnPtr::_call_with_extra_args (cognitive 16) src/types/fn_ptr.rs:596— FnPtr::_call_with_extra_args has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2, 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.
D4 · Code Duplication· Members sharing a duplicated core (12 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (12 members, 50+ identical tokens) src/packages/logic.rs:234— src/packages/logic.rs:234-251 | src/packages/logic.rs:253-270 | src/packages/logic.rs:272-289 | src/packages/logic.rs:291-308 | src/packages/logic.rs:310-327 | src/packages/logic.rs:329-346 | src/packages/logic.rs:348-365 | src/packages/logic.rs:367-384 | src/packages/logic.rs:386-403 | src/packages/logic.rs:405-422 | src/packages/logic.rs:424-441 | src/packages/logic.rs:443-460 — These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
Members sharing a duplicated core (12 members, 50+ identical tokens) src/packages/logic.rs:510— src/packages/logic.rs:510-527 | src/packages/logic.rs:529-546 | src/packages/logic.rs:548-565 | src/packages/logic.rs:567-584 | src/packages/logic.rs:586-603 | src/packages/logic.rs:605-622 | src/packages/logic.rs:624-641 | src/packages/logic.rs:643-660 | src/packages/logic.rs:662-679 | src/packages/logic.rs:681-698 | src/packages/logic.rs:700-717 | src/packages/logic.rs:719-736 — These 12 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 12 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 12 times.
Duplicated block (23 lines × 2) src/grain/vm/mod.rs:2907— src/grain/vm/mod.rs:2907-2929 | src/grain/vm/mod.rs:3044-3066 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (23 lines × 2) src/module/mod.rs:2479— src/module/mod.rs:2479-2501 | src/module/mod.rs:2658-2680 — 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 (21 lines × 2) src/packages/map_basic.rs:428— src/packages/map_basic.rs:428-448 | src/packages/map_basic.rs:492-512 — 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 (21 lines × 2) src/serde/deserialize.rs:43— src/serde/deserialize.rs:43-63 | src/serde/ser.rs:134-154 — before extracting anything, compare `src/serde/deserialize.rs` and `src/serde/ser.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (20 lines × 2) src/func/script.rs:115— src/func/script.rs:115-134 | src/func/script.rs:194-213 — 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 (20 lines × 2) src/types/dynamic.rs:549— src/types/dynamic.rs:549-568 | src/types/dynamic.rs:717-736 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19 lines × 2) src/grain/vm/mod.rs:2931— src/grain/vm/mod.rs:2931-2953 | src/grain/vm/mod.rs:3068-3086 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19 lines × 2) src/parser.rs:676— src/parser.rs:676-694 | src/parser.rs:744-762 — 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 (18 lines × 2) src/module/mod.rs:2067— src/module/mod.rs:2067-2084 | src/module/mod.rs:2106-2123 — 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 (18 lines × 2) src/packages/array_basic.rs:1636— src/packages/array_basic.rs:1636-1653 | src/packages/array_basic.rs:1735-1752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) codegen/src/lib.rs:288— codegen/src/lib.rs:288-301 | codegen/src/lib.rs:322-335 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/func/native.rs:656— src/func/native.rs:656-669 | src/func/native.rs:698-711 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 6) src/packages/logic.rs:257— src/packages/logic.rs:257-265 | src/packages/logic.rs:295-303 | src/packages/logic.rs:333-341 | src/packages/logic.rs:371-379 | src/packages/logic.rs:409-417 | src/packages/logic.rs:447-455 — all 6 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 × 6) src/packages/logic.rs:533— src/packages/logic.rs:533-541 | src/packages/logic.rs:571-579 | src/packages/logic.rs:609-617 | src/packages/logic.rs:647-655 | src/packages/logic.rs:685-693 | src/packages/logic.rs:723-731 — all 6 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 × 4) src/eval/chaining.rs:336— src/eval/chaining.rs:336-344 | src/eval/chaining.rs:404-412 | src/eval/chaining.rs:474-482 | src/eval/chaining.rs:630-638 — 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 × 4) src/serde/deserialize.rs:122— src/serde/deserialize.rs:122-130 | src/serde/deserialize.rs:139-147 | src/serde/ser.rs:215-223 | src/serde/ser.rs:233-241 — before extracting anything, compare `src/serde/deserialize.rs` and `src/serde/ser.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) src/eval/eval_context.rs:312— src/eval/eval_context.rs:312-319 | src/eval/eval_context.rs:359-366 | src/types/fn_ptr.rs:290-297 — 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 lines × 3) src/packages/array_basic.rs:1753— src/packages/array_basic.rs:1753-1760 | src/packages/array_basic.rs:1803-1810 | src/packages/array_basic.rs:1815-1822 — 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: DynamicSerializer (LCOM4 14) src/serde/ser.rs:16— DynamicSerializer's methods fall into 14 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 14 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: ImmutableString (LCOM4 12) src/types/immutable_string.rs:50— ImmutableString's methods fall into 12 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 12 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.
EvalAltResult::display (cyclomatic 60) src/types/error.rs:134— EvalAltResult::display has cyclomatic complexity 60 (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.
TokenIterator::next (cyclomatic 41) src/tokenizer.rs:1726— TokenIterator::next 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.
ExportedFnParams::from_info (cyclomatic 27) codegen/src/function.rs:123— ExportedFnParams::from_info 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.
Op::disassemble (cyclomatic 21) src/grain/bytecode/op.rs:906— Op::disassemble 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.
ExportedModParams::from_info (cyclomatic 18) codegen/src/module.rs:53— ExportedModParams::from_info 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.
ExportedFn::parse (cyclomatic 17) codegen/src/function.rs:281— ExportedFn::parse 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.
Debugger::is_break_point (cyclomatic 17) src/eval/debugger.rs:322— Debugger::is_break_point 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.
Stmt::walk (cognitive 91) src/ast/stmt.rs:837— Stmt::walk has cognitive complexity 91 (threshold 15). Drivers by points: if/else 26 (67 pts), loops 11 (23 pts), match/switch 1 (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TokenIterator::next (cognitive 52) src/tokenizer.rs:1726— TokenIterator::next has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (38 pts), boolean chains 7, match/switch 4 (7 pts) (nesting depth added 26). 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.
Target::propagate_changed_value (cognitive 19) src/eval/target.rs:280— Target::propagate_changed_value has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 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.
Debugger::is_break_point (cognitive 17) src/eval/debugger.rs:322— Debugger::is_break_point has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (13 pts), boolean chains 4 (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.
TooManyFunctions: rhai::packages::blob_basic::blob_functions src/packages/blob_basic.rs:40— TooManyFunctions — 37 free functions. The bar is 30 free functions; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Change coupling: verify.rs ↔ mod.rs src/grain/bytecode/verify.rs:1— `src/grain/bytecode/verify.rs` and `src/grain/vm/mod.rs` change together 61% of the time (11 of the 18 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 `8fa0a8df` Make Grain function loading lazy, tighten up routines (#1192); `57fff8cd` Grain closures keep the imports of the script that made them; `73ac7719` Apply batched suggestions from code review by: Jack Hogan <jackhogan1… — run `git show` on any of them.
Near-duplicate member pair (75 shared lines) src/grain/vm/mod.rs:2787— src/grain/vm/mod.rs:2787-2953 | src/grain/vm/mod.rs:2976-3086 — These two members are variants of one another: 75 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (66 shared lines) src/packages/array_basic.rs:1635— src/packages/array_basic.rs:1635-1709 | src/packages/array_basic.rs:1734-1832 — These two members are variants of one another: 66 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (63 shared lines) src/types/dynamic.rs:484— src/types/dynamic.rs:484-634 | src/types/dynamic.rs:640-813 — These two members are variants of one another: 63 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Duplicated block (12–60 lines × 2) src/tokenizer.rs:98— src/tokenizer.rs:98-157 | src/tokenizer.rs:218-229 — 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 (49–50 lines × 2) src/module/mod.rs:2514— src/module/mod.rs:2514-2563 | src/module/mod.rs:2700-2748 — 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 (33 lines × 2) src/types/error.rs:487— src/types/error.rs:487-519 | src/types/error.rs:549-581 — 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 (28 lines × 2) src/grain/vm/mod.rs:2860— src/grain/vm/mod.rs:2860-2887 | src/grain/vm/mod.rs:3000-3027 — 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 (27 lines × 2) src/packages/string_more.rs:646— src/packages/string_more.rs:646-672 | src/packages/string_more.rs:726-752 — 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 (22 lines × 3) codegen/src/lib.rs:386— codegen/src/lib.rs:386-407 | codegen/src/lib.rs:417-438 | codegen/src/lib.rs:448-469 — 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 (21–22 lines × 2) src/packages/string_more.rs:1283— src/packages/string_more.rs:1283-1304 | src/packages/string_more.rs:1354-1374 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15–16 lines × 2) src/func/hashing.rs:100— src/func/hashing.rs:100-115 | src/func/hashing.rs:138-152 — 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–16 lines × 2) src/parser.rs:2278— src/parser.rs:2278-2289 | src/parser.rs:2332-2347 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14–15 lines × 3) src/eval/chaining.rs:446— src/eval/chaining.rs:446-459 | src/eval/chaining.rs:656-670 | src/eval/chaining.rs:780-794 — 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 (14 lines × 4) src/module/mod.rs:2076— src/module/mod.rs:2076-2089 | src/module/mod.rs:2115-2128 | src/module/mod.rs:2173-2186 | src/module/mod.rs:2245-2258 — 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 (13–14 lines × 2) src/parser.rs:3220— src/parser.rs:3220-3232 | src/parser.rs:4097-4110 — 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–12 lines × 2) src/parser.rs:2164— src/parser.rs:2164-2174 | src/parser.rs:2219-2230 — 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 × 5) src/eval/chaining.rs:276— src/eval/chaining.rs:276-286 | src/eval/chaining.rs:332-342 | src/eval/chaining.rs:400-410 | src/eval/chaining.rs:470-480 | src/eval/chaining.rs:498-508 — all 5 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 (11 lines × 3) src/bin/rhai-dbg.rs:408— src/bin/rhai-dbg.rs:408-418 | src/bin/rhai-dbg.rs:431-441 | src/bin/rhai-dbg.rs:454-464 — 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 (10–11 lines × 2) src/parser.rs:1018— src/parser.rs:1018-1028 | src/parser.rs:1151-1160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 4) src/packages/math_basic.rs:464— src/packages/math_basic.rs:464-473 | src/packages/math_basic.rs:481-490 | src/packages/math_basic.rs:498-507 | src/packages/math_basic.rs:515-524 — 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 (10 lines × 3) src/serde/ser.rs:461— src/serde/ser.rs:461-470 | src/serde/ser.rs:497-506 | src/serde/ser.rs:532-541 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9–10 lines × 2) src/eval/chaining.rs:146— src/eval/chaining.rs:146-155 | src/eval/chaining.rs:176-184 — 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) src/ast/stmt.rs:655— src/ast/stmt.rs:655-661 | src/ast/stmt.rs:687-695 — 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 × 4) src/eval/chaining.rs:329— src/eval/chaining.rs:329-334 | src/eval/chaining.rs:397-402 | src/eval/chaining.rs:495-500 | src/eval/chaining.rs:625-630 — 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 (6 lines × 3) src/types/dynamic.rs:505— src/types/dynamic.rs:505-510 | src/types/dynamic.rs:673-678 | src/types/dynamic.rs:1228-1233 — 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 (2–5 lines × 3) src/func/builtin.rs:178— src/func/builtin.rs:178-179 | src/func/builtin.rs:190-194 | src/func/builtin.rs:212-216 — 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 (7 lines × 3) src/packages/array_basic.rs:44— src/packages/array_basic.rs:44-50 | src/packages/array_basic.rs:766-772 | src/packages/array_basic.rs:1211-1217 — 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 (12 lines × 7) codegen/ui_tests/export_fn_bad_attr.rs:11— codegen/ui_tests/export_fn_bad_attr.rs:11-22 | codegen/ui_tests/export_fn_bad_value.rs:11-22 | codegen/ui_tests/export_fn_extra_value.rs:11-22 | codegen/ui_tests/export_fn_junk_arg.rs:11-22 | codegen/ui_tests/export_fn_missing_value.rs:11-22 | codegen/ui_tests/export_fn_path_attr.rs:11-22 | codegen/ui_tests/export_fn_raw_return.rs:11-22 — 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 7 call sites, so a change lands once.
Duplicated block (16 lines × 8) codegen/ui_tests/export_mod_bad_attr.rs:12— codegen/ui_tests/export_mod_bad_attr.rs:12-27 | codegen/ui_tests/export_mod_bad_value.rs:12-27 | codegen/ui_tests/export_mod_cfg.rs:13-28 | codegen/ui_tests/export_mod_extra_value.rs:12-27 | codegen/ui_tests/export_mod_junk_arg.rs:12-27 | codegen/ui_tests/export_mod_missing_value.rs:12-27 | codegen/ui_tests/export_mod_path_attr.rs:12-27 | codegen/ui_tests/export_mod_raw_return.rs:12-27 — 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 8 call sites, so a change lands once.
Duplicated block (16 lines × 27) codegen/ui_tests/rhai_fn_bad_attr.rs:12— codegen/ui_tests/rhai_fn_bad_attr.rs:12-27 | codegen/ui_tests/rhai_fn_bad_value.rs:12-27 | codegen/ui_tests/rhai_fn_extra_value.rs:12-27 | codegen/ui_tests/rhai_fn_getter_conflict.rs:13-28 | codegen/ui_tests/rhai_fn_getter_multiple.rs:13-28 | codegen/ui_tests/rhai_fn_index_getter_multiple.rs:13-28 | codegen/ui_tests/rhai_fn_index_getter_signature.rs:13-28 | codegen/ui_tests/rhai_fn_index_setter_multiple.rs:13-28 | codegen/ui_tests/rhai_fn_junk_arg.rs:12-27 | codegen/ui_tests/rhai_fn_missing_value.rs:12-27 | codegen/ui_tests/rhai_fn_path_attr.rs:12-27 | codegen/ui_tests/rhai_fn_rename_collision.rs:13-33 | codegen/ui_tests/rhai_fn_rename_collision_oneattr.rs:13-32 | codegen/ui_tests/rhai_fn_rename_to_index_getter.rs:13-28 | codegen/ui_tests/rhai_fn_rename_to_index_setter.rs:13-28 | codegen/ui_tests/rhai_fn_rename_to_prop_getter.rs:13-28 | codegen/ui_tests/rhai_fn_rename_to_prop_setter.rs:13-28 | codegen/ui_tests/rhai_fn_setter_index_signature.rs:13-28 | codegen/ui_tests/rhai_fn_setter_multiple.rs:13-28 | codegen/ui_tests/rhai_fn_setter_signature.rs:13-28 | codegen/ui_tests/rhai_mod_bad_attr.rs:13-29 | codegen/ui_tests/rhai_mod_bad_value.rs:13-29 | codegen/ui_tests/rhai_mod_junk_arg.rs:13-29 | codegen/ui_tests/rhai_mod_missing_value.rs:13-29 | codegen/ui_tests/rhai_mod_name_collisions.rs:12-31 | codegen/ui_tests/rhai_mod_path_attr.rs:13-29 | codegen/ui_tests/rhai_mod_return_raw.rs:13-29 — before extracting anything, compare `codegen/ui_tests/rhai_fn_rename_collision.rs` and `codegen/ui_tests/rhai_fn_rename_collision_oneattr.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 3) codegen/ui_tests/rhai_fn_global_multiple.rs:13— codegen/ui_tests/rhai_fn_global_multiple.rs:13-28 | codegen/ui_tests/rhai_fn_rename_collision_oneattr_multiple.rs:13-30 | codegen/ui_tests/rhai_fn_rename_collision_with_itself.rs:13-25 — 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 (20 lines × 3) codegen/ui_tests/rhai_fn_rename_collision.rs:13— codegen/ui_tests/rhai_fn_rename_collision.rs:13-33 | codegen/ui_tests/rhai_fn_rename_collision_oneattr.rs:13-32 | codegen/ui_tests/rhai_mod_name_collisions.rs:12-31 — before extracting anything, compare `codegen/ui_tests/rhai_fn_rename_collision.rs` and `codegen/ui_tests/rhai_fn_rename_collision_oneattr.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 4) codegen/ui_tests/rhai_fn_rename_collision.rs:13— codegen/ui_tests/rhai_fn_rename_collision.rs:13-33 | codegen/ui_tests/rhai_fn_rename_collision_oneattr.rs:13-32 | codegen/ui_tests/rhai_mod_name_collisions.rs:12-31 | codegen/ui_tests/rhai_mod_unknown_type_return.rs:12-27 — before extracting anything, compare `codegen/ui_tests/rhai_fn_rename_collision.rs` and `codegen/ui_tests/rhai_fn_rename_collision_oneattr.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Silent fallback default on Err src/packages/lang_core.rs:299— `get_fn_metadata2` turns every `Err` into `Array::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 src/packages/map_basic.rs:537— `to_json` turns every `Err` into `"ERROR".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 src/packages/string_more.rs:664— `index_of_char_starting_from` turns every `Err` into `-1` — 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 src/packages/string_more.rs:744— `index_of_string_starting_from` turns every `Err` into `-1` — 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.
Orphaned file fuzz/fuzz_targets/scripting.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file fuzz/fuzz_targets/fuzz_serde.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
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 — 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (71198 LoC, 252 module-visible types across 19 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.
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 2 of 120 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 120 of the 210 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: fuzz/fuzz_targets/scripting.rs, fuzz/fuzz_targets/fuzz_serde.rs. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D9 · Test Distribution· Inverted test pyramid · ×1
Inverted test pyramid — Only 29 % of tests are unit tests (201 unit vs 482 integration, 0 BDD); a broader unit base gives faster, more localised feedback.
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 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `codegen`.
Duplicated predicate src/eval/eval_context.rs:397— `native_only && !crate::func::is_anonymous_fn(name)` appears character-identically in 3 files — src/eval/eval_context.rs, src/func/native.rs, src/types/fn_ptr.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.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Cargo manifest — not scanned yet).
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Cargo manifest — not scanned yet).
0
—
Run 01a17fc6-6830-7405-9774-e380149fef81 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 53 · Warnings: 475 · Recommendations: 17 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 27-10-2026 @ 23:51 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.