Public report of foundry-rs/foundry, published 14 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 14 November 2026, 16:37 UTC · Survey ID cd_ae5e71a5fbbc4191a56670cdc33d82a3
foundry-rs/foundry
Measured 14 November 2026, 16:32 UTC, at code version 60e9cf8
CAI scoreAt riskUp 1 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 348,176 lines of product code in 37 projects, tests not counted · Estimated rebuild effort: about 5.1 person-years · Weakest lens: Maturity, 68
Findings by how serious they are
3 critical1562 serious103 minor
18 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 16:32 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
52of 52 dimensions measured by tools.
1639of 1668 findings point to an exact file and line, so you can open each one in the code. The other 29 concern the repository as a whole, such as missing documentation.
52dimensions across 8 lenses, read from 348,176 lines of product code in 37 projects.
foundry-rs/foundry is rated At risk because critical security findings are open, most of them in the packages it uses. Its score is held back in part because the project keeps no record of its design decisions. It scores 71 out of 100, which the At risk rating leaves unchanged.
Maturity, at 68, is the weakest lens by a small margin, and the weakest lens counts most in the score. The best first step is recording design decisions, worth about 3 points. Protecting outgoing calls with timeouts is another step, worth about 2 points.
Two known security holes in the packages the code depends on can be used by attackers. One pipeline step installs packages that can change without warning. Updating the vulnerable packages and pinning what the pipeline installs would close both risks.
The product code is 348,176 lines, about €750,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.
The weakest lenses score close to each other, so improving any of them moves the score.
Code composition: what the lines of code are
Product code 63%Tests 37%
New since the last survey: 429 findings
These 429 critical or serious findings weren't in the previous survey, on 27 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 224 findings
These 224 critical or serious findings were in the previous survey, on 27 October 2026, and are gone from this one. The first 100 are listed here.
€250,000 to €1,200,000, for 4,142 to 13,139 hours of work, about 5.1 person-years for 3 to 10 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×1.0 at a score of 71. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 348,176 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml.
Raises the score by about 3 points · Low effort · ADR Quality
2
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.
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
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 3 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.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 3% to 7% on every change. The history of the code shows how much it changes: about 493,767 lines over the last 90 days, which is about 2,002,500 lines a year. At that pace, the extra work comes to an estimated 144.8 to 868.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
653 modules, with 1201 dependencies between them. 16 loops run through 69 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 613 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.
anvil.eth.backend.db uses foundry_evm_core.fork.block_env, so a change to foundry_evm_core.fork.block_env can break anvil.eth.backend.db, while a change to anvil.eth.backend.db can't break foundry_evm_core.fork.block_env.
Position
Below the diagonal: anvil.eth.backend.db uses a module listed above it, which is the healthy direction.
anvil.eth.backend.mem.monad uses foundry_evm_core.fork.block_env, so a change to foundry_evm_core.fork.block_env can break anvil.eth.backend.mem.monad, while a change to anvil.eth.backend.mem.monad can't break foundry_evm_core.fork.block_env.
Position
Below the diagonal: anvil.eth.backend.mem.monad uses a module listed above it, which is the healthy direction.
anvil.eth.backend.mem.monad uses foundry_evm_hardforks, so a change to foundry_evm_hardforks can break anvil.eth.backend.mem.monad, while a change to anvil.eth.backend.mem.monad can't break foundry_evm_hardforks.
Position
Below the diagonal: anvil.eth.backend.mem.monad uses a module listed above it, which is the healthy direction.
8→16 anvil.eth.backend.mem.monad uses anvil.eth.backend.mempart of a loop✕
Connections
1 pair of types, where a type in anvil.eth.backend.mem.monad uses a type in anvil.eth.backend.mem.
anvil.eth.backend.mem.monad uses anvil.eth.backend.mem, so a change to anvil.eth.backend.mem can break anvil.eth.backend.mem.monad, while a change to anvil.eth.backend.mem.monad can't break anvil.eth.backend.mem.
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.
9→29 foundry_cheatcodes.state uses foundry_cheatcodes.inspectorpart of a loop✕
Connections
1 pair of types, where a type in foundry_cheatcodes.state uses a type in foundry_cheatcodes.inspector.
foundry_cheatcodes.state uses foundry_cheatcodes.inspector, so a change to foundry_cheatcodes.inspector can break foundry_cheatcodes.state, while a change to foundry_cheatcodes.state can't break foundry_cheatcodes.inspector.
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.
foundry_evm_networks uses foundry_evm_hardforks, so a change to foundry_evm_hardforks can break foundry_evm_networks, while a change to foundry_evm_networks can't break foundry_evm_hardforks.
Position
Below the diagonal: foundry_evm_networks uses a module listed above it, which is the healthy direction.
11→20 foundry_evm_symbolic.runtime.memory uses foundry_evm_symbolic.runtime.expr.exprpart of a loop✕
Connections
6 pairs of types, where a type in foundry_evm_symbolic.runtime.memory uses a type in foundry_evm_symbolic.runtime.expr.expr.
foundry_evm_symbolic.runtime.memory uses foundry_evm_symbolic.runtime.expr.expr, so a change to foundry_evm_symbolic.runtime.expr.expr can break foundry_evm_symbolic.runtime.memory, while a change to foundry_evm_symbolic.runtime.memory can't break foundry_evm_symbolic.runtime.expr.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.
11→26 foundry_evm_symbolic.runtime.memory uses foundry_evm_symbolic.runtime.expr.cxpart of a loop✕
Connections
5 pairs of types, where a type in foundry_evm_symbolic.runtime.memory uses a type in foundry_evm_symbolic.runtime.expr.cx.
foundry_evm_symbolic.runtime.memory uses foundry_evm_symbolic.runtime.expr.cx, so a change to foundry_evm_symbolic.runtime.expr.cx can break foundry_evm_symbolic.runtime.memory, while a change to foundry_evm_symbolic.runtime.memory can't break foundry_evm_symbolic.runtime.expr.cx.
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.
11→30 foundry_evm_symbolic.runtime.memory uses foundry_evm_symbolic.runtime.bytespart of a loop✕
Connections
5 pairs of types, where a type in foundry_evm_symbolic.runtime.memory uses a type in foundry_evm_symbolic.runtime.bytes.
foundry_evm_symbolic.runtime.memory uses foundry_evm_symbolic.runtime.bytes, so a change to foundry_evm_symbolic.runtime.bytes can break foundry_evm_symbolic.runtime.memory, while a change to foundry_evm_symbolic.runtime.memory can't break foundry_evm_symbolic.runtime.bytes.
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.
anvil.config uses foundry_evm_core.fork.block_env, so a change to foundry_evm_core.fork.block_env can break anvil.config, while a change to anvil.config can't break foundry_evm_core.fork.block_env.
Position
Below the diagonal: anvil.config uses a module listed above it, which is the healthy direction.
anvil.config uses foundry_evm_hardforks, so a change to foundry_evm_hardforks can break anvil.config, while a change to anvil.config can't break foundry_evm_hardforks.
Position
Below the diagonal: anvil.config uses a module listed above it, which is the healthy direction.
anvil.config uses anvil.eth.backend.db, so a change to anvil.eth.backend.db can break anvil.config, while a change to anvil.config can't break anvil.eth.backend.db.
Position
Below the diagonal: anvil.config uses a module listed above it, which is the healthy direction.
anvil.config uses foundry_evm_networks, so a change to foundry_evm_networks can break anvil.config, while a change to anvil.config can't break foundry_evm_networks.
Position
Below the diagonal: anvil.config uses a module listed above it, which is the healthy direction.
foundry_config uses foundry_config.lint, so a change to foundry_config.lint can break foundry_config, while a change to foundry_config can't break foundry_config.lint.
Position
Below the diagonal: foundry_config uses a module listed above it, which is the healthy direction.
foundry_config uses foundry_evm_hardforks, so a change to foundry_evm_hardforks can break foundry_config, while a change to foundry_config can't break foundry_evm_hardforks.
Position
Below the diagonal: foundry_config uses a module listed above it, which is the healthy direction.
foundry_config uses foundry_evm_networks, so a change to foundry_evm_networks can break foundry_config, while a change to foundry_config can't break foundry_evm_networks.
Position
Below the diagonal: foundry_config uses a module listed above it, which is the healthy direction.
foundry_evm_symbolic.runtime.state uses foundry_evm_symbolic.runtime.memory, so a change to foundry_evm_symbolic.runtime.memory can break foundry_evm_symbolic.runtime.state, while a change to foundry_evm_symbolic.runtime.state can't break foundry_evm_symbolic.runtime.memory.
Position
Below the diagonal: foundry_evm_symbolic.runtime.state uses a module listed above it, which is the healthy direction.
14→20 foundry_evm_symbolic.runtime.state uses foundry_evm_symbolic.runtime.expr.exprpart of a loop✕
Connections
17 pairs of types, where a type in foundry_evm_symbolic.runtime.state uses a type in foundry_evm_symbolic.runtime.expr.expr.
foundry_evm_symbolic.runtime.state uses foundry_evm_symbolic.runtime.expr.expr, so a change to foundry_evm_symbolic.runtime.expr.expr can break foundry_evm_symbolic.runtime.state, while a change to foundry_evm_symbolic.runtime.state can't break foundry_evm_symbolic.runtime.expr.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.
14→26 foundry_evm_symbolic.runtime.state uses foundry_evm_symbolic.runtime.expr.cxpart of a loop✕
Connections
14 pairs of types, where a type in foundry_evm_symbolic.runtime.state uses a type in foundry_evm_symbolic.runtime.expr.cx.
foundry_evm_symbolic.runtime.state uses foundry_evm_symbolic.runtime.expr.cx, so a change to foundry_evm_symbolic.runtime.expr.cx can break foundry_evm_symbolic.runtime.state, while a change to foundry_evm_symbolic.runtime.state can't break foundry_evm_symbolic.runtime.expr.cx.
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→28 foundry_evm_symbolic.runtime.state uses foundry_evm_symbolic.runtime.expr.boolpart of a loop✕
Connections
9 pairs of types, where a type in foundry_evm_symbolic.runtime.state uses a type in foundry_evm_symbolic.runtime.expr.bool.
foundry_evm_symbolic.runtime.state uses foundry_evm_symbolic.runtime.expr.bool, so a change to foundry_evm_symbolic.runtime.expr.bool can break foundry_evm_symbolic.runtime.state, while a change to foundry_evm_symbolic.runtime.state can't break foundry_evm_symbolic.runtime.expr.bool.
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 foundry_evm_symbolic.runtime.state uses foundry_evm_symbolic.runtime.bytespart of a loop✕
Connections
5 pairs of types, where a type in foundry_evm_symbolic.runtime.state uses a type in foundry_evm_symbolic.runtime.bytes.
foundry_evm_symbolic.runtime.state uses foundry_evm_symbolic.runtime.bytes, so a change to foundry_evm_symbolic.runtime.bytes can break foundry_evm_symbolic.runtime.state, while a change to foundry_evm_symbolic.runtime.state can't break foundry_evm_symbolic.runtime.bytes.
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.
foundry_evm_traces.decoder uses foundry_common.contracts, so a change to foundry_common.contracts can break foundry_evm_traces.decoder, while a change to foundry_evm_traces.decoder can't break foundry_common.contracts.
Position
Below the diagonal: foundry_evm_traces.decoder uses a module listed above it, which is the healthy direction.
foundry_evm_traces.decoder uses foundry_evm_hardforks, so a change to foundry_evm_hardforks can break foundry_evm_traces.decoder, while a change to foundry_evm_traces.decoder can't break foundry_evm_hardforks.
Position
Below the diagonal: foundry_evm_traces.decoder uses a module listed above it, which is the healthy direction.
foundry_evm_traces.decoder uses foundry_evm_networks, so a change to foundry_evm_networks can break foundry_evm_traces.decoder, while a change to foundry_evm_traces.decoder can't break foundry_evm_networks.
Position
Below the diagonal: foundry_evm_traces.decoder uses a module listed above it, which is the healthy direction.
anvil.eth.backend.mem uses foundry_evm_core.fork.block_env, so a change to foundry_evm_core.fork.block_env can break anvil.eth.backend.mem, while a change to anvil.eth.backend.mem can't break foundry_evm_core.fork.block_env.
Position
Below the diagonal: anvil.eth.backend.mem uses a module listed above it, which is the healthy direction.
anvil.eth.backend.mem uses foundry_evm_hardforks, so a change to foundry_evm_hardforks can break anvil.eth.backend.mem, while a change to anvil.eth.backend.mem can't break foundry_evm_hardforks.
Position
Below the diagonal: anvil.eth.backend.mem uses a module listed above it, which is the healthy direction.
anvil.eth.backend.mem uses anvil.eth.backend.db, so a change to anvil.eth.backend.db can break anvil.eth.backend.mem, while a change to anvil.eth.backend.mem can't break anvil.eth.backend.db.
Position
Below the diagonal: anvil.eth.backend.mem uses a module listed above it, which is the healthy direction.
anvil.eth.backend.mem uses anvil.eth.backend.mem.monad, so a change to anvil.eth.backend.mem.monad can break anvil.eth.backend.mem, while a change to anvil.eth.backend.mem can't break anvil.eth.backend.mem.monad.
Position
Below the diagonal: anvil.eth.backend.mem uses a module listed above it, which is the healthy direction.
anvil.eth.backend.mem uses foundry_evm_networks, so a change to foundry_evm_networks can break anvil.eth.backend.mem, while a change to anvil.eth.backend.mem can't break foundry_evm_networks.
Position
Below the diagonal: anvil.eth.backend.mem uses a module listed above it, which is the healthy direction.
anvil.eth.backend.mem uses anvil.config, so a change to anvil.config can break anvil.eth.backend.mem, while a change to anvil.eth.backend.mem can't break anvil.config.
Position
Below the diagonal: anvil.eth.backend.mem uses a module listed above it, which is the healthy direction.
anvil.eth.backend.mem uses foundry_evm_traces.decoder, so a change to foundry_evm_traces.decoder can break anvil.eth.backend.mem, while a change to anvil.eth.backend.mem can't break foundry_evm_traces.decoder.
Position
Below the diagonal: anvil.eth.backend.mem uses a module listed above it, which is the healthy direction.
foundry_cli.opts.build.core uses foundry_config, so a change to foundry_config can break foundry_cli.opts.build.core, while a change to foundry_cli.opts.build.core can't break foundry_config.
Position
Below the diagonal: foundry_cli.opts.build.core uses a module listed above it, which is the healthy direction.
foundry_cli.opts.rpc uses foundry_config, so a change to foundry_config can break foundry_cli.opts.rpc, while a change to foundry_cli.opts.rpc can't break foundry_config.
Position
Below the diagonal: foundry_cli.opts.rpc uses a module listed above it, which is the healthy direction.
foundry_evm_core.opts uses foundry_evm_hardforks, so a change to foundry_evm_hardforks can break foundry_evm_core.opts, while a change to foundry_evm_core.opts can't break foundry_evm_hardforks.
Position
Below the diagonal: foundry_evm_core.opts uses a module listed above it, which is the healthy direction.
foundry_evm_core.opts uses foundry_evm_networks, so a change to foundry_evm_networks can break foundry_evm_core.opts, while a change to foundry_evm_core.opts can't break foundry_evm_networks.
Position
Below the diagonal: foundry_evm_core.opts uses a module listed above it, which is the healthy direction.
foundry_evm_core.opts uses foundry_config, so a change to foundry_config can break foundry_evm_core.opts, while a change to foundry_evm_core.opts can't break foundry_config.
Position
Below the diagonal: foundry_evm_core.opts uses a module listed above it, which is the healthy direction.
foundry_evm_symbolic.runtime.expr.expr uses foundry_evm_symbolic.runtime.memory, so a change to foundry_evm_symbolic.runtime.memory can break foundry_evm_symbolic.runtime.expr.expr, while a change to foundry_evm_symbolic.runtime.expr.expr can't break foundry_evm_symbolic.runtime.memory.
Position
Below the diagonal: foundry_evm_symbolic.runtime.expr.expr uses a module listed above it, which is the healthy direction.
foundry_evm_symbolic.runtime.expr.expr uses foundry_evm_symbolic.runtime.state, so a change to foundry_evm_symbolic.runtime.state can break foundry_evm_symbolic.runtime.expr.expr, while a change to foundry_evm_symbolic.runtime.expr.expr can't break foundry_evm_symbolic.runtime.state.
Position
Below the diagonal: foundry_evm_symbolic.runtime.expr.expr uses a module listed above it, which is the healthy direction.
20→26 foundry_evm_symbolic.runtime.expr.expr uses foundry_evm_symbolic.runtime.expr.cxpart of a loop✕
Connections
2 pairs of types, where a type in foundry_evm_symbolic.runtime.expr.expr uses a type in foundry_evm_symbolic.runtime.expr.cx.
foundry_evm_symbolic.runtime.expr.expr uses foundry_evm_symbolic.runtime.expr.cx, so a change to foundry_evm_symbolic.runtime.expr.cx can break foundry_evm_symbolic.runtime.expr.expr, while a change to foundry_evm_symbolic.runtime.expr.expr can't break foundry_evm_symbolic.runtime.expr.cx.
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→28 foundry_evm_symbolic.runtime.expr.expr uses foundry_evm_symbolic.runtime.expr.boolpart of a loop✕
Connections
3 pairs of types, where a type in foundry_evm_symbolic.runtime.expr.expr uses a type in foundry_evm_symbolic.runtime.expr.bool.
foundry_evm_symbolic.runtime.expr.expr uses foundry_evm_symbolic.runtime.expr.bool, so a change to foundry_evm_symbolic.runtime.expr.bool can break foundry_evm_symbolic.runtime.expr.expr, while a change to foundry_evm_symbolic.runtime.expr.expr can't break foundry_evm_symbolic.runtime.expr.bool.
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→30 foundry_evm_symbolic.runtime.expr.expr uses foundry_evm_symbolic.runtime.bytespart of a loop✕
Connections
1 pair of types, where a type in foundry_evm_symbolic.runtime.expr.expr uses a type in foundry_evm_symbolic.runtime.bytes.
foundry_evm_symbolic.runtime.expr.expr uses foundry_evm_symbolic.runtime.bytes, so a change to foundry_evm_symbolic.runtime.bytes can break foundry_evm_symbolic.runtime.expr.expr, while a change to foundry_evm_symbolic.runtime.expr.expr can't break foundry_evm_symbolic.runtime.bytes.
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.
foundry_evm_traces uses foundry_common.contracts, so a change to foundry_common.contracts can break foundry_evm_traces, while a change to foundry_evm_traces can't break foundry_common.contracts.
Position
Below the diagonal: foundry_evm_traces uses a module listed above it, which is the healthy direction.
foundry_evm_traces uses foundry_evm_hardforks, so a change to foundry_evm_hardforks can break foundry_evm_traces, while a change to foundry_evm_traces can't break foundry_evm_hardforks.
Position
Below the diagonal: foundry_evm_traces uses a module listed above it, which is the healthy direction.
foundry_evm_traces uses foundry_evm_networks, so a change to foundry_evm_networks can break foundry_evm_traces, while a change to foundry_evm_traces can't break foundry_evm_networks.
Position
Below the diagonal: foundry_evm_traces uses a module listed above it, which is the healthy direction.
foundry_evm_traces uses foundry_config, so a change to foundry_config can break foundry_evm_traces, while a change to foundry_evm_traces can't break foundry_config.
Position
Below the diagonal: foundry_evm_traces uses a module listed above it, which is the healthy direction.
foundry_evm_traces uses foundry_evm_traces.decoder, so a change to foundry_evm_traces.decoder can break foundry_evm_traces, while a change to foundry_evm_traces can't break foundry_evm_traces.decoder.
Position
Below the diagonal: foundry_evm_traces uses a module listed above it, which is the healthy direction.
anvil.eth.api uses foundry_evm_core.fork.block_env, so a change to foundry_evm_core.fork.block_env can break anvil.eth.api, while a change to anvil.eth.api can't break foundry_evm_core.fork.block_env.
Position
Below the diagonal: anvil.eth.api uses a module listed above it, which is the healthy direction.
anvil.eth.api uses anvil.eth.backend.mem, so a change to anvil.eth.backend.mem can break anvil.eth.api, while a change to anvil.eth.api can't break anvil.eth.backend.mem.
Position
Below the diagonal: anvil.eth.api uses a module listed above it, which is the healthy direction.
cast.tx uses foundry_cli.opts.transaction, so a change to foundry_cli.opts.transaction can break cast.tx, while a change to cast.tx can't break foundry_cli.opts.transaction.
Position
Below the diagonal: cast.tx uses a module listed above it, which is the healthy direction.
forge_verify.verify uses foundry_config, so a change to foundry_config can break forge_verify.verify, while a change to forge_verify.verify can't break foundry_config.
Position
Below the diagonal: forge_verify.verify uses a module listed above it, which is the healthy direction.
forge_verify.verify uses foundry_cli.opts.rpc, so a change to foundry_cli.opts.rpc can break forge_verify.verify, while a change to forge_verify.verify can't break foundry_cli.opts.rpc.
Position
Below the diagonal: forge_verify.verify uses a module listed above it, which is the healthy direction.
foundry_evm_core.backend uses foundry_evm_networks, so a change to foundry_evm_networks can break foundry_evm_core.backend, while a change to foundry_evm_core.backend can't break foundry_evm_networks.
Position
Below the diagonal: foundry_evm_core.backend uses a module listed above it, which is the healthy direction.
foundry_evm_core.backend uses foundry_evm_core.opts, so a change to foundry_evm_core.opts can break foundry_evm_core.backend, while a change to foundry_evm_core.backend can't break foundry_evm_core.opts.
Position
Below the diagonal: foundry_evm_core.backend uses a module listed above it, which is the healthy direction.
foundry_evm_symbolic.runtime.expr.cx uses foundry_evm_symbolic.runtime.expr.expr, so a change to foundry_evm_symbolic.runtime.expr.expr can break foundry_evm_symbolic.runtime.expr.cx, while a change to foundry_evm_symbolic.runtime.expr.cx can't break foundry_evm_symbolic.runtime.expr.expr.
Position
Below the diagonal: foundry_evm_symbolic.runtime.expr.cx uses a module listed above it, which is the healthy direction.
26→28 foundry_evm_symbolic.runtime.expr.cx uses foundry_evm_symbolic.runtime.expr.boolpart of a loop✕
Connections
3 pairs of types, where a type in foundry_evm_symbolic.runtime.expr.cx uses a type in foundry_evm_symbolic.runtime.expr.bool.
foundry_evm_symbolic.runtime.expr.cx uses foundry_evm_symbolic.runtime.expr.bool, so a change to foundry_evm_symbolic.runtime.expr.bool can break foundry_evm_symbolic.runtime.expr.cx, while a change to foundry_evm_symbolic.runtime.expr.cx can't break foundry_evm_symbolic.runtime.expr.bool.
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→30 foundry_evm_symbolic.runtime.expr.cx uses foundry_evm_symbolic.runtime.bytespart of a loop✕
Connections
3 pairs of types, where a type in foundry_evm_symbolic.runtime.expr.cx uses a type in foundry_evm_symbolic.runtime.bytes.
foundry_evm_symbolic.runtime.expr.cx uses foundry_evm_symbolic.runtime.bytes, so a change to foundry_evm_symbolic.runtime.bytes can break foundry_evm_symbolic.runtime.expr.cx, while a change to foundry_evm_symbolic.runtime.expr.cx can't break foundry_evm_symbolic.runtime.bytes.
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.
foundry_cheatcodes uses foundry_cheatcodes.state, so a change to foundry_cheatcodes.state can break foundry_cheatcodes, while a change to foundry_cheatcodes can't break foundry_cheatcodes.state.
Position
Below the diagonal: foundry_cheatcodes uses a module listed above it, which is the healthy direction.
foundry_cheatcodes uses foundry_evm_core.backend, so a change to foundry_evm_core.backend can break foundry_cheatcodes, while a change to foundry_cheatcodes can't break foundry_evm_core.backend.
Position
Below the diagonal: foundry_cheatcodes uses a module listed above it, which is the healthy direction.
27→29 foundry_cheatcodes uses foundry_cheatcodes.inspectorpart of a loop✕
Connections
1 pair of types, where a type in foundry_cheatcodes uses a type in foundry_cheatcodes.inspector.
foundry_cheatcodes uses foundry_cheatcodes.inspector, so a change to foundry_cheatcodes.inspector can break foundry_cheatcodes, while a change to foundry_cheatcodes can't break foundry_cheatcodes.inspector.
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.
foundry_evm_symbolic.runtime.expr.bool uses foundry_evm_symbolic.runtime.expr.expr, so a change to foundry_evm_symbolic.runtime.expr.expr can break foundry_evm_symbolic.runtime.expr.bool, while a change to foundry_evm_symbolic.runtime.expr.bool can't break foundry_evm_symbolic.runtime.expr.expr.
Position
Below the diagonal: foundry_evm_symbolic.runtime.expr.bool uses a module listed above it, which is the healthy direction.
foundry_evm_symbolic.runtime.expr.bool uses foundry_evm_symbolic.runtime.expr.cx, so a change to foundry_evm_symbolic.runtime.expr.cx can break foundry_evm_symbolic.runtime.expr.bool, while a change to foundry_evm_symbolic.runtime.expr.bool can't break foundry_evm_symbolic.runtime.expr.cx.
Position
Below the diagonal: foundry_evm_symbolic.runtime.expr.bool uses a module listed above it, which is the healthy direction.
foundry_cheatcodes.inspector uses foundry_cheatcodes.state, so a change to foundry_cheatcodes.state can break foundry_cheatcodes.inspector, while a change to foundry_cheatcodes.inspector can't break foundry_cheatcodes.state.
Position
Below the diagonal: foundry_cheatcodes.inspector uses a module listed above it, which is the healthy direction.
foundry_cheatcodes.inspector uses foundry_cheatcodes, so a change to foundry_cheatcodes can break foundry_cheatcodes.inspector, while a change to foundry_cheatcodes.inspector can't break foundry_cheatcodes.
Position
Below the diagonal: foundry_cheatcodes.inspector uses a module listed above it, which is the healthy direction.
foundry_evm_symbolic.runtime.bytes uses foundry_evm_symbolic.runtime.expr.expr, so a change to foundry_evm_symbolic.runtime.expr.expr can break foundry_evm_symbolic.runtime.bytes, while a change to foundry_evm_symbolic.runtime.bytes can't break foundry_evm_symbolic.runtime.expr.expr.
Position
Below the diagonal: foundry_evm_symbolic.runtime.bytes uses a module listed above it, which is the healthy direction.
foundry_evm_symbolic.runtime.bytes uses foundry_evm_symbolic.runtime.expr.cx, so a change to foundry_evm_symbolic.runtime.expr.cx can break foundry_evm_symbolic.runtime.bytes, while a change to foundry_evm_symbolic.runtime.bytes can't break foundry_evm_symbolic.runtime.expr.cx.
Position
Below the diagonal: foundry_evm_symbolic.runtime.bytes uses a module listed above it, which is the healthy direction.
foundry_evm_symbolic.runtime.bytes uses foundry_evm_symbolic.runtime.expr.bool, so a change to foundry_evm_symbolic.runtime.expr.bool can break foundry_evm_symbolic.runtime.bytes, while a change to foundry_evm_symbolic.runtime.bytes can't break foundry_evm_symbolic.runtime.expr.bool.
Position
Below the diagonal: foundry_evm_symbolic.runtime.bytes uses a module listed above it, which is the healthy direction.
foundry_evm.inspectors.stack uses foundry_evm_coverage, so a change to foundry_evm_coverage can break foundry_evm.inspectors.stack, while a change to foundry_evm.inspectors.stack can't break foundry_evm_coverage.
Position
Below the diagonal: foundry_evm.inspectors.stack uses a module listed above it, which is the healthy direction.
foundry_evm.inspectors.stack uses foundry_evm_traces, so a change to foundry_evm_traces can break foundry_evm.inspectors.stack, while a change to foundry_evm.inspectors.stack can't break foundry_evm_traces.
Position
Below the diagonal: foundry_evm.inspectors.stack uses a module listed above it, which is the healthy direction.
foundry_evm.inspectors.stack uses foundry_cheatcodes.inspector, so a change to foundry_cheatcodes.inspector can break foundry_evm.inspectors.stack, while a change to foundry_evm.inspectors.stack can't break foundry_cheatcodes.inspector.
Position
Below the diagonal: foundry_evm.inspectors.stack uses a module listed above it, which is the healthy direction.
31→33 foundry_evm.inspectors.stack uses foundry_evm.executorspart of a loop✕
Connections
3 pairs of types, where a type in foundry_evm.inspectors.stack uses a type in foundry_evm.executors.
foundry_evm.inspectors.stack uses foundry_evm.executors, so a change to foundry_evm.executors can break foundry_evm.inspectors.stack, while a change to foundry_evm.inspectors.stack can't break foundry_evm.executors.
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.
foundry_evm_symbolic uses foundry_evm_symbolic.runtime.memory, so a change to foundry_evm_symbolic.runtime.memory can break foundry_evm_symbolic, while a change to foundry_evm_symbolic can't break foundry_evm_symbolic.runtime.memory.
Position
Below the diagonal: foundry_evm_symbolic uses a module listed above it, which is the healthy direction.
foundry_evm_symbolic uses foundry_evm_symbolic.runtime.state, so a change to foundry_evm_symbolic.runtime.state can break foundry_evm_symbolic, while a change to foundry_evm_symbolic can't break foundry_evm_symbolic.runtime.state.
Position
Below the diagonal: foundry_evm_symbolic uses a module listed above it, which is the healthy direction.
foundry_evm_symbolic uses foundry_evm_symbolic.runtime.expr.expr, so a change to foundry_evm_symbolic.runtime.expr.expr can break foundry_evm_symbolic, while a change to foundry_evm_symbolic can't break foundry_evm_symbolic.runtime.expr.expr.
Position
Below the diagonal: foundry_evm_symbolic uses a module listed above it, which is the healthy direction.
foundry_evm_symbolic uses foundry_evm_symbolic.runtime.expr.cx, so a change to foundry_evm_symbolic.runtime.expr.cx can break foundry_evm_symbolic, while a change to foundry_evm_symbolic can't break foundry_evm_symbolic.runtime.expr.cx.
Position
Below the diagonal: foundry_evm_symbolic uses a module listed above it, which is the healthy direction.
foundry_evm_symbolic uses foundry_evm_symbolic.runtime.expr.bool, so a change to foundry_evm_symbolic.runtime.expr.bool can break foundry_evm_symbolic, while a change to foundry_evm_symbolic can't break foundry_evm_symbolic.runtime.expr.bool.
Position
Below the diagonal: foundry_evm_symbolic uses a module listed above it, which is the healthy direction.
foundry_evm_symbolic uses foundry_evm_symbolic.runtime.bytes, so a change to foundry_evm_symbolic.runtime.bytes can break foundry_evm_symbolic, while a change to foundry_evm_symbolic can't break foundry_evm_symbolic.runtime.bytes.
Position
Below the diagonal: foundry_evm_symbolic uses a module listed above it, which is the healthy direction.
foundry_evm.executors uses foundry_evm_coverage, so a change to foundry_evm_coverage can break foundry_evm.executors, while a change to foundry_evm.executors can't break foundry_evm_coverage.
Position
Below the diagonal: foundry_evm.executors uses a module listed above it, which is the healthy direction.
foundry_evm.executors uses foundry_evm_networks, so a change to foundry_evm_networks can break foundry_evm.executors, while a change to foundry_evm.executors can't break foundry_evm_networks.
Position
Below the diagonal: foundry_evm.executors uses a module listed above it, which is the healthy direction.
foundry_evm.executors uses foundry_evm_traces, so a change to foundry_evm_traces can break foundry_evm.executors, while a change to foundry_evm.executors can't break foundry_evm_traces.
Position
Below the diagonal: foundry_evm.executors uses a module listed above it, which is the healthy direction.
foundry_evm.executors uses foundry_evm_core.backend, so a change to foundry_evm_core.backend can break foundry_evm.executors, while a change to foundry_evm.executors can't break foundry_evm_core.backend.
Position
Below the diagonal: foundry_evm.executors uses a module listed above it, which is the healthy direction.
foundry_evm.executors uses foundry_evm.inspectors.stack, so a change to foundry_evm.inspectors.stack can break foundry_evm.executors, while a change to foundry_evm.executors can't break foundry_evm.inspectors.stack.
Position
Below the diagonal: foundry_evm.executors uses a module listed above it, which is the healthy direction.
forge.result uses foundry_common.contracts, so a change to foundry_common.contracts can break forge.result, while a change to forge.result can't break foundry_common.contracts.
Position
Below the diagonal: forge.result uses a module listed above it, which is the healthy direction.
forge.result uses foundry_evm_coverage, so a change to foundry_evm_coverage can break forge.result, while a change to forge.result can't break foundry_evm_coverage.
Position
Below the diagonal: forge.result uses a module listed above it, which is the healthy direction.
forge.result uses foundry_evm_traces.decoder, so a change to foundry_evm_traces.decoder can break forge.result, while a change to forge.result can't break foundry_evm_traces.decoder.
Position
Below the diagonal: forge.result uses a module listed above it, which is the healthy direction.
forge.result uses foundry_evm_traces, so a change to foundry_evm_traces can break forge.result, while a change to forge.result can't break foundry_evm_traces.
Position
Below the diagonal: forge.result uses a module listed above it, which is the healthy direction.
forge.result uses foundry_evm_symbolic, so a change to foundry_evm_symbolic can break forge.result, while a change to forge.result can't break foundry_evm_symbolic.
Position
Below the diagonal: forge.result uses a module listed above it, which is the healthy direction.
forge.result uses foundry_evm.executors, so a change to foundry_evm.executors can break forge.result, while a change to forge.result can't break foundry_evm.executors.
Position
Below the diagonal: forge.result uses a module listed above it, which is the healthy direction.
foundry_evm.executors.builder uses foundry_evm_networks, so a change to foundry_evm_networks can break foundry_evm.executors.builder, while a change to foundry_evm.executors.builder can't break foundry_evm_networks.
Position
Below the diagonal: foundry_evm.executors.builder uses a module listed above it, which is the healthy direction.
foundry_evm.executors.builder uses foundry_evm_core.backend, so a change to foundry_evm_core.backend can break foundry_evm.executors.builder, while a change to foundry_evm.executors.builder can't break foundry_evm_core.backend.
Position
Below the diagonal: foundry_evm.executors.builder uses a module listed above it, which is the healthy direction.
foundry_evm.executors.builder uses foundry_evm.inspectors.stack, so a change to foundry_evm.inspectors.stack can break foundry_evm.executors.builder, while a change to foundry_evm.executors.builder can't break foundry_evm.inspectors.stack.
Position
Below the diagonal: foundry_evm.executors.builder uses a module listed above it, which is the healthy direction.
foundry_evm.executors.builder uses foundry_evm.executors, so a change to foundry_evm.executors can break foundry_evm.executors.builder, while a change to foundry_evm.executors.builder can't break foundry_evm.executors.
Position
Below the diagonal: foundry_evm.executors.builder uses a module listed above it, which is the healthy direction.
foundry_evm.executors.invariant uses foundry_common.contracts, so a change to foundry_common.contracts can break foundry_evm.executors.invariant, while a change to foundry_evm.executors.invariant can't break foundry_common.contracts.
Position
Below the diagonal: foundry_evm.executors.invariant uses a module listed above it, which is the healthy direction.
foundry_evm.executors.invariant uses foundry_evm_coverage, so a change to foundry_evm_coverage can break foundry_evm.executors.invariant, while a change to foundry_evm.executors.invariant can't break foundry_evm_coverage.
Position
Below the diagonal: foundry_evm.executors.invariant uses a module listed above it, which is the healthy direction.
foundry_evm.executors.invariant uses foundry_evm_traces, so a change to foundry_evm_traces can break foundry_evm.executors.invariant, while a change to foundry_evm.executors.invariant can't break foundry_evm_traces.
Position
Below the diagonal: foundry_evm.executors.invariant uses a module listed above it, which is the healthy direction.
foundry_evm.executors.invariant uses foundry_evm.executors, so a change to foundry_evm.executors can break foundry_evm.executors.invariant, while a change to foundry_evm.executors.invariant can't break foundry_evm.executors.
Position
Below the diagonal: foundry_evm.executors.invariant uses a module listed above it, which is the healthy direction.
forge.runner uses foundry_evm_networks, so a change to foundry_evm_networks can break forge.runner, while a change to forge.runner can't break foundry_evm_networks.
Position
Below the diagonal: forge.runner uses a module listed above it, which is the healthy direction.
forge.runner uses foundry_evm_symbolic, so a change to foundry_evm_symbolic can break forge.runner, while a change to forge.runner can't break foundry_evm_symbolic.
Position
Below the diagonal: forge.runner uses a module listed above it, which is the healthy direction.
forge.runner uses foundry_evm.executors, so a change to foundry_evm.executors can break forge.runner, while a change to forge.runner can't break foundry_evm.executors.
Position
Below the diagonal: forge.runner uses a module listed above it, which is the healthy direction.
forge.runner uses forge.multi_runner, so a change to forge.multi_runner can break forge.runner, while a change to forge.runner can't break forge.multi_runner.
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.
forge_script uses foundry_common.contracts, so a change to foundry_common.contracts can break forge_script, while a change to forge_script can't break foundry_common.contracts.
Position
Below the diagonal: forge_script uses a module listed above it, which is the healthy direction.
forge_script uses foundry_evm_hardforks, so a change to foundry_evm_hardforks can break forge_script, while a change to forge_script can't break foundry_evm_hardforks.
Position
Below the diagonal: forge_script uses a module listed above it, which is the healthy direction.
forge_script uses foundry_evm_networks, so a change to foundry_evm_networks can break forge_script, while a change to forge_script can't break foundry_evm_networks.
Position
Below the diagonal: forge_script uses a module listed above it, which is the healthy direction.
forge_script uses foundry_cli.opts.build.core, so a change to foundry_cli.opts.build.core can break forge_script, while a change to forge_script can't break foundry_cli.opts.build.core.
Position
Below the diagonal: forge_script uses a module listed above it, which is the healthy direction.
forge_script uses foundry_evm_core.opts, so a change to foundry_evm_core.opts can break forge_script, while a change to forge_script can't break foundry_evm_core.opts.
Position
Below the diagonal: forge_script uses a module listed above it, which is the healthy direction.
forge_script uses foundry_evm_traces, so a change to foundry_evm_traces can break forge_script, while a change to forge_script can't break foundry_evm_traces.
Position
Below the diagonal: forge_script uses a module listed above it, which is the healthy direction.
forge_script uses forge_verify.verify, so a change to forge_verify.verify can break forge_script, while a change to forge_script can't break forge_verify.verify.
Position
Below the diagonal: forge_script uses a module listed above it, which is the healthy direction.
forge_script uses foundry_evm_core.backend, so a change to foundry_evm_core.backend can break forge_script, while a change to forge_script can't break foundry_evm_core.backend.
Position
Below the diagonal: forge_script uses a module listed above it, which is the healthy direction.
forge_script uses foundry_evm.executors.builder, so a change to foundry_evm.executors.builder can break forge_script, while a change to forge_script can't break foundry_evm.executors.builder.
Position
Below the diagonal: forge_script uses a module listed above it, which is the healthy direction.
forge_verify.bytecode uses foundry_evm_networks, so a change to foundry_evm_networks can break forge_verify.bytecode, while a change to forge_verify.bytecode can't break foundry_evm_networks.
Position
Below the diagonal: forge_verify.bytecode uses a module listed above it, which is the healthy direction.
forge_verify.bytecode uses foundry_config, so a change to foundry_config can break forge_verify.bytecode, while a change to forge_verify.bytecode can't break foundry_config.
Position
Below the diagonal: forge_verify.bytecode uses a module listed above it, which is the healthy direction.
forge_verify.bytecode uses foundry_cli.opts.rpc, so a change to foundry_cli.opts.rpc can break forge_verify.bytecode, while a change to forge_verify.bytecode can't break foundry_cli.opts.rpc.
Position
Below the diagonal: forge_verify.bytecode uses a module listed above it, which is the healthy direction.
forge_verify.bytecode uses foundry_evm_core.opts, so a change to foundry_evm_core.opts can break forge_verify.bytecode, while a change to forge_verify.bytecode can't break foundry_evm_core.opts.
Position
Below the diagonal: forge_verify.bytecode uses a module listed above it, which is the healthy direction.
forge_verify.bytecode uses forge_verify.verify, so a change to forge_verify.verify can break forge_verify.bytecode, while a change to forge_verify.bytecode can't break forge_verify.verify.
Position
Below the diagonal: forge_verify.bytecode uses a module listed above it, which is the healthy direction.
forge_verify.bytecode uses foundry_evm.executors, so a change to foundry_evm.executors can break forge_verify.bytecode, while a change to forge_verify.bytecode can't break foundry_evm.executors.
Position
Below the diagonal: forge_verify.bytecode uses a module listed above it, which is the healthy direction.
forge_verify.bytecode uses foundry_evm.executors.builder, so a change to foundry_evm.executors.builder can break forge_verify.bytecode, while a change to forge_verify.bytecode can't break foundry_evm.executors.builder.
Position
Below the diagonal: forge_verify.bytecode uses a module listed above it, which is the healthy direction.
forge.multi_runner uses foundry_common.contracts, so a change to foundry_common.contracts can break forge.multi_runner, while a change to forge.multi_runner can't break foundry_common.contracts.
Position
Below the diagonal: forge.multi_runner uses a module listed above it, which is the healthy direction.
forge.multi_runner uses foundry_evm_hardforks, so a change to foundry_evm_hardforks can break forge.multi_runner, while a change to forge.multi_runner can't break foundry_evm_hardforks.
Position
Below the diagonal: forge.multi_runner uses a module listed above it, which is the healthy direction.
forge.multi_runner uses foundry_evm_networks, so a change to foundry_evm_networks can break forge.multi_runner, while a change to forge.multi_runner can't break foundry_evm_networks.
Position
Below the diagonal: forge.multi_runner uses a module listed above it, which is the healthy direction.
forge.multi_runner uses foundry_config, so a change to foundry_config can break forge.multi_runner, while a change to forge.multi_runner can't break foundry_config.
Position
Below the diagonal: forge.multi_runner uses a module listed above it, which is the healthy direction.
forge.multi_runner uses foundry_evm_core.opts, so a change to foundry_evm_core.opts can break forge.multi_runner, while a change to forge.multi_runner can't break foundry_evm_core.opts.
Position
Below the diagonal: forge.multi_runner uses a module listed above it, which is the healthy direction.
forge.multi_runner uses foundry_evm_traces, so a change to foundry_evm_traces can break forge.multi_runner, while a change to forge.multi_runner can't break foundry_evm_traces.
Position
Below the diagonal: forge.multi_runner uses a module listed above it, which is the healthy direction.
forge.multi_runner uses foundry_evm_core.backend, so a change to foundry_evm_core.backend can break forge.multi_runner, while a change to forge.multi_runner can't break foundry_evm_core.backend.
Position
Below the diagonal: forge.multi_runner uses a module listed above it, which is the healthy direction.
forge.multi_runner uses foundry_evm.executors, so a change to foundry_evm.executors can break forge.multi_runner, while a change to forge.multi_runner can't break foundry_evm.executors.
Position
Below the diagonal: forge.multi_runner uses a module listed above it, which is the healthy direction.
forge.multi_runner uses forge.result, so a change to forge.result can break forge.multi_runner, while a change to forge.multi_runner can't break forge.result.
Position
Below the diagonal: forge.multi_runner uses a module listed above it, which is the healthy direction.
forge.multi_runner uses foundry_evm.executors.builder, so a change to foundry_evm.executors.builder can break forge.multi_runner, while a change to forge.multi_runner can't break foundry_evm.executors.builder.
Position
Below the diagonal: forge.multi_runner uses a module listed above it, which is the healthy direction.
forge.multi_runner uses forge.runner, so a change to forge.runner can break forge.multi_runner, while a change to forge.multi_runner can't break forge.runner.
Position
Below the diagonal: forge.multi_runner uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 71% · Adequate · gated by 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
A03:2025 — Software Supply Chain Failures
25
High / Critical
A05:2025 — Injection
7
High / Critical
A02:2025 — Security Misconfiguration
1
Medium
Roadmap
Top priorities: Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml; 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; Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
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 — start with Cargo.toml.
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.
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
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 — 3
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 — 1562
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 — 103
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 18
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 52 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 52 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1639 of 1668 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D4 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 185 duplicated block group(s) on this row were found in the languages this pass could tokenize, and they do NOT cover all of this repository's production source: .sol (66,623 lines, 16% of production source) went unread, because no language model this pass could load exposed a clone-unit token stream for those file kinds. Duplication in that source is UNMEASURED — its absence from the count above is a gap in this analyzer's language coverage, not a finding that the code is free of duplication.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: this repository's production source spans .rs, and our analyzer cannot run the .rs test suite(s) — so no coverage was collected for the repository as a whole. The JavaScript/TypeScript half did build and run, and its own line coverage came back at 98.2% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero.
D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 10 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 236 test source file(s) (.rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .rs, and the rust executor ran against the .rs half and never executed — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (node:test via `npm ci --ignore-scripts` in editors/vscode/ (10 tests)): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D26 Project Cohesion — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Project size and spread are measured over build units whose source a code model reads. This repository's .sol source is a material share of its production lines and was read by none, so the score is a verdict about the units that were read. Not a finding that the unread source is cohesive — it is unmeasured.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — 43 | >>> cargo chef cook --locked --recipe-path recipe.json --profile ${RUST_PROFILE} --no-default-features --features "${RUST_FEATURES}" 44 | -------------------- ERROR: failed to solve: process "/bin/sh -c cargo chef cook --locked --recipe-path recipe.json --profile ${RUST_PROFILE} --no-default-features --features \"${RUST_FEATURES}\"" did not complete successfully: exit code: 2; runtime evidence skipped.
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python, Rust, solidity is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python, Rust, solidity is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
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.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X1 Async correctness — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X21 Side-effecting pattern guard — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X28 Index access outside its own emptiness guard — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X29 Per-element action decided by a fixed element — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X30 Support guard that admits what it rejects — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X4 Structured logging — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X4 Structured logging — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 117 further occurrence(s) are not listed individually; the score already reflects all 157.
X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Python, Rust, Solidity 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: 2 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
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.
252 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was SymbolicExecutor::handle_foundry_cheatcode at 244. A further 23 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being cast::cmd::safe::service::default_service_url at 30 — they are counted neither in the figure above nor in this dimension's score. 11 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: crates/cast/src/cmd/safe/service.rs (cast::cmd::safe::service::default_service_url at 30), crates/common/fmt/src/ui.rs (foundry_common_fmt::ui::get_pretty_block_attr at 24), crates/cast/src/cmd/erc4626.rs (Erc4626Subcommand::run at 23), crates/evm/hardforks/src/lib.rs (foundry_evm_hardforks::spec_id_from_ethereum_hardfork at 22), crates/evm/symbolic/src/lib.rs (SymbolicVmCheatcode::from_selector at 21), and 6 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 101 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 Cyclomatic Complexity — start with SymbolicExecutor::handle_foundry_cheatcode (cyclomatic 244), cast::args::run_command (cyclomatic 215), EthApi::execute (cyclomatic 191). — 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 Cyclomatic Complexity from 5.1 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 170 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 11 bodies over 120 down to 120 or less in Cognitive Complexity — start with BundledState::broadcast (cognitive 229), cast::args::run_command (cognitive 222), InvariantExecutor::run_invariant_worker (cognitive 222). — 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 11 together lifts Cognitive Complexity from 3.3 to about 4.4/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.2 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 96 FileTooLong finding(s) in God Classes — start with mod.rs (12), lib.rs (4), cheatcodes.rs (2). — One of this dimension's main actionable groups (96 warning-level).
Resolve the 83 MethodTooLong finding(s) in God Classes — start with runner.rs (10), mod.rs (9), inspector.rs (4). — One of this dimension's main actionable groups (83 warning-level).
Resolve the 39 ClassTooLong finding(s) in God Classes — start with mod.rs (9), lib.rs (3), runner.rs (2). — One of this dimension's main actionable groups (39 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
185 duplicated block group(s) detected. 2.1 % of the production lines (7,214 of 348,176) are in a reported copy. A further 160 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 27 of the 345 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. Measured on part of this repository only: .sol (16% of production source) was not exposed to the token comparison, so duplication there is unmeasured and is not in this count.
+ 92 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 26 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with api.rs (4), expr.rs (3), mod.rs (2). — One of this dimension's main actionable groups (26 warning-level).
Resolve the 20 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with api.rs (3), lifecycle.rs (2), mod.rs (2). — One of this dimension's main actionable groups (20 warning-level).
Resolve the 17 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with expr.rs (3), arbitrary_send_erc20.rs (2), api.rs. — One of this dimension's main actionable groups (17 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling8.4 / 10Strong✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
37 production modules (Cargo), 0 dependency cycle(s), 1 unstable depended-on module(s). Read from the build's own module declarations; 8 module(s) off the main sequence, with abstractness counted on 34 of the 37 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: anvil-rpc · ×6
Unstable project forge-script
Off the main sequence: foundry-primitives · ×2
What to do
Resolve the 6 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 1 Unstable project forge-script finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 10 Low cohesion finding(s) in Cohesion (LCOM4) — start with REDACTED (2), state.rs (2), config.rs. — One of this dimension's main actionable groups (10 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 10 tests. Measured on the JavaScript/TypeScript suite only — at least 236 test source file(s) (.rs) went unread, so its test quality is unmeasured and is not in these counts.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
14 outdated, 0 yanked direct Cargo dependencies. 172 of 178 direct crates were graded against crates.io (0 not published there, 6 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
Outdated: alloy-rlp · ×14
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 1100 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. A further 94 crate(s) in the closure resolve from git, a path or a private registry and publish no licence this pass can read; they are outside this verdict. This repository publishes itself under MIT OR Apache-2.0, which is its own choice and is not judged here.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: crates/anvil/src/eth/api.rs (92×191=17572); crates/anvil/src/eth/backend/mem/mod.rs (170×65=11050); crates/evm/symbolic/src/executor/cheatcodes.rs (41×244=10004) Repeated repair below the complexity floor: crates/evm/symbolic/src/lib.rs (11 of 20 changes were fixes); crates/anvil/src/eth/backend/fork.rs (11 of 18 changes were fixes); crates/cli/src/utils/mod.rs (11 of 13 changes were fixes)
Resolve the 112 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (13), runner.rs (3), args.rs (2). — One of this dimension's main actionable groups (112 warning-level).
Resolve the 32 Repeated repair finding(s) in Churn × Complexity Hotspots — start with mod.rs (3), lib.rs (2), fork.rs. — One of this dimension's main actionable groups (32 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.8 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
9 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is crates/common/src/external_storage.rs. Counted over 566 of the 731 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
42 deducted task-comment markers across 348176 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.
Resolve the 32 TodoComment finding(s) in Explicit Debt — start with keychain.rs (4), lib.rs (2), mod.rs (2). — One of this dimension's main actionable groups (32 warning-level).
Resolve the 7 FixmeComment finding(s) in Explicit Debt — start with pubsub.rs (5), logs.rs, fork.rs. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 3 HackComment finding(s) in Explicit Debt — start with runner.rs, sol.rs, mod.rs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 125 document(s) read across 1 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
5 of 36 build units (Cargo) flagged as possibly oversized/incoherent. This repository's .sol source was read by no build unit, so this covers part of the tree, not all of it.
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).
7 finding(s): 0 critical, 1 high, 6 medium, 0 low. semgrep hit a parse error in 16 file(s) — `.github/scripts/tempo-check.sh` (line 853), `crates/anvil/src/config.rs` (line 2526), `crates/anvil/src/eth/backend/mem/mod.rs` (line 9677, lines 9678–9679), `crates/cast/src/args.rs` (line 1663), `crates/cast/src/cmd/keychain.rs` (line 3456, line 3460, line 3461), … (+11 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
What to do
Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4), REDACTED. — One of this dimension's main actionable groups (5 warning-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).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 10 Medium advisory (unsound) finding(s) in Dependency Vulnerabilities — start with REDACTED (10). — One of this dimension's main actionable groups (10 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 1 Medium IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
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 566 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is crates/forge/src/brutalizer/assembly.rs. Counted over 566 of the 731 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 13 Change coupling finding(s) in Change Coupling — start with mod.rs (4), mktx.rs, access_list.rs. — One of this dimension's main actionable groups (13 warning-level).
Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with batch_mktx.rs, tests.rs. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with eth.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.
Build pipeline generates provenance, signs artifacts and produces an SBOM.
REDACTED
REDACTED
What to do
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).
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 any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
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.
Other · Event-Driven — Whether state changes and message publishes are atomic (a transactional outbox) rather than a crash-unsafe dual write.
Method: Roslyn semantic scan (event-driven gated): event-handler methods scanned for DB-save plus bus-publish without a transactional outbox reference. Deterministic, semantic-resolved.
What to do
Adopt the transactional outbox pattern so DB writes and message publishes commit atomically — no lost or phantom events on a crash.
Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.
Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.
Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability6.9 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 21/22 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Add a health-check endpoint (a /health route on your axum/actix router) so orchestrators and load balancers can probe liveness/readiness.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/cast/src/cmd/safe/service.rs:315
`reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — crates/forge/src/cmd/clone.rs:806, crates/forge/src/cmd/exploit.rs:275
What to do
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
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.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
`setup_fork_db_config_with_replay` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs. — crates/anvil/src/config.rs:2152
What to do
Rust: `.await` the future instead of `block_on` (on a Tokio runtime thread it panics outright) and use `tokio::time::sleep(..).await` instead of `std::thread::sleep`; where synchronous code must run, move it to `tokio::task::spawn_blocking` or `block_in_place`.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether 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?
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.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`trace!` at line 686 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/verify/src/bytecode.rs:686
`trace!` at line 991 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/verify/src/bytecode.rs:991
`warn!` at line 845 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/verify/src/verify.rs:845
`warn!` at line 231 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/verify/src/etherscan/mod.rs:231
`warn!` at line 149 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/script/src/broadcast.rs:149
`debug!` at line 332 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/script/src/broadcast.rs:332
`debug!` at line 337 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/script/src/broadcast.rs:337
`trace!` at line 244 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/script/src/progress.rs:244
`trace!` at line 759 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/script/src/simulate.rs:759
`warn!` at line 209 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/script/src/verify.rs:209
`trace!` at line 432 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/script/src/verify.rs:432
`trace!` at line 585 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/script/src/verify.rs:585
`debug!` at line 235 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/forge/src/multi_runner.rs:235
`debug!` at line 982 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/forge/src/runner.rs:982
`debug!` at line 1002 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/forge/src/runner.rs:1002
`trace!` at line 943 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/forge/src/cmd/clone.rs:943
`trace!` at line 954 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/forge/src/cmd/clone.rs:954
`trace!` at line 1087 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/forge/src/cmd/clone.rs:1087
`warn!` at line 168 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/forge/src/cmd/fmt.rs:168
`warn!` at line 83 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/forge/src/cmd/lint.rs:83
`trace!` at line 430 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/traces/src/identifier/external.rs:430
`trace!` at line 459 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/traces/src/identifier/external.rs:459
`trace!` at line 469 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/traces/src/identifier/external.rs:469
`trace!` at line 774 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/traces/src/identifier/external.rs:774
`trace!` at line 182 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/traces/src/identifier/local.rs:182
`warn!` at line 69 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/traces/src/debug/sources.rs:69
`debug!` at line 280 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/evm/src/executors/corpus.rs:280
`warn!` at line 286 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/evm/src/executors/corpus.rs:286
`debug!` at line 290 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/evm/src/executors/corpus.rs:290
`debug!` at line 296 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/evm/src/executors/corpus.rs:296
`debug!` at line 537 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/evm/src/executors/corpus.rs:537
`warn!` at line 775 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/evm/src/executors/corpus.rs:775
`debug!` at line 805 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/evm/src/executors/corpus.rs:805
`trace!` at line 1233 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/evm/src/executors/corpus.rs:1233
`debug!` at line 1303 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/evm/src/executors/corpus.rs:1303
`trace!` at line 1305 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/evm/src/executors/corpus.rs:1305
`warn!` at line 1564 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/evm/src/executors/corpus.rs:1564
`debug!` at line 1571 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/evm/src/executors/corpus.rs:1571
`warn!` at line 1577 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/evm/src/executors/corpus.rs:1577
`debug!` at line 1582 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/evm/evm/src/executors/corpus.rs:1582
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 — 18 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 12 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 62 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.
AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; 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 — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. 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. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — no exported interface declares behaviour
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — docker build failed (exit 1) — 43 | >>> cargo chef cook --locked --recipe-path recipe.json --profile ${RUST_PROFILE} --no-default-features --features "${RUST_FEATURES}" 44 | -------------------- ERROR: failed to solve: process "/bin/sh -c cargo chef cook --locked --recipe-path recipe.json --profile ${RUST_PROFILE} --no-default-features --features \"${RUST_FEATURES}\"" did not complete successfully: exit code: 2; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D11 Test Reliability — Test reliability not scored — polyglot repository, one half's runner produced no measurement
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 — N/A — too few peers to establish a naming convention (38977 declarations, no unit with a dominant convention).
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust, TypeScript surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .py, .rs source were not judged.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 122 value object(s); 1 domain event(s); its domain events are published by services or handlers — no domain entity raises one
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage data present for 3 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X12 Unreachable branch — X12 reached only 0% of this repository's production lines — rust (348,135 lines), solidity (66,623 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — no C# was loaded; this repository's Python and Rust were read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation; 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 applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X3 Exception handling — X3 reached only 0% of this repository's production lines — rust (348,135 lines), solidity (66,623 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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.
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.
Hotspot: crates/anvil/src/eth/api.rs crates/anvil/src/eth/api.rs:2288— crates/anvil/src/eth/api.rs changed 92 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 191 in EthApi::execute at line 2288. 62 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/anvil/src/eth/api.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/anvil/src/eth/backend/mem/mod.rs crates/anvil/src/eth/backend/mem/mod.rs:9386— crates/anvil/src/eth/backend/mem/mod.rs changed 170 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 65 in Backend::simulate_raw at line 9386. 91 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/anvil/src/eth/backend/mem/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: crates/evm/symbolic/src/executor/cheatcodes.rs crates/evm/symbolic/src/executor/cheatcodes.rs:1000— crates/evm/symbolic/src/executor/cheatcodes.rs changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 244 in SymbolicExecutor::handle_foundry_cheatcode at line 1000. 29 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/evm/symbolic/src/executor/cheatcodes.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/cheatcodes/src/inspector.rs crates/cheatcodes/src/inspector.rs:3595— crates/cheatcodes/src/inspector.rs changed 77 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 105 in Cheatcodes::check_mem_opcodes at line 3595. 37 of those changes were fix/bug commits, and the other 40 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/cheatcodes/src/inspector.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/cast/src/args.rs crates/cast/src/args.rs:132— crates/cast/src/args.rs changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 215 in cast::args::run_command at line 132. 14 of those changes were fix/bug commits, and the other 15 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/cast/src/args.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/evm/symbolic/src/executor/opcodes.rs crates/evm/symbolic/src/executor/opcodes.rs:481— crates/evm/symbolic/src/executor/opcodes.rs changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 175 in SymbolicExecutor::step at line 481. 23 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/evm/symbolic/src/executor/opcodes.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/forge/src/runner.rs crates/forge/src/runner.rs:3909— crates/forge/src/runner.rs changed 49 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 110 in FunctionRunner::run_invariant_test at line 3909. 25 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/forge/src/runner.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/evm/symbolic/src/executor/calls.rs crates/evm/symbolic/src/executor/calls.rs:925— crates/evm/symbolic/src/executor/calls.rs changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 100 in SymbolicExecutor::call_concrete_target at line 925. 32 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/evm/symbolic/src/executor/calls.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/evm/evm/src/executors/invariant/mod.rs crates/evm/evm/src/executors/invariant/mod.rs:1020— crates/evm/evm/src/executors/invariant/mod.rs changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 95 in InvariantExecutor::run_invariant_worker at line 1020. 16 of those changes were fix/bug commits, and the other 24 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/evm/evm/src/executors/invariant/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: crates/script/src/broadcast.rs crates/script/src/broadcast.rs:794— crates/script/src/broadcast.rs changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 94 in BundledState::broadcast at line 794. 19 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/script/src/broadcast.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: REDACTED REDACTED:1366— REDACTED changed 63 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in InspectorStackRefMut::transact_inner at line 1366. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/cheatcodes/src/evm.rs crates/cheatcodes/src/evm.rs:2229— crates/cheatcodes/src/evm.rs changed 49 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in foundry_cheatcodes::evm::get_recorded_state_diffs at line 2229. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/cheatcodes/src/evm.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/cast/src/cmd/call.rs crates/cast/src/cmd/call.rs:404— crates/cast/src/cmd/call.rs changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 61 in CallArgs::run_with_network_and_opts at line 404. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/cast/src/cmd/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: crates/evm/symbolic/src/runtime/state.rs crates/evm/symbolic/src/runtime/state.rs:570— crates/evm/symbolic/src/runtime/state.rs changed 52 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in PathState::expr_upper_bound_usize_cached at line 570. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/evm/symbolic/src/runtime/state.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/evm/symbolic/src/runtime/expr/expr.rs crates/evm/symbolic/src/runtime/expr/expr.rs:505— crates/evm/symbolic/src/runtime/expr/expr.rs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in SymExpr::binop at line 505. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/evm/symbolic/src/runtime/expr/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: crates/anvil/src/config.rs crates/anvil/src/config.rs:2152— crates/anvil/src/config.rs changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in NodeConfig::setup_fork_db_config_with_replay at line 2152. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/anvil/src/config.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/verify/src/bytecode.rs crates/verify/src/bytecode.rs:318— crates/verify/src/bytecode.rs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in VerifyBytecodeArgs::prepare_runtime_verification at line 318. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/verify/src/bytecode.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/fmt/src/state/mod.rs crates/fmt/src/state/mod.rs:973— crates/fmt/src/state/mod.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in State::print_comment at line 973. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/fmt/src/state/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: crates/evm/symbolic/src/executor/create.rs crates/evm/symbolic/src/executor/create.rs:4— crates/evm/symbolic/src/executor/create.rs changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in SymbolicExecutor::create at line 4. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/evm/symbolic/src/executor/create.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/fmt/src/state/sol.rs crates/fmt/src/state/sol.rs:1416— crates/fmt/src/state/sol.rs changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in State::print_expr at line 1416. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/fmt/src/state/sol.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/cast/src/cmd/wallet/mod.rs crates/cast/src/cmd/wallet/mod.rs:467— crates/cast/src/cmd/wallet/mod.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 84 in WalletSubcommands::run at line 467. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/cast/src/cmd/wallet/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: crates/evm/traces/src/decoder/mod.rs crates/evm/traces/src/decoder/mod.rs:1295— crates/evm/traces/src/decoder/mod.rs changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in CallTraceDecoder::decode_cheatcode_inputs at line 1295. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/evm/traces/src/decoder/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: crates/script/src/lib.rs crates/script/src/lib.rs:388— crates/script/src/lib.rs changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in ScriptArgs::preprocess at line 388. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/script/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/evm/symbolic/src/runtime/expr/bool.rs crates/evm/symbolic/src/runtime/expr/bool.rs:72— crates/evm/symbolic/src/runtime/expr/bool.rs changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in SymBoolExpr::cmp at line 72. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/evm/symbolic/src/runtime/expr/bool.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: crates/evm/symbolic/src/executor/mod.rs crates/evm/symbolic/src/executor/mod.rs:343— crates/evm/symbolic/src/executor/mod.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in SymbolicExecutor::execute_call_path_batch at line 343. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/evm/symbolic/src/executor/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.
FileTooLong: mem/mod.rs crates/anvil/src/eth/backend/mem/mod.rs— FileTooLong — 7823 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 44 free functions. The bar is 500 significant lines; this is 7323 over it, 15.65× 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/runner.rs crates/forge/src/runner.rs— FileTooLong — 4607 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 71% of them inside a single declaration: FunctionRunner (3 blocks, 1204-5667), declaring 47 free functions. The bar is 500 significant lines; this is 4107 over it, 9.21× 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: eth/api.rs crates/anvil/src/eth/api.rs— FileTooLong — 3530 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: EthApi (7 blocks, 156-5815). The bar is 500 significant lines; this is 3030 over it, 7.06× 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: executor/cheatcodes.rs crates/evm/symbolic/src/executor/cheatcodes.rs— FileTooLong — 2574 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: SymbolicExecutor (10-3137). The bar is 500 significant lines; this is 2074 over it, 5.15× 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: runtime/state.rs crates/evm/symbolic/src/runtime/state.rs— FileTooLong — 2394 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 1894 over it, 4.79× 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: state/sol.rs crates/fmt/src/state/sol.rs— FileTooLong — 2368 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 1868 over it, 4.74× 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/inspector.rs crates/cheatcodes/src/inspector.rs— FileTooLong — 2361 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: Cheatcodes (3 blocks, 575-3786). The bar is 500 significant lines; this is 1861 over it, 4.72× 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: cmd/keychain.rs crates/cast/src/cmd/keychain.rs— FileTooLong — 2352 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 71 free functions. The bar is 500 significant lines; this is 1852 over it, 4.70× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: executor/calls.rs crates/evm/symbolic/src/executor/calls.rs— FileTooLong — 2030 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 92% of them inside a single declaration: SymbolicExecutor (2 blocks, 6-2674). The bar is 500 significant lines; this is 1530 over it, 4.06× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/lib.rs crates/config/src/lib.rs— FileTooLong — 1903 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 79% of them inside a single declaration: Config (4 blocks, 196-3428). The bar is 500 significant lines; this is 1403 over it, 3.81× 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/config.rs crates/anvil/src/config.rs— FileTooLong — 1835 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 81% of them inside a single declaration: NodeConfig (5 blocks, 234-2561). The bar is 500 significant lines; this is 1335 over it, 3.67× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 1755 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 1255 over it, 3.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: expr/expr.rs crates/evm/symbolic/src/runtime/expr/expr.rs— FileTooLong — 1708 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 73% of them inside a single declaration: SymExpr (4 blocks, 12-2149). The bar is 500 significant lines; this is 1208 over it, 3.42× 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/broadcast.rs crates/script/src/broadcast.rs— FileTooLong — 1659 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 62% of them inside a single declaration: BundledState (3 blocks, 723-2180). The bar is 500 significant lines; this is 1159 over it, 3.32× 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: invariant/mod.rs crates/evm/evm/src/executors/invariant/mod.rs— FileTooLong — 1641 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 65% of them inside a single declaration: InvariantExecutor (2 blocks, 723-2241). The bar is 500 significant lines; this is 1141 over it, 3.28× 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/evm.rs crates/cheatcodes/src/evm.rs— FileTooLong — 1638 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 32 free functions. The bar is 500 significant lines; this is 1138 over it, 3.28× 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: normalize/mod.rs crates/evm/symbolic/src/runtime/solver/normalize/mod.rs— FileTooLong — 1469 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 969 over it, 2.94× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: high/reentrancy.rs crates/lint/src/sol/high/reentrancy.rs— FileTooLong — 1457 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 61% of them inside a single declaration: Analyzer (2 blocks, 330-1549), declaring 35 free functions. The bar is 500 significant lines; this is 957 over it, 2.91× 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: executors/corpus.rs crates/evm/evm/src/executors/corpus.rs— FileTooLong — 1405 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 905 over it, 2.81× 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: executor/opcodes.rs crates/evm/symbolic/src/executor/opcodes.rs— FileTooLong — 1339 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 98% of them inside a single declaration: SymbolicExecutor (10-1687). The bar is 500 significant lines; this is 839 over it, 2.68× 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/args.rs crates/cast/src/args.rs— FileTooLong — 1329 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 829 over it, 2.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: src/result.rs crates/forge/src/result.rs— FileTooLong — 1308 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 808 over it, 2.62× 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: solver/mod.rs crates/evm/symbolic/src/runtime/solver/mod.rs— FileTooLong — 1285 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 785 over it, 2.57× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: decoder/mod.rs crates/evm/traces/src/decoder/mod.rs— FileTooLong — 1261 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 84% of them inside a single declaration: CallTraceDecoder (2 blocks, 238-1870). The bar is 500 significant lines; this is 761 over it, 2.52× 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: executors/mod.rs crates/evm/evm/src/executors/mod.rs— FileTooLong — 1226 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 726 over it, 2.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.
MethodTooLong: SymbolicExecutor.handle_foundry_cheatcode crates/evm/symbolic/src/executor/cheatcodes.rs:1000— MethodTooLong — handle_foundry_cheatcode runs 1571 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 1471 over it, 15.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FunctionRunner.run_invariant_test crates/forge/src/runner.rs:3909— MethodTooLong — run_invariant_test runs 954 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 854 over it, 9.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.
MethodTooLong: SymbolicExecutor.step crates/evm/symbolic/src/executor/opcodes.rs:481— MethodTooLong — step runs 817 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 717 over it, 8.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SymbolicExecutor.call_concrete_target crates/evm/symbolic/src/executor/calls.rs:925— MethodTooLong — call_concrete_target runs 560 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 460 over it, 5.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: BundledState.broadcast crates/script/src/broadcast.rs:794— MethodTooLong — broadcast runs 551 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 451 over it, 5.51× 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: InvariantExecutor.run_invariant_worker crates/evm/evm/src/executors/invariant/mod.rs:1020— MethodTooLong — run_invariant_worker runs 500 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 400 over it, 5.00× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: WalletSubcommands.run crates/cast/src/cmd/wallet/mod.rs:467— MethodTooLong — run runs 412 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 312 over it, 4.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: VerifyBytecodeArgs.prepare_runtime_verification crates/verify/src/bytecode.rs:318— MethodTooLong — prepare_runtime_verification runs 357 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 257 over it, 3.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: EthApi.execute crates/anvil/src/eth/api.rs:2288— MethodTooLong — execute runs 354 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 254 over it, 3.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.
MethodTooLong: BundledState.broadcast_batch crates/script/src/broadcast.rs:1627— MethodTooLong — broadcast_batch runs 329 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 229 over it, 3.29× 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: CallArgs.run_with_network_and_opts crates/cast/src/cmd/call.rs:404— MethodTooLong — run_with_network_and_opts runs 295 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 195 over it, 2.95× 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: NodeConfig.setup_fork_db_config_with_replay crates/anvil/src/config.rs:2152— MethodTooLong — setup_fork_db_config_with_replay runs 258 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 158 over it, 2.58× 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: SendTxArgs.run_generic_inner crates/cast/src/cmd/send.rs:193— MethodTooLong — run_generic_inner runs 258 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 158 over it, 2.58× 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: SelectorsSubcommands.run crates/forge/src/cmd/selectors.rs:102— MethodTooLong — run runs 258 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 158 over it, 2.58× 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: FunctionRunner.try_seed_invariant_corpus_from_frontiers crates/forge/src/runner.rs:3378— MethodTooLong — try_seed_invariant_corpus_from_frontiers runs 249 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 149 over it, 2.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FunctionRunner.replay_symbolic_artifact crates/forge/src/runner.rs:2750— MethodTooLong — replay_symbolic_artifact runs 248 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 148 over it, 2.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: Cheatcodes.call_with_executor crates/cheatcodes/src/inspector.rs:1340— MethodTooLong — call_with_executor runs 235 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 135 over it, 2.35× 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: RemappingsProvider.get_remappings crates/config/src/providers/remappings.rs:233— MethodTooLong — get_remappings runs 226 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 126 over it, 2.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SymbolicExecutor.call_symbolic_target crates/evm/symbolic/src/executor/calls.rs:1956— MethodTooLong — call_symbolic_target runs 214 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 114 over it, 2.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ContractRunner.run_tests crates/forge/src/runner.rs:859— MethodTooLong — run_tests runs 214 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 114 over it, 2.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CreateArgs.deploy crates/forge/src/cmd/create.rs:509— MethodTooLong — deploy runs 213 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 113 over it, 2.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: EquivalenceArgs.run crates/forge/src/cmd/equivalence.rs:103— MethodTooLong — run runs 212 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 112 over it, 2.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SymbolicExecutor.call crates/evm/symbolic/src/executor/calls.rs:7— MethodTooLong — call runs 201 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 101 over it, 2.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Campaign.report crates/forge/src/cmd/properties.rs:602— MethodTooLong — report runs 187 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 87 over it, 1.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MakeTxArgs.run_generic crates/cast/src/cmd/mktx.rs:155— MethodTooLong — run_generic runs 186 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 86 over it, 1.86× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
ClassTooLong: EthApi crates/anvil/src/eth/api.rs:156— ClassTooLong — 3290 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 262 methods, 7 blocks, lines 156-5815. The bar is 400 significant lines; this is 2890 over it, 8.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: FunctionRunner crates/forge/src/runner.rs:1204— ClassTooLong — 3251 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 53 methods, 3 blocks, lines 1204-5667. The bar is 400 significant lines; this is 2851 over it, 8.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Cheatcodes crates/cheatcodes/src/inspector.rs:575— ClassTooLong — 1846 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 88 methods, 3 blocks, lines 575-3786. The bar is 400 significant lines; this is 1446 over it, 4.62× 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: Config crates/config/src/lib.rs:196— ClassTooLong — 1507 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, 4 blocks, lines 196-3428. The bar is 400 significant lines; this is 1107 over it, 3.77× 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: NodeConfig crates/anvil/src/config.rs:234— ClassTooLong — 1495 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 123 methods, 5 blocks, lines 234-2561. The bar is 400 significant lines; this is 1095 over it, 3.74× 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: SymExpr crates/evm/symbolic/src/runtime/expr/expr.rs:377— ClassTooLong — 1249 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 110 methods, 4 blocks, lines 12-2149. The bar is 400 significant lines; this is 849 over it, 3.12× 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: InvariantExecutor crates/evm/evm/src/executors/invariant/mod.rs:723— ClassTooLong — 1067 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 16 methods, 2 blocks, lines 723-2241. The bar is 400 significant lines; this is 667 over it, 2.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CallTraceDecoder crates/evm/traces/src/decoder/mod.rs:238— ClassTooLong — 1060 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 53 methods, 2 blocks, lines 238-1870. The bar is 400 significant lines; this is 660 over it, 2.65× 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: BundledState crates/script/src/broadcast.rs:723— ClassTooLong — 1025 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 5 methods, 3 blocks, lines 723-2180. The bar is 400 significant lines; this is 625 over it, 2.56× 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: PathState crates/evm/symbolic/src/runtime/state.rs:10— ClassTooLong — 982 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 66 methods, 4 blocks, lines 10-1993. The bar is 400 significant lines; this is 582 over it, 2.46× 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: Backend crates/evm/core/src/backend/mod.rs:139— ClassTooLong — 893 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 100 methods, 2 blocks, lines 139-1592. The bar is 400 significant lines; this is 493 over it, 2.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Analyzer crates/lint/src/sol/high/reentrancy.rs:330— ClassTooLong — 882 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 40 methods, 2 blocks, lines 330-1549. The bar is 400 significant lines; this is 482 over it, 2.21× 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: ConstraintContext crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:513— ClassTooLong — 850 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 62 methods, 3 blocks, lines 513-2235. The bar is 400 significant lines; this is 450 over it, 2.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Linker crates/linking/src/lib.rs:42— ClassTooLong — 747 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 38 methods, 2 blocks, lines 42-1088. The bar is 400 significant lines; this is 347 over it, 1.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SymbolicWorld crates/evm/symbolic/src/runtime/state.rs:2194— ClassTooLong — 726 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 68 methods, 3 blocks, lines 2194-3250. The bar is 400 significant lines; this is 326 over it, 1.82× 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: EvmOpts crates/evm/core/src/opts.rs:49— ClassTooLong — 680 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 39 methods, 3 blocks, lines 49-1268. The bar is 400 significant lines; this is 280 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.
ClassTooLong: WorkerCorpus crates/evm/evm/src/executors/corpus.rs:698— ClassTooLong — 625 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 27 methods, 2 blocks, lines 698-1979. The bar is 400 significant lines; this is 225 over it, 1.56× 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: ExecutionLifecycle crates/evm/core/src/evm/lifecycle.rs:453— ClassTooLong — 624 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 50 methods, 4 blocks, lines 453-1497. The bar is 400 significant lines; this is 224 over it, 1.56× 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: Executor crates/evm/evm/src/executors/mod.rs:120— ClassTooLong — 618 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 66 methods, 3 blocks, lines 120-1227. The bar is 400 significant lines; this is 218 over it, 1.55× 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: SymMemory crates/evm/symbolic/src/runtime/memory.rs:55— ClassTooLong — 615 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 47 methods, 2 blocks, lines 55-913. The bar is 400 significant lines; this is 215 over it, 1.54× 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: Checker crates/lint/src/sol/med/cheatcode_environment.rs:336— ClassTooLong — 569 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 18 methods, 2 blocks, lines 336-1112. The bar is 400 significant lines; this is 169 over it, 1.42× 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: WalletSubcommands crates/cast/src/cmd/wallet/mod.rs:57— ClassTooLong — 565 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, 2 blocks, lines 57-1017. The bar is 400 significant lines; this is 165 over it, 1.41× 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: ScriptArgs crates/script/src/lib.rs:118— ClassTooLong — 554 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 18 methods, 3 blocks, lines 118-1063. The bar is 400 significant lines; this is 154 over it, 1.39× 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: ClientFork crates/anvil/src/eth/backend/fork.rs:112— ClassTooLong — 543 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 72 methods, 3 blocks, lines 112-935. The bar is 400 significant lines; this is 143 over it, 1.36× 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: CreateArgs crates/forge/src/cmd/create.rs:57— ClassTooLong — 543 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 5 methods, 3 blocks, lines 57-826. The bar is 400 significant lines; this is 143 over it, 1.36× 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.
Repeated repair: crates/evm/symbolic/src/lib.rs crates/evm/symbolic/src/lib.rs:142— crates/evm/symbolic/src/lib.rs changed 20 times in last 90 days and 11 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is SymbolicVmCheatcode::min_input_words at line 142), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(symbolic): build svm calldata from the ABI and replay svm values (#18387)”; “fix(symbolic): consolidate account, address and storage fixes (#18368)”; “fix(symbolic): consolidate cheatcode argument and result fixes (#18366)”; “fix(symbolic): model call depth and exceptional halts (#17854)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/evm/symbolic/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/anvil/src/eth/backend/fork.rs crates/anvil/src/eth/backend/fork.rs:1039— crates/anvil/src/eth/backend/fork.rs changed 18 times in last 90 days and 11 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is ClientForkConfig::prefill_cache at line 1039), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(tempo): keep account extensions in forks (#18374)”; “fix(anvil): infer Tempo fork epoch length (#18020)”; “fix(anvil): allow rollback to the fork root (#17835)”; “fix(anvil): use source hardfork for fork blob params (#17756)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/anvil/src/eth/backend/fork.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.
Repeated repair: crates/cli/src/utils/mod.rs crates/cli/src/utils/mod.rs:866— crates/cli/src/utils/mod.rs changed 13 times in last 90 days and 11 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is Git::submodules_in_worktree at line 866), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cli): name the program when a command cannot be started (#18045)”; “fix: resolve Windows test failures (#17803)”; “fix(forge): check out tags shadowed by branches (#17763)”; “fix(cli): decode git submodule branch values (#17592)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/cli/src/utils/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.
Repeated repair: crates/anvil/src/eth/fees.rs crates/anvil/src/eth/fees.rs:738— crates/anvil/src/eth/fees.rs changed 18 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is FeeDetails::new at line 738), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(anvil): restore fee state on rollback and reorg (#17795)”; “fix(anvil): reject conflicting call fee and input fields (#17307)”; “fix(anvil): run fee-free calls at zero base and blob base fees (#17310)”; “fix(anvil): charge cap-only calls at the base fee (#17311)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/anvil/src/eth/fees.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.
Repeated repair: crates/cheatcodes/src/lib.rs crates/cheatcodes/src/lib.rs:179— crates/cheatcodes/src/lib.rs changed 17 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is CheatsCtxt::ensure_not_precompile at line 179), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(symbolic): consolidate account, address and storage fixes (#18368)”; “fix(symbolic): consolidate cheatcode argument and result fixes (#18366)”; “fix(symbolic): consolidate cheatcode state and prank fixes (#18365)”; “fix(symbolic): match expectRevert like Forge (#17945)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/cheatcodes/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: crates/chisel/src/dispatcher.rs crates/chisel/src/dispatcher.rs:681— crates/chisel/src/dispatcher.rs changed 17 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is chisel::dispatcher::preprocess at line 681), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(chisel): redact credentials from the fork URL that `!fork` prints (#17735)”; “fix(chisel): reject unterminated block comments (#17530)”; “fix(cast): fetch impl on cast interface (#17153)”; “fix(chisel): keep credentials out of session cache (#17143)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/chisel/src/dispatcher.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.
Repeated repair: crates/evm/symbolic/src/runtime/memory.rs crates/evm/symbolic/src/runtime/memory.rs:514— crates/evm/symbolic/src/runtime/memory.rs changed 15 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is SymMemory::byte_dynamic_with_delta_and_bounds at line 514), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(symbolic): run delegate code for EIP-7702 calls (#18459)”; “fix(symbolic): consolidate account, address and storage fixes (#18368)”; “fix(symbolic): model call depth and exceptional halts (#17854)”; “fix(cheatcodes): reset delegated EOA nonces to 0 (#17686)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/evm/symbolic/src/runtime/memory.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.
Repeated repair: crates/chisel/src/session.rs crates/chisel/src/session.rs:146— crates/chisel/src/session.rs changed 13 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is ChiselSession::write_new_from at line 146), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(chisel): stop concurrent saves from reusing an id (#17606)”; “fix(chisel): keep credentials out of session cache (#17143)”; “fix: revert automatic foundry.lock enforcement (#16863)”; “fix: enforce existing foundry.lock (#16817)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/chisel/src/session.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.
Repeated repair: crates/script/src/sequence.rs crates/script/src/sequence.rs:439— crates/script/src/sequence.rs changed 15 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is ScriptSequenceKind::restore_delegated_pending at line 439), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(script): name chains in multichain errors and reconcile all on resume (#17880)”; “fix(script): refuse rebroadcast over an unfinished run (#17851)”; “fix(script): use --rpc-url on resume (#17758)”; “fix(script): keep original sponsor on resume (#17753)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/script/src/sequence.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.
Repeated repair: crates/anvil/src/eth/backend/mem/tempo.rs crates/anvil/src/eth/backend/mem/tempo.rs:502— crates/anvil/src/eth/backend/mem/tempo.rs changed 14 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is Backend::tempo_certified_block at line 502), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(anvil): warn on Tempo epoch fallback (#18077)”; “fix(anvil): announce full DKG before rotation (#18069)”; “fix(anvil): infer Tempo fork epoch length (#18020)”; “fix(anvil): lock Tempo history before storage when mining (#18064)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/anvil/src/eth/backend/mem/tempo.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.
Repeated repair: crates/common/src/provider/mod.rs crates/common/src/provider/mod.rs:140— crates/common/src/provider/mod.rs changed 12 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is ProviderBuilder::new at line 140), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(anvil): don't send fork headers to other origins (#17908)”; “fix(common): reject an empty RPC URL (#17826)”; “revert: "feat(cast): restore run prestate from BAL" (#16930)”; “fix(script): honor RPC config (#16589)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/common/src/provider/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.
Repeated repair: crates/anvil/src/eth/pool/mod.rs crates/anvil/src/eth/pool/mod.rs:284— crates/anvil/src/eth/pool/mod.rs changed 10 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is Pool::on_mined_block at line 284), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(anvil): respect pubsub backpressure (#17909)”; “fix(anvil): order fee mempool by effective tip (#17882)”; “fix(anvil): retry ready txs left by full blocks (#17266)”; “fix(anvil): order Tempo nonce lanes (#17139)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/anvil/src/eth/pool/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.
Repeated repair: crates/forge/src/cmd/bind.rs crates/forge/src/cmd/bind.rs:273— crates/forge/src/cmd/bind.rs changed 8 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is BindArgs::cached_artifact_paths at line 273), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(forge): reject binding name collisions (#17690)”; “fix(forge): ignore orphaned artifacts in bind (#17556)”; “fix: revert automatic foundry.lock enforcement (#16863)”; “fix: enforce existing foundry.lock (#16817)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/forge/src/cmd/bind.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.
Repeated repair: crates/evm/symbolic/src/runtime/executor_view.rs crates/evm/symbolic/src/runtime/executor_view.rs:112— crates/evm/symbolic/src/runtime/executor_view.rs changed 8 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is ExecutorView::new at line 112), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(symbolic): run delegate code for EIP-7702 calls (#18459)”; “fix(symbolic): consolidate account, address and storage fixes (#18368)”; “fix(symbolic): consolidate call, expectation and mock fixes (#18367)”; “fix(symbolic): consolidate cheatcode argument and result fixes (#18366)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/evm/symbolic/src/runtime/executor_view.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.
Repeated repair: crates/evm/coverage/src/anchors.rs crates/evm/coverage/src/anchors.rs:133— crates/evm/coverage/src/anchors.rs changed 8 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is AnchorIndex::new at line 133), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(coverage): treat JUMPDEST-led failure stubs as failure code (#18446)”; “fix(coverage): skip leading failure stubs (#18094)”; “fix(coverage): track nested ternary branches (#16828)”; “fix(coverage): anchor lines before branch bodies (#16836)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/evm/coverage/src/anchors.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.
Repeated repair: crates/common/src/preprocessor/data.rs crates/common/src/preprocessor/data.rs:218— crates/common/src/preprocessor/data.rs changed 7 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is foundry_common::preprocessor::data::solidity_string_content at line 218), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(compile): keep DTL cache on unrelated removals (#18026)”; “fix(common): preserve helper ABI coder v2 (#17591)”; “fix(forge): stabilize test linking helpers (#17576)”; “fix(forge): skip deploy helpers in removed source warning (#17172)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/common/src/preprocessor/data.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.
Repeated repair: crates/anvil/src/eth/otterscan/api.rs crates/anvil/src/eth/otterscan/api.rs:196— crates/anvil/src/eth/otterscan/api.rs changed 5 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is EthApi::ots_search_transactions_after at line 196), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(anvil): keep block tx order in ots_searchTransactionsAfter (#18015)”; “fix(anvil): clamp ots search block number to head (#18014)”; “fix(anvil): respect genesis number in RPC lookups (#17731)”; “fix(anvil): return null from trace_transaction for an unknown hash (#17089)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/anvil/src/eth/otterscan/api.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.
Repeated repair: crates/cast/src/cmd/creation_code.rs crates/cast/src/cmd/creation_code.rs:77— crates/cast/src/cmd/creation_code.rs changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is cast::cmd::creation_code::parse_code_output at line 77), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cast): fetch impl on cast interface (#17153)”; “fix(cast): reject ambiguous constructor args (#17233)”; “fix(cast): decode dynamic constructor args in creation code (#16922)”; “fix(cast): reject short creation bytecode (#16567)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/cast/src/cmd/creation_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.
Repeated repair: crates/evm/evm/src/executors/invariant/campaign.rs crates/evm/evm/src/executors/invariant/campaign.rs:298— crates/evm/evm/src/executors/invariant/campaign.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is foundry_evm::executors::invariant::campaign::fold_outputs at line 298), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(invariant): drop unexecuted input after complete runs (#18454)”; “fix(invariant): bound shrinking by the invariant timeout (#18405)”; “fix(forge): report interrupted campaigns as skipped (#17461)”; “fix(fuzz): persist parallel invariant corpus (#16065)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/evm/evm/src/executors/invariant/campaign.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.
Repeated repair: crates/config/src/providers/ext.rs crates/config/src/providers/ext.rs:88— crates/config/src/providers/ext.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is TomlFileProvider::read at line 88), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(config): hint that profiles inherit default when `extends` names a profile (#17827)”; “fix(config): respect project selection in --fix (#17667)”; “fix(config): honor the selected project root (#17469)”; “fix(config): scope compiler overrides to profiles (#17454)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/config/src/providers/ext.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.
Repeated repair: crates/sol-macro-gen/src/sol_macro_gen.rs crates/sol-macro-gen/src/sol_macro_gen.rs:216— crates/sol-macro-gen/src/sol_macro_gen.rs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is MultiSolMacroGen::parse_license_alias at line 216), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(bind): display paths without debug escaping (#17533)”; “fix(bind): check single-file bindings consistency (#17523)”; “fix(sol-macro-gen): don't panic on a $ in a Solidity contract name (#16581)”; “fix(forge): generate typed enum bindings (#16379)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/sol-macro-gen/src/sol_macro_gen.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.
Repeated repair: crates/cast/src/cmd/safe/transaction.rs crates/cast/src/cmd/safe/transaction.rs:45— crates/cast/src/cmd/safe/transaction.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is SafeSendOpts::send at line 45), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cast): verify Safe transaction hashes locally (#18418)”; “fix(tempo): resolve fee tokens on local Tempo nodes (#17327)”; “fix(cast,script): resolve transaction networks more consistently (#16790)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/cast/src/cmd/safe/transaction.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.
Repeated repair: crates/debugger/src/soldb.rs crates/debugger/src/soldb.rs:725— crates/debugger/src/soldb.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is foundry_debugger::soldb::write_bundle at line 725), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(evm): restore Tempo AA traces (#18385)”; “fix(debugger): show PUSH values in the opcode pane (#18115)”; “fix(debugger): restore terminal and validate --dump (#18035)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/debugger/src/soldb.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.
Repeated repair: crates/evm/symbolic/src/runtime/expr/cx.rs crates/evm/symbolic/src/runtime/expr/cx.rs:62— crates/evm/symbolic/src/runtime/expr/cx.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is SymCx::mk_bytes_kind at line 62), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(symbolic): consolidate account, address and storage fixes (#18368)”; “fix(symbolic): memoize nested ite normalization (#18169)”; “fix(symbolic): model aliasing for large storage offsets (#18057)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/evm/symbolic/src/runtime/expr/cx.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.
Repeated repair: crates/anvil/src/service.rs crates/anvil/src/service.rs:181— crates/anvil/src/service.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is BlockProducer::poll_next at line 181), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(anvil): enforce strictly increasing block timestamps on default path (#17373)”; “fix(anvil): retry ready txs left by full blocks (#17266)”; “fix(anvil): restore txpool on snapshot revert (#17044)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-16 13:19:29 +00:00' --until='2026-11-14 13:19:29 +00:00' --full-history --no-merges -- crates/anvil/src/service.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.
TodoComment crates/script-sequence/src/sequence.rs:258— // TODO: ideally we want the name of the function here if sig is calldata — 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 crates/forge/tests/cli/coverage.rs:1485— // TODO(dani): the specific case of `if (x) continue/break` is not properly covered. — 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 crates/forge/tests/cli/fmt_integration.rs:4— /// TODO: make sure original fmt is not changed after projects format and rev available. — 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 crates/forge/src/lib.rs:42— // TODO: remove — 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 crates/forge/src/multi_runner.rs:540— // TODO: `self.evm_opts` and `self.evm_env` are only partially reconfigured. — 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 crates/forge/src/cmd/doc.rs:147— // TODO: `--legacy-peer-deps` flag is required waku dependency conflict resolution. — 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 crates/forge/src/cmd/test/mod.rs:1121— // TODO: evaluate if we can relax the conflict with replay_symbolic_artifact — 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 crates/evm/fuzz/src/invariant/call_override.rs:86— // TODO: Do we want it to be 80% chance only too ? — 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 crates/evm/evm/src/executors/builder.rs:115— // TODO(monad-fen-lifecycle): Remove this argument after the backend's Monad fork-position — 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 crates/evm/evm/src/executors/corpus.rs:1845— // TODO(dani): currently only master syncs metrics? — 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 crates/evm/evm/src/executors/invariant/error.rs:275— /// TODO: dedup multiple distinct `assert(...)` within the same `(reverter, selector)` — 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 crates/evm/evm/src/executors/fuzz/mod.rs:1218— // TODO(dani): (pre-existing) conflicts with corpus metrics `set_message` — 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 crates/evm/core/src/utils.rs:20— // TODO: remove `#[cold]` and call `std::hint::cold_path` once stable. — 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 crates/config/src/lib.rs:2385— // TODO: We don't yet have a way to deserialize other outputs correctly, so request only — 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 crates/config/src/macros.rs:115— /// todo!() — 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 crates/config/src/macros.rs:133— /// todo!() — 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 crates/config/src/utils.rs:18— // TODO: Why do these exist separately from `Config::load`? — 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 crates/common/src/compile.rs:278— // TODO: Avoid using std::process::exit(0). — 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 crates/common/src/compile.rs:957— // TODO: detect vyper — 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 crates/common/src/io/shell.rs:432— // TODO: stdout is the canonical machine-readable result of a command and should NOT be — 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 crates/chisel/src/dispatcher.rs:187— // TODO: Add `known_contracts` back in. — 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 crates/chisel/src/executor.rs:357— // TODO: Verbosity option — 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 crates/chisel/src/executor.rs:471— // TODO: Verbosity option — 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 crates/chisel/src/source.rs:693— // TODO: mimics `get_or_try_init` — 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 crates/cheatcodes/spec/src/cheatcode.rs:161— // TODO: Find a better name for this — 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.
TooManyMethods: Backend crates/anvil/src/eth/backend/mem/mod.rs:1185— TooManyMethods — 324 methods, declared across 4 files: mem/mod.rs (290), mem/monad.rs (25), mem/tempo.rs (8), mem/base.rs (1). The bar is 30 methods; this is 294 over it, 10.80× 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: EthApi crates/anvil/src/eth/api.rs:156— TooManyMethods — 262 methods, declared across 2 files: eth/api.rs (246), otterscan/api.rs (16). The bar is 30 methods; this is 232 over it, 8.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: State crates/fmt/src/state/mod.rs:105— TooManyMethods — 144 methods, declared across 4 files: state/sol.rs (69), state/mod.rs (53), state/common.rs (13), state/yul.rs (9). The bar is 30 methods; this is 114 over it, 4.80× 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: SymbolicExecutor crates/evm/symbolic/src/lib.rs:574— TooManyMethods — 139 methods, declared across 9 files: executor/calls.rs (39), executor/run.rs (25), executor/cheatcodes.rs (23), executor/opcodes.rs (17), +5 more file(s). The bar is 30 methods; this is 109 over it, 4.63× 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: NodeConfig crates/anvil/src/config.rs:234— TooManyMethods — 123 methods. The bar is 30 methods; this is 93 over it, 4.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: Config crates/config/src/lib.rs:196— TooManyMethods — 112 methods. The bar is 30 methods; this is 82 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.
TooManyMethods: SymExpr crates/evm/symbolic/src/runtime/expr/expr.rs:377— TooManyMethods — 110 methods, declared across 4 files: expr/expr.rs (92), runtime/address.rs (10), normalize/mod.rs (7), fallback/mod.rs (1). The bar is 30 methods; this is 80 over it, 3.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: Backend crates/evm/core/src/backend/mod.rs:139— TooManyMethods — 100 methods, declared across 2 files: backend/mod.rs (98), backend/bal.rs (2). The bar is 30 methods; this is 70 over it, 3.33× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Cheatcodes crates/cheatcodes/src/inspector.rs:575— TooManyMethods — 88 methods. The bar is 30 methods; this is 58 over it, 2.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ClientFork crates/anvil/src/eth/backend/fork.rs:112— TooManyMethods — 72 methods. The bar is 30 methods; this is 42 over it, 2.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SymbolicWorld crates/evm/symbolic/src/runtime/state.rs:2194— TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Executor crates/evm/evm/src/executors/mod.rs:120— TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PathState crates/evm/symbolic/src/runtime/state.rs:10— TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Git crates/cli/src/utils/mod.rs:387— TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ConstraintContext crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:513— TooManyMethods — 62 methods, declared across 2 files: normalize/mod.rs (54), normalize/rounding.rs (8). The bar is 30 methods; this is 32 over it, 2.07× 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: CallTraceDecoder crates/evm/traces/src/decoder/mod.rs:238— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× 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: FunctionRunner crates/forge/src/runner.rs:1204— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× 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: ExecutionLifecycle crates/evm/core/src/evm/lifecycle.rs:453— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Printer crates/fmt/src/pp/mod.rs:76— TooManyMethods — 49 methods, declared across 3 files: pp/mod.rs (22), pp/convenience.rs (21), pp/helpers.rs (6). The bar is 30 methods; this is 19 over it, 1.63× 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: SymBoolExpr crates/evm/symbolic/src/runtime/expr/bool.rs:9— TooManyMethods — 47 methods, declared across 3 files: expr/bool.rs (37), normalize/mod.rs (8), fallback/mod.rs (2). The bar is 30 methods; this is 17 over it, 1.57× 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: SymMemory crates/evm/symbolic/src/runtime/memory.rs:55— TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× 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: Analyzer crates/lint/src/sol/high/reentrancy.rs:330— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× 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: EvmOpts crates/evm/core/src/opts.rs:49— TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Linker crates/linking/src/lib.rs:42— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: NetworkConfigs crates/evm/networks/src/lib.rs:373— TooManyMethods — 37 methods, declared across 2 files: src/lib.rs (35), src/optimism.rs (2). The bar is 30 methods; this is 7 over it, 1.23× 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.
State::print_comment (cognitive 162) crates/fmt/src/state/mod.rs:973— State::print_comment has cognitive complexity 162 (threshold 15). Drivers by points: if/else 46 (129 pts), loops 6 (18 pts), boolean chains 9, match/switch 3 (6 pts) (nesting depth added 98). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::commasep (cognitive 80) crates/fmt/src/state/common.rs:378— State::commasep has cognitive complexity 80 (threshold 15). Drivers by points: if/else 37 (58 pts), boolean chains 21, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::print_function (cognitive 72) crates/fmt/src/state/sol.rs:568— State::print_function has cognitive complexity 72 (threshold 15). Drivers by points: if/else 32 (53 pts), boolean chains 14, loops 2 (4 pts), match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::print_assign_rhs (cognitive 68) crates/fmt/src/state/sol.rs:897— State::print_assign_rhs has cognitive complexity 68 (threshold 15). Drivers by points: if/else 29 (53 pts), boolean chains 14, match/switch 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.
State::print_contract (cognitive 55) crates/fmt/src/state/sol.rs:329— State::print_contract has cognitive complexity 55 (threshold 15). Drivers by points: if/else 21 (43 pts), boolean chains 5, loops 3 (5 pts), match/switch 1 (2 pts) (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.
State::print_try_stmt (cognitive 49) crates/fmt/src/state/sol.rs:2480— State::print_try_stmt has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (40 pts), boolean chains 7, loops 1 (2 pts) (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.
State::print_ty (cognitive 48) crates/fmt/src/state/sol.rs:1203— State::print_ty has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (36 pts), match/switch 4 (10 pts), boolean chains 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::print_block_inner (cognitive 46) crates/fmt/src/state/common.rs:572— State::print_block_inner has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 9, match/switch 2 (3 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::print_comments (cognitive 46) crates/fmt/src/state/mod.rs:703— State::print_comments has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 6, loops 2 (4 pts), match/switch 1 (3 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
State::print_expr (cognitive 37) crates/fmt/src/state/sol.rs:1416— State::print_expr has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 9, match/switch 4 (7 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::commasep_opening_logic (cognitive 36) crates/fmt/src/state/common.rs:287— State::commasep_opening_logic has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 5, match/switch 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::estimate_size_inner (cognitive 31) crates/fmt/src/state/mod.rs:581— State::estimate_size_inner has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (7 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::print_wrapped_line (cognitive 28) crates/fmt/src/state/mod.rs:824— State::print_wrapped_line has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 11). Of this number, 26 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::print_yul_block (cognitive 28) crates/fmt/src/state/yul.rs:206— State::print_yul_block has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::print_fn_attribute (cognitive 27) crates/fmt/src/state/sol.rs:766— State::print_fn_attribute has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 14). 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.
State::brace_spacing_delta (cognitive 26) crates/fmt/src/state/mod.rs:466— State::brace_spacing_delta has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 3 (9 pts), boolean chains 1, 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.
State::print_bin_expr (cognitive 26) crates/fmt/src/state/sol.rs:1640— State::print_bin_expr has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 7 (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.
State::is_single_line_block (cognitive 26) crates/fmt/src/state/sol.rs:2740— State::is_single_line_block has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 6, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
State::print_source_unit (cognitive 24) crates/fmt/src/state/sol.rs:31— State::print_source_unit has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::print_index_expr (cognitive 23) crates/fmt/src/state/sol.rs:1719— State::print_index_expr has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::print_num_literal (cognitive 21) crates/fmt/src/state/common.rs:60— State::print_num_literal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 2). Of this number, 13 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
State::merge_comment_lines (cognitive 20) crates/fmt/src/state/mod.rs:917— State::merge_comment_lines has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::print_member_or_call_chain (cognitive 20) crates/fmt/src/state/sol.rs:1896— State::print_member_or_call_chain has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5 (nesting depth added 4). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::print_if_stmt (cognitive 20) crates/fmt/src/state/sol.rs:2364— State::print_if_stmt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State::print_lit_inner (cognitive 18) crates/fmt/src/state/common.rs:26— State::print_lit_inner has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (8 lines × 2) crates/anvil/src/eth/api.rs:3619— crates/anvil/src/eth/api.rs:3619-3626 | crates/anvil/src/eth/api.rs:3849-3856 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/api.rs:3619` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/anvil/src/eth/backend/mem/mod.rs:7479— crates/anvil/src/eth/backend/mem/mod.rs:7479-7486 | crates/anvil/src/eth/backend/mem/mod.rs:7579-7586 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/backend/mem/mod.rs:7479` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) crates/common/src/preprocessor/deps.rs:429— crates/common/src/preprocessor/deps.rs:429-436 | crates/common/src/preprocessor/deps.rs:458-465 — both copies are in the same file, so extract the 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) REDACTED:2201— REDACTED:2201-2208 | REDACTED:2388-2395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2201` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/evm/symbolic/src/executor/cheatcodes.rs:2520— crates/evm/symbolic/src/executor/cheatcodes.rs:2520-2528 | crates/evm/symbolic/src/executor/cheatcodes.rs:2552-2559 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/cheatcodes.rs:2520` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) crates/evm/symbolic/src/executor/equivalence.rs:202— crates/evm/symbolic/src/executor/equivalence.rs:202-209 | crates/evm/symbolic/src/executor/equivalence.rs:217-224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/equivalence.rs:202` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/evm/symbolic/src/executor/equivalence.rs:225` calls `check_timeout` and `crates/evm/symbolic/src/executor/equivalence.rs:210` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) crates/evm/symbolic/src/executor/opcodes.rs:973— crates/evm/symbolic/src/executor/opcodes.rs:973-980 | crates/evm/symbolic/src/executor/opcodes.rs:985-992 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/evm/symbolic/src/runtime/expr/bool.rs:657— crates/evm/symbolic/src/runtime/expr/bool.rs:657-664 | crates/evm/symbolic/src/runtime/expr/expr.rs:1329-1336 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) crates/evm/symbolic/src/runtime/expr/expr.rs:525— crates/evm/symbolic/src/runtime/expr/expr.rs:525-532 | crates/evm/symbolic/src/runtime/expr/expr.rs:577-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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/runtime/expr/expr.rs:525` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) crates/evm/symbolic/src/runtime/expr/expr.rs:1831— crates/evm/symbolic/src/runtime/expr/expr.rs:1831-1838 | crates/evm/symbolic/src/runtime/expr/expr.rs:1847-1854 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) crates/evm/symbolic/src/runtime/state.rs:724— crates/evm/symbolic/src/runtime/state.rs:724-731 | crates/evm/symbolic/src/runtime/state.rs:732-739 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/runtime/state.rs:724` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/fmt/src/state/sol.rs:2255— crates/fmt/src/state/sol.rs:2255-2262 | crates/fmt/src/state/sol.rs:2366-2374 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/forge/src/runner.rs:2183— crates/forge/src/runner.rs:2183-2190 | crates/forge/src/runner.rs:2336-2343 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/forge/src/runner.rs:2183` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/forge/src/symbolic_minimizer.rs:402— crates/forge/src/symbolic_minimizer.rs:402-409 | crates/forge/src/symbolic_minimizer.rs:1208-1215 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/forge/src/symbolic_minimizer.rs:402` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/lint/src/sol/high/reentrancy.rs:1316— crates/lint/src/sol/high/reentrancy.rs:1316-1323 | crates/lint/src/sol/high/reentrancy.rs:1385-1392 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/lint/src/sol/high/reentrancy.rs:1316` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/script/src/runner.rs:133— crates/script/src/runner.rs:133-140 | crates/script/src/runner.rs:178-185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/script/src/verify/external.rs:150— crates/script/src/verify/external.rs:150-157 | crates/script/src/verify/external.rs:203-210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/script/src/verify/external.rs:150` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/lint/src/sol/high/arbitrary_send_erc20.rs:592— crates/lint/src/sol/high/arbitrary_send_erc20.rs:592-599 | crates/lint/src/sol/high/arbitrary_send_eth.rs:301-308 — before extracting anything, compare `crates/lint/src/sol/high/arbitrary_send_erc20.rs` and `crates/lint/src/sol/high/arbitrary_send_eth.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/lint/src/sol/high/arbitrary_send_erc20.rs:592` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) crates/common/fmt/src/dynamic.rs:190— crates/common/fmt/src/dynamic.rs:190-197 | crates/common/fmt/src/dynamic.rs:201-208 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/common/fmt/src/dynamic.rs:190` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/evm/symbolic/src/runtime/expr/expr.rs:1196— crates/evm/symbolic/src/runtime/expr/expr.rs:1196-1203 | crates/evm/symbolic/src/runtime/expr/expr.rs:1760-1767 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) crates/forge/src/symbolic_minimizer.rs:549— crates/forge/src/symbolic_minimizer.rs:549-556 | crates/forge/src/symbolic_minimizer.rs:1181-1188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/forge/src/symbolic_minimizer.rs:549` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/anvil/src/eth/api.rs:3267— crates/anvil/src/eth/api.rs:3267-3274 | crates/anvil/src/eth/api.rs:3315-3323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/api.rs:3267` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) crates/anvil/src/eth/api.rs:1988— crates/anvil/src/eth/api.rs:1988-1995 | crates/anvil/src/eth/api.rs:4677-4684 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/anvil/src/eth/api.rs:4558— crates/anvil/src/eth/api.rs:4558-4565 | crates/anvil/src/eth/api.rs:4606-4613 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) crates/cast/src/cmd/wallet/configurable_account.rs:553— crates/cast/src/cmd/wallet/configurable_account.rs:553-560 | crates/script/src/owner_approvals.rs:546-553 — 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.
FunctionTooLong: cast::args::run_command crates/cast/src/args.rs:132— FunctionTooLong — cast::args::run_command runs 1005 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 905 over it, 10.05× 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: foundry_evm_symbolic::runtime::cheatcodes::foundry_cheatcode_min_input_size crates/evm/symbolic/src/runtime/cheatcodes.rs:7— FunctionTooLong — foundry_evm_symbolic::runtime::cheatcodes::foundry_cheatcode_min_input_size runs 261 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 161 over it, 2.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: foundry_cheatcodes::evm::get_recorded_state_diffs crates/cheatcodes/src/evm.rs:2229— FunctionTooLong — foundry_cheatcodes::evm::get_recorded_state_diffs runs 192 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 92 over it, 1.92× 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: forge::mutation::orchestrator::run_mutation_testing crates/forge/src/mutation/orchestrator.rs:134— FunctionTooLong — forge::mutation::orchestrator::run_mutation_testing runs 177 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 77 over it, 1.77× 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: cast::cmd::erc4626::check_compatibility crates/cast/src/cmd/erc4626.rs:1125— FunctionTooLong — cast::cmd::erc4626::check_compatibility runs 174 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 74 over it, 1.74× 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: foundry_evm_symbolic::runtime::solver::run_solver_commands crates/evm/symbolic/src/runtime/solver/mod.rs:1068— FunctionTooLong — foundry_evm_symbolic::runtime::solver::run_solver_commands runs 150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: forge_script::owner_approvals::prepare crates/script/src/owner_approvals.rs:155— FunctionTooLong — forge_script::owner_approvals::prepare 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: forge_doc::render::render_contract crates/doc/src/render.rs:70— FunctionTooLong — forge_doc::render::render_contract runs 140 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 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: foundry_evm::executors::showmap::replay_corpus_to_showmap crates/evm/evm/src/executors/showmap.rs:268— FunctionTooLong — foundry_evm::executors::showmap::replay_corpus_to_showmap 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.
FunctionTooLong: forge_script::verify::verify_contracts crates/script/src/verify.rs:427— FunctionTooLong — forge_script::verify::verify_contracts runs 134 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 34 over it, 1.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: anvil::eth::error::blockchain_error_to_rpc_result crates/anvil/src/eth/error/mod.rs:467— FunctionTooLong — anvil::eth::error::blockchain_error_to_rpc_result runs 129 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 29 over it, 1.29× 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: forge::symbolic_regression::plan_symbolic_regression crates/forge/src/symbolic_regression.rs:192— FunctionTooLong — forge::symbolic_regression::plan_symbolic_regression 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.
FunctionTooLong: forge::workspace::copy_project crates/forge/src/workspace.rs:269— FunctionTooLong — forge::workspace::copy_project runs 121 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 21 over it, 1.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: forge::symbolic_minimizer::minimize_compound_value crates/forge/src/symbolic_minimizer.rs:625— FunctionTooLong — forge::symbolic_minimizer::minimize_compound_value runs 118 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: anvil::try_spawn crates/anvil/src/lib.rs:142— FunctionTooLong — anvil::try_spawn runs 112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: foundry_evm::executors::invariant::result::can_continue crates/evm/evm/src/executors/invariant/result.rs:255— FunctionTooLong — foundry_evm::executors::invariant::result::can_continue runs 111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: foundry_common::preprocessor::deps::remove_bytecode_dependencies crates/common/src/preprocessor/deps.rs:866— FunctionTooLong — foundry_common::preprocessor::deps::remove_bytecode_dependencies runs 110 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 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: forge::symbolic_regression::write_call crates/forge/src/symbolic_regression.rs:375— FunctionTooLong — forge::symbolic_regression::write_call 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.
FunctionTooLong: foundry_cheatcodes::fs::deploy_code crates/cheatcodes/src/fs.rs:510— FunctionTooLong — foundry_cheatcodes::fs::deploy_code 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.
FunctionTooLong: foundry_evm::executors::corpus::replay_corpus_sequences crates/evm/evm/src/executors/corpus.rs:934— FunctionTooLong — foundry_evm::executors::corpus::replay_corpus_sequences runs 105 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 5 over it, 1.05× 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: foundry_evm_symbolic::runtime::solver::fallback::checked_mul_guard_branch_model crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:123— FunctionTooLong — foundry_evm_symbolic::runtime::solver::fallback::checked_mul_guard_branch_model runs 105 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 5 over it, 1.05× 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: forge::mutation::runner::run_mutations_parallel_with_progress crates/forge/src/mutation/runner.rs:165— FunctionTooLong — forge::mutation::runner::run_mutations_parallel_with_progress runs 104 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: foundry_evm::executors::showmap::replay_sequence_for_minimization crates/evm/evm/src/executors/showmap.rs:490— FunctionTooLong — foundry_evm::executors::showmap::replay_sequence_for_minimization runs 101 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 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
forge::cmd::clone::update_config_by_metadata (cognitive 111) crates/forge/src/cmd/clone.rs:416— forge::cmd::clone::update_config_by_metadata has cognitive complexity 111 (threshold 15). Drivers by points: if/else 57 (108 pts), loops 2 (3 pts) (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge::mutation::orchestrator::run_mutation_testing (cognitive 59) crates/forge/src/mutation/orchestrator.rs:134— forge::mutation::orchestrator::run_mutation_testing has cognitive complexity 59 (threshold 15). Drivers by points: if/else 20 (39 pts), boolean chains 7, match/switch 2 (7 pts), loops 3 (6 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.
forge::workspace::copy_project (cognitive 39) crates/forge/src/workspace.rs:269— forge::workspace::copy_project has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 5, boolean chains 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge::cmd::clone::dump_sources (cognitive 38) crates/forge/src/cmd/clone.rs:525— forge::cmd::clone::dump_sources has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge::cmd::fuzz::minimize_sequence (cognitive 34) crates/forge/src/cmd/fuzz.rs:770— forge::cmd::fuzz::minimize_sequence has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 5 (8 pts), boolean chains 4 (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.
forge::mutation::orchestrator::resolve_mutate_paths (cognitive 32) crates/forge/src/mutation/orchestrator.rs:565— forge::mutation::orchestrator::resolve_mutate_paths has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge::args::run_command (cognitive 30) crates/forge/src/args.rs:36— forge::args::run_command has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (22 pts), match/switch 3 (4 pts), boolean chains 2, loops 1 (2 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.
forge::cmd::watch::clean_cmd_args (cognitive 28) crates/forge/src/cmd/watch.rs:642— forge::cmd::watch::clean_cmd_args has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (9 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge::symbolic_minimizer::minimize_compound_value (cognitive 27) crates/forge/src/symbolic_minimizer.rs:625— forge::symbolic_minimizer::minimize_compound_value has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (26 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
forge::cmd::fmt::format_diff_summary (cognitive 26) crates/forge/src/cmd/fmt.rs:352— forge::cmd::fmt::format_diff_summary has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (10 pts), match/switch 1 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge::cmd::properties::project_fingerprint (cognitive 25) crates/forge/src/cmd/properties.rs:1463— forge::cmd::properties::project_fingerprint has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge::mutation::runner::run_mutations_parallel_with_progress (cognitive 25) crates/forge/src/mutation/runner.rs:165— forge::mutation::runner::run_mutations_parallel_with_progress has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge::sandbox::copy_project_tree (cognitive 21) crates/forge/src/sandbox.rs:335— forge::sandbox::copy_project_tree has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (7 pts), match/switch 2 (7 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge::symbolic_minimizer::minimize_value_pairs (cognitive 20) crates/forge/src/symbolic_minimizer.rs:542— forge::symbolic_minimizer::minimize_value_pairs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge::cmd::fuzz::push_scalar_value_candidates (cognitive 19) crates/forge/src/cmd/fuzz.rs:974— forge::cmd::fuzz::push_scalar_value_candidates has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (3 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.
forge::cmd::snapshot::diff (cognitive 19) crates/forge/src/cmd/snapshot.rs:463— forge::cmd::snapshot::diff has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 3 (4 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
forge::runner::select_stateful_frontiers (cognitive 19) crates/forge/src/runner.rs:141— forge::runner::select_stateful_frontiers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (4 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.
forge::runner::solve_live_invariant_frontier (cognitive 18) crates/forge/src/runner.rs:6260— forge::runner::solve_live_invariant_frontier has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 2, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge::cmd::properties::collect_tests (cognitive 17) crates/forge/src/cmd/properties.rs:1288— forge::cmd::properties::collect_tests has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge::cmd::watch::watch_doc (cognitive 17) crates/forge/src/cmd/watch.rs:532— forge::cmd::watch::watch_doc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
forge::cmd::fuzz::abi_calldata_candidates (cognitive 16) crates/forge/src/cmd/fuzz.rs:932— forge::cmd::fuzz::abi_calldata_candidates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge::symbolic_regression::attach_symbolic_regressions_to_suites (cognitive 16) crates/forge/src/symbolic_regression.rs:127— forge::symbolic_regression::attach_symbolic_regressions_to_suites has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 1 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SymbolicExecutor::handle_foundry_cheatcode (cognitive 217) crates/evm/symbolic/src/executor/cheatcodes.rs:1000— SymbolicExecutor::handle_foundry_cheatcode has cognitive complexity 217 (threshold 15). Drivers by points: if/else 91 (162 pts), match/switch 13 (28 pts), loops 8 (16 pts), boolean chains 11 (nesting depth added 94). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolicExecutor::step (cognitive 177) crates/evm/symbolic/src/executor/opcodes.rs:481— SymbolicExecutor::step has cognitive complexity 177 (threshold 15). Drivers by points: if/else 60 (125 pts), match/switch 18 (38 pts), boolean chains 12, loops 1 (2 pts) (nesting depth added 86). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolicExecutor::call_concrete_target (cognitive 156) crates/evm/symbolic/src/executor/calls.rs:925— SymbolicExecutor::call_concrete_target has cognitive complexity 156 (threshold 15). Drivers by points: if/else 68 (110 pts), boolean chains 23, match/switch 8 (16 pts), loops 3 (7 pts) (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolicExecutor::search_invariant_candidates_inner (cognitive 108) crates/evm/symbolic/src/executor/invariant.rs:93— SymbolicExecutor::search_invariant_candidates_inner has cognitive complexity 108 (threshold 15). Drivers by points: if/else 13 (59 pts), match/switch 7 (30 pts), loops 6 (19 pts) (nesting depth added 82). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolicExecutor::execute_call_path_batch (cognitive 90) crates/evm/symbolic/src/executor/mod.rs:343— SymbolicExecutor::execute_call_path_batch has cognitive complexity 90 (threshold 15). Drivers by points: if/else 20 (64 pts), match/switch 6 (19 pts), boolean chains 4, loops 2 (3 pts) (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.
SymbolicExecutor::run_invariant_inner (cognitive 78) crates/evm/symbolic/src/executor/run.rs:664— SymbolicExecutor::run_invariant_inner has cognitive complexity 78 (threshold 15). Drivers by points: if/else 12 (41 pts), loops 8 (30 pts), match/switch 1 (7 pts) (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolicExecutor::call_symbolic_target (cognitive 70) crates/evm/symbolic/src/executor/calls.rs:1956— SymbolicExecutor::call_symbolic_target has cognitive complexity 70 (threshold 15). Drivers by points: if/else 26 (53 pts), boolean chains 7, match/switch 3 (7 pts), loops 2 (3 pts) (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
SymbolicExecutor::create (cognitive 47) crates/evm/symbolic/src/executor/create.rs:4— SymbolicExecutor::create has cognitive complexity 47 (threshold 15). Drivers by points: if/else 25 (37 pts), match/switch 4 (5 pts), boolean chains 4, 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.
SymbolicExecutor::mapping_storage_provenance (cognitive 46) crates/evm/symbolic/src/executor/opcodes.rs:55— SymbolicExecutor::mapping_storage_provenance has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (37 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolicExecutor::call (cognitive 44) crates/evm/symbolic/src/executor/calls.rs:7— SymbolicExecutor::call has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 8, match/switch 5 (8 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.
SymbolicExecutor::run_inner (cognitive 41) crates/evm/symbolic/src/executor/run.rs:390— SymbolicExecutor::run_inner has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (21 pts), match/switch 4 (14 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolicExecutor::join_call_outcome (cognitive 37) crates/evm/symbolic/src/executor/mod.rs:157— SymbolicExecutor::join_call_outcome has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 8, match/switch 3 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolicExecutor::free_address_write_targets (cognitive 30) crates/evm/symbolic/src/executor/cheatcodes.rs:593— SymbolicExecutor::free_address_write_targets has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (3 pts), match/switch 3, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolicExecutor::deploy_code_cheatcode_call (cognitive 22) crates/evm/symbolic/src/executor/cheatcodes.rs:359— SymbolicExecutor::deploy_code_cheatcode_call has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolicExecutor::split_symbolic_target_candidate (cognitive 21) crates/evm/symbolic/src/executor/calls.rs:2236— SymbolicExecutor::split_symbolic_target_candidate has cognitive complexity 21 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 5 (8 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SymbolicExecutor::equivalence_mismatch (cognitive 21) crates/evm/symbolic/src/executor/equivalence.rs:338— SymbolicExecutor::equivalence_mismatch has cognitive complexity 21 (threshold 15). Drivers by points: loops 8 (11 pts), if/else 6 (9 pts), boolean chains 1 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SymbolicExecutor::pop_next_feasible_path (cognitive 21) crates/evm/symbolic/src/executor/mod.rs:100— SymbolicExecutor::pop_next_feasible_path has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 2 (6 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolicExecutor::run_equivalence_inner (cognitive 19) crates/evm/symbolic/src/executor/equivalence.rs:165— SymbolicExecutor::run_equivalence_inner has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (6 pts), match/switch 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolicExecutor::finish_codeless_call (cognitive 18) crates/evm/symbolic/src/executor/calls.rs:664— SymbolicExecutor::finish_codeless_call has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7 (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.
SymbolicExecutor::classify_revert (cognitive 18) crates/evm/symbolic/src/executor/opcodes.rs:1613— SymbolicExecutor::classify_revert has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
SymbolicExecutor::handle_log (cognitive 16) crates/evm/symbolic/src/executor/calls.rs:835— SymbolicExecutor::handle_log has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 1 (2 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.
Duplicated block (5 lines × 2) crates/anvil/src/eth/api.rs:3223— crates/anvil/src/eth/api.rs:3223-3227 | crates/anvil/src/eth/api.rs:3245-3249 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/anvil/src/eth/api.rs:3260— crates/anvil/src/eth/api.rs:3260-3265 | crates/anvil/src/eth/api.rs:3309-3313 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/api.rs:3260` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/anvil/src/eth/api.rs:5155— crates/anvil/src/eth/api.rs:5155-5159 | crates/anvil/src/eth/api.rs:5178-5182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/api.rs:5155` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/cast/src/cmd/mktx.rs:203— crates/cast/src/cmd/mktx.rs:203-209 | crates/cast/src/cmd/send.rs:278-282 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) crates/common/src/contracts.rs:283— crates/common/src/contracts.rs:283-287 | crates/evm/traces/src/identifier/local.rs:68-72 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/common/src/contracts.rs:283` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/common/src/serde_helpers.rs:33— crates/common/src/serde_helpers.rs:33-37 | crates/config/src/utils.rs:322-326 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/common/src/serde_helpers.rs:33` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/evm/core/src/evm/lifecycle.rs:1734— crates/evm/core/src/evm/lifecycle.rs:1734-1738 | crates/evm/core/src/evm/lifecycle.rs:1759-1763 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/core/src/evm/lifecycle.rs:1734` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/evm/symbolic/src/executor/invariant.rs:108— crates/evm/symbolic/src/executor/invariant.rs:108-112 | crates/evm/symbolic/src/executor/run.rs:686-690 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/invariant.rs:108` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (5 lines × 2) crates/evm/symbolic/src/runtime/expr/bool.rs:228— crates/evm/symbolic/src/runtime/expr/bool.rs:228-232 | crates/evm/symbolic/src/runtime/expr/bool.rs:243-247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/evm/symbolic/src/runtime/expr/expr.rs:964— crates/evm/symbolic/src/runtime/expr/expr.rs:964-968 | crates/evm/symbolic/src/runtime/expr/expr.rs:971-975 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/runtime/expr/expr.rs:964` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:467— crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:467-473 | crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:474-478 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) crates/forge/src/symbolic_minimizer.rs:524— crates/forge/src/symbolic_minimizer.rs:524-528 | crates/forge/src/symbolic_minimizer.rs:1145-1149 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/forge/src/symbolic_minimizer.rs:524` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/cast/src/cmd/erc20.rs:319— crates/cast/src/cmd/erc20.rs:319-323 | crates/cast/src/cmd/erc4626.rs:949-953 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cast/src/cmd/erc20.rs:319` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/cheatcodes/src/crypto.rs:631— crates/cheatcodes/src/crypto.rs:631-635 | crates/cheatcodes/src/crypto.rs:639-643 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cheatcodes/src/crypto.rs:631` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/cast/src/cmd/configurable_key_auth.rs:159— crates/cast/src/cmd/configurable_key_auth.rs:159-163 | crates/cast/src/cmd/wallet/configurable_account.rs:383-387 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) crates/config/src/providers/ext.rs:106— crates/config/src/providers/ext.rs:106-110 | crates/config/src/providers/ext.rs:169-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/config/src/providers/ext.rs:99` calls `Ok`, `file`, `clone` and `crates/config/src/providers/ext.rs:166` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) crates/evm/core/src/evm/lifecycle.rs:1101— crates/evm/core/src/evm/lifecycle.rs:1101-1105 | crates/evm/core/src/evm/lifecycle.rs:1153-1157 — both copies are in the same file, so extract the 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) .github/scripts/finalize-release.py:81— .github/scripts/finalize-release.py:81-85 | .github/scripts/finalize-release.py:92-96 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/evm/fuzz/src/strategies/param.rs:243— crates/evm/fuzz/src/strategies/param.rs:243-247 | crates/evm/fuzz/src/strategies/param.rs:276-280 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/fuzz/src/strategies/param.rs:243` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) crates/evm/evm/src/executors/fuzz/mod.rs:506— crates/evm/evm/src/executors/fuzz/mod.rs:506-510 | crates/evm/evm/src/executors/fuzz/mod.rs:813-817 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
State::print_comment (cyclomatic 64) crates/fmt/src/state/mod.rs:973— State::print_comment has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
State::commasep (cyclomatic 52) crates/fmt/src/state/common.rs:378— State::commasep has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
State::print_function (cyclomatic 46) crates/fmt/src/state/sol.rs:568— State::print_function has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
State::print_expr (cyclomatic 41) crates/fmt/src/state/sol.rs:1416— State::print_expr has cyclomatic complexity 41 (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.
State::print_assign_rhs (cyclomatic 38) crates/fmt/src/state/sol.rs:897— State::print_assign_rhs has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
State::print_block_inner (cyclomatic 30) crates/fmt/src/state/common.rs:572— State::print_block_inner has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
State::print_contract (cyclomatic 29) crates/fmt/src/state/sol.rs:329— State::print_contract 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.
State::print_comments (cyclomatic 28) crates/fmt/src/state/mod.rs:703— State::print_comments has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
State::print_ty (cyclomatic 27) crates/fmt/src/state/sol.rs:1203— State::print_ty has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
State::print_stmt_bound (cyclomatic 27) crates/fmt/src/state/sol.rs:2081— State::print_stmt_bound 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.
State::is_single_line_block (cyclomatic 23) crates/fmt/src/state/sol.rs:2740— State::is_single_line_block has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
State::commasep_opening_logic (cyclomatic 22) crates/fmt/src/state/common.rs:287— State::commasep_opening_logic 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.
State::print_try_stmt (cyclomatic 22) crates/fmt/src/state/sol.rs:2480— State::print_try_stmt 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.
State::estimate_size_inner (cyclomatic 21) crates/fmt/src/state/mod.rs:581— State::estimate_size_inner has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
State::print_yul_stmt (cyclomatic 19) crates/fmt/src/state/yul.rs:21— State::print_yul_stmt 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.
State::print_bin_expr (cyclomatic 18) crates/fmt/src/state/sol.rs:1640— State::print_bin_expr 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.
State::print_wrapped_line (cyclomatic 17) crates/fmt/src/state/mod.rs:824— State::print_wrapped_line has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 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.
State::print_num_literal (cyclomatic 16) crates/fmt/src/state/common.rs:60— State::print_num_literal has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
State::brace_spacing_delta (cyclomatic 16) crates/fmt/src/state/mod.rs:466— State::brace_spacing_delta 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.
SymbolicExecutor::handle_foundry_cheatcode (cyclomatic 244) crates/evm/symbolic/src/executor/cheatcodes.rs:1000— SymbolicExecutor::handle_foundry_cheatcode has cyclomatic complexity 244 (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.
SymbolicExecutor::step (cyclomatic 175) crates/evm/symbolic/src/executor/opcodes.rs:481— SymbolicExecutor::step has cyclomatic complexity 175 (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.
SymbolicExecutor::call_concrete_target (cyclomatic 100) crates/evm/symbolic/src/executor/calls.rs:925— SymbolicExecutor::call_concrete_target has cyclomatic complexity 100 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SymbolicExecutor::call_symbolic_target (cyclomatic 39) crates/evm/symbolic/src/executor/calls.rs:1956— SymbolicExecutor::call_symbolic_target has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SymbolicExecutor::execute_call_path_batch (cyclomatic 38) crates/evm/symbolic/src/executor/mod.rs:343— SymbolicExecutor::execute_call_path_batch has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SymbolicExecutor::call (cyclomatic 37) crates/evm/symbolic/src/executor/calls.rs:7— SymbolicExecutor::call has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SymbolicExecutor::create (cyclomatic 36) crates/evm/symbolic/src/executor/create.rs:4— SymbolicExecutor::create has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SymbolicExecutor::search_invariant_candidates_inner (cyclomatic 30) crates/evm/symbolic/src/executor/invariant.rs:93— SymbolicExecutor::search_invariant_candidates_inner has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SymbolicExecutor::join_call_outcome (cyclomatic 29) crates/evm/symbolic/src/executor/mod.rs:157— SymbolicExecutor::join_call_outcome 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.
SymbolicExecutor::mapping_storage_provenance (cyclomatic 22) crates/evm/symbolic/src/executor/opcodes.rs:55— SymbolicExecutor::mapping_storage_provenance 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.
SymbolicExecutor::run_inner (cyclomatic 22) crates/evm/symbolic/src/executor/run.rs:390— SymbolicExecutor::run_inner 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.
SymbolicExecutor::free_address_write_targets (cyclomatic 21) crates/evm/symbolic/src/executor/cheatcodes.rs:593— SymbolicExecutor::free_address_write_targets 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.
SymbolicExecutor::run_invariant_inner (cyclomatic 21) crates/evm/symbolic/src/executor/run.rs:664— SymbolicExecutor::run_invariant_inner 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.
SymbolicExecutor::deploy_code_cheatcode_call (cyclomatic 20) crates/evm/symbolic/src/executor/cheatcodes.rs:359— SymbolicExecutor::deploy_code_cheatcode_call has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SymbolicExecutor::handle_symbolic_vm_cheatcode (cyclomatic 19) crates/evm/symbolic/src/executor/cheatcodes.rs:2864— SymbolicExecutor::handle_symbolic_vm_cheatcode 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.
SymbolicExecutor::classify_revert (cyclomatic 17) crates/evm/symbolic/src/executor/opcodes.rs:1613— SymbolicExecutor::classify_revert has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SymbolicExecutor::equivalence_mismatch (cyclomatic 16) crates/evm/symbolic/src/executor/equivalence.rs:338— SymbolicExecutor::equivalence_mismatch has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Duplicated block (6 lines × 2) crates/anvil/src/eth/api.rs:3009— crates/anvil/src/eth/api.rs:3009-3014 | crates/anvil/src/eth/api.rs:3081-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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/api.rs:3009` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) crates/anvil/src/eth/backend/fork.rs:402— crates/anvil/src/eth/backend/fork.rs:402-407 | crates/anvil/src/eth/backend/fork.rs:456-463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/backend/fork.rs:402` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 2) crates/anvil/src/pubsub.rs:213— crates/anvil/src/pubsub.rs:213-218 | crates/anvil/src/pubsub.rs:228-233 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) crates/evm/symbolic/src/abi.rs:392— crates/evm/symbolic/src/abi.rs:392-397 | crates/evm/symbolic/src/abi.rs:415-420 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/abi.rs:392` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) crates/evm/symbolic/src/executor/cheatcodes.rs:378— crates/evm/symbolic/src/executor/cheatcodes.rs:378-383 | crates/evm/symbolic/src/executor/create.rs:51-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/cheatcodes.rs:378` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) crates/evm/symbolic/src/executor/opcodes.rs:354— crates/evm/symbolic/src/executor/opcodes.rs:354-359 | crates/evm/symbolic/src/executor/opcodes.rs:465-470 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/opcodes.rs:354` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/evm/symbolic/src/executor/opcodes.rs:471` calls `expand_range`, `clone` and `crates/evm/symbolic/src/executor/opcodes.rs:360` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) crates/evm/symbolic/src/runtime/expr/expr.rs:531— crates/evm/symbolic/src/runtime/expr/expr.rs:531-536 | crates/evm/symbolic/src/runtime/expr/expr.rs:538-543 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/evm/symbolic/src/runtime/expr/expr.rs:626— crates/evm/symbolic/src/runtime/expr/expr.rs:626-631 | crates/evm/symbolic/src/runtime/expr/expr.rs:656-661 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/evm/symbolic/src/runtime/expr/expr.rs:925— crates/evm/symbolic/src/runtime/expr/expr.rs:925-930 | crates/evm/symbolic/src/runtime/expr/expr.rs:932-941 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/evm/symbolic/src/runtime/solver/reasoning/monotonic_product.rs:90— crates/evm/symbolic/src/runtime/solver/reasoning/monotonic_product.rs:90-95 | crates/evm/symbolic/src/runtime/solver/reasoning/monotonic_product.rs:97-102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) crates/evm/traces/src/decoder/mod.rs:1373— crates/evm/traces/src/decoder/mod.rs:1373-1378 | crates/evm/traces/src/decoder/mod.rs:1382-1388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/lint/src/sol/high/arbitrary_send_erc20.rs:585— crates/lint/src/sol/high/arbitrary_send_erc20.rs:585-590 | crates/lint/src/sol/high/arbitrary_send_eth.rs:295-300 — before extracting anything, compare `crates/lint/src/sol/high/arbitrary_send_erc20.rs` and `crates/lint/src/sol/high/arbitrary_send_eth.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) crates/lint/src/sol/high/arbitrary_send_erc20.rs:658— crates/lint/src/sol/high/arbitrary_send_erc20.rs:658-663 | crates/lint/src/sol/high/arbitrary_send_eth.rs:373-378 — before extracting anything, compare `crates/lint/src/sol/high/arbitrary_send_erc20.rs` and `crates/lint/src/sol/high/arbitrary_send_eth.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/lint/src/sol/high/arbitrary_send_erc20.rs:658` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 2) crates/cast/src/cmd/batch_mktx.rs:110— crates/cast/src/cmd/batch_mktx.rs:110-115 | crates/cast/src/cmd/batch_send.rs:99-104 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/cast/src/cmd/batch_send.rs:95` calls `Some`, `key_id` and `crates/cast/src/cmd/batch_mktx.rs:108` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) crates/evm/symbolic/src/runtime/expr/bool.rs:675— crates/evm/symbolic/src/runtime/expr/bool.rs:675-680 | crates/evm/symbolic/src/runtime/expr/expr.rs:2083-2088 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) crates/forge/src/cmd/clone.rs:1035— crates/forge/src/cmd/clone.rs:1035-1040 | crates/forge/src/cmd/clone.rs:1045-1050 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/anvil/src/eth/backend/mem/state.rs:317— crates/anvil/src/eth/backend/mem/state.rs:317-322 | crates/anvil/src/eth/backend/mem/state.rs:340-345 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/backend/mem/state.rs:317` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×15
Edited copy of a member (11 corresponding lines) crates/cheatcodes/src/crypto.rs:785— crates/cheatcodes/src/crypto.rs:785-795 | crates/cheatcodes/src/crypto.rs:797-807 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/anvil/src/eth/backend/mem/inspector.rs:397— crates/anvil/src/eth/backend/mem/inspector.rs:397-407 | crates/anvil/src/eth/backend/mem/inspector.rs:436-447 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/evm/symbolic/src/runtime/bytes.rs:105— crates/evm/symbolic/src/runtime/bytes.rs:105-116 | crates/evm/symbolic/src/runtime/memory.rs:453-463 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/evm/symbolic/src/runtime/solver/smt/mod.rs:190— crates/evm/symbolic/src/runtime/solver/smt/mod.rs:190-200 | crates/evm/symbolic/src/runtime/solver/smt/mod.rs:202-215 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/anvil/src/eth/api.rs:1301— crates/anvil/src/eth/api.rs:1301-1311 | crates/anvil/src/eth/api.rs:1320-1330 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/anvil/src/eth/backend/mem/mod.rs:6059— crates/anvil/src/eth/backend/mem/mod.rs:6059-6070 | crates/anvil/src/eth/backend/mem/mod.rs:6079-6089 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/anvil/server/src/lib.rs:98— crates/anvil/server/src/lib.rs:98-111 | crates/common/src/provider/mod.rs:524-534 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/cheatcodes/src/json.rs:443— crates/cheatcodes/src/json.rs:443-454 | crates/cheatcodes/src/json.rs:456-466 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/config/src/inline/mod.rs:128— crates/config/src/inline/mod.rs:128-141 | crates/config/src/inline/mod.rs:149-159 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/lint/src/sol/low/missing_events_arithmetic.rs:169— crates/lint/src/sol/low/missing_events_arithmetic.rs:169-179 | crates/lint/src/sol/low/missing_events_arithmetic.rs:390-401 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/anvil/src/eth/backend/fork.rs:703— crates/anvil/src/eth/backend/fork.rs:703-713 | crates/anvil/src/eth/backend/fork.rs:740-754 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/evm/evm/src/executors/showmap.rs:806— crates/evm/evm/src/executors/showmap.rs:806-816 | crates/forge/src/cmd/fuzz.rs:1354-1366 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/lint/src/sol/low/deprecated_oz_function.rs:22— crates/lint/src/sol/low/deprecated_oz_function.rs:22-32 | crates/lint/src/sol/low/solmate_safe_transfer_lib.rs:19-29 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/cli/src/utils/mod.rs:414— crates/cli/src/utils/mod.rs:414-424 | crates/cli/src/utils/mod.rs:431-441 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) crates/evm/fuzz/src/strategies/int.rs:30— crates/evm/fuzz/src/strategies/int.rs:30-40 | crates/evm/fuzz/src/strategies/uint.rs:30-40 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Analyzer::analyze_expr (cyclomatic 34) crates/lint/src/sol/high/reentrancy.rs:623— Analyzer::analyze_expr has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Analyzer::analyze_stmt (cyclomatic 28) crates/lint/src/sol/high/reentrancy.rs:480— Analyzer::analyze_stmt has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Analyzer::analyze_stmt (cyclomatic 27) crates/lint/src/sol/low/reentrancy_events.rs:214— Analyzer::analyze_stmt has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Analyzer::visit_stmt (cyclomatic 22) crates/lint/src/sol/high/controlled_delegatecall.rs:251— Analyzer::visit_stmt has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Analyzer::stmt (cyclomatic 21) crates/lint/src/sol/high/arbitrary_send_erc20.rs:540— Analyzer::stmt 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.
Analyzer::reads (cyclomatic 20) crates/lint/src/sol/gas/write_after_write.rs:187— Analyzer::reads 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.
Analyzer::stmt (cyclomatic 20) crates/lint/src/sol/high/arbitrary_send_eth.rs:265— Analyzer::stmt has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Analyzer::check_stmt (cyclomatic 19) crates/lint/src/sol/gas/write_after_write.rs:48— Analyzer::check_stmt 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.
Analyzer::visit_expr (cyclomatic 19) crates/lint/src/sol/med/ecrecover.rs:766— Analyzer::visit_expr 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.
Analyzer::add_facts (cyclomatic 18) crates/lint/src/sol/med/ecrecover.rs:554— Analyzer::add_facts 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.
Analyzer::run_stmt (cyclomatic 18) crates/lint/src/sol/med/ecrecover.rs:646— Analyzer::run_stmt 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.
Analyzer::guard_has_stale_balance_comparison (cyclomatic 17) crates/lint/src/sol/high/reentrancy.rs:1031— Analyzer::guard_has_stale_balance_comparison 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.
Analyzer::balance_forms (cyclomatic 17) crates/lint/src/sol/high/reentrancy.rs:1353— Analyzer::balance_forms 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.
Analyzer::is_trusted_target_inner (cyclomatic 16) crates/lint/src/sol/high/controlled_delegatecall.rs:93— Analyzer::is_trusted_target_inner has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Analyzer::analyze_expr (cognitive 51) crates/lint/src/sol/high/reentrancy.rs:623— Analyzer::analyze_expr has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (34 pts), loops 3 (7 pts), boolean chains 6, match/switch 2 (4 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Analyzer::add_facts (cognitive 34) crates/lint/src/sol/med/ecrecover.rs:554— Analyzer::add_facts has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 2 (4 pts), match/switch 2 (4 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Analyzer::visit_stmt (cognitive 28) crates/lint/src/sol/high/controlled_delegatecall.rs:251— Analyzer::visit_stmt has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 3 (7 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 14). 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.
Analyzer::stmt (cognitive 27) crates/lint/src/sol/high/arbitrary_send_erc20.rs:540— Analyzer::stmt has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Analyzer::analyze_stmt (cognitive 27) crates/lint/src/sol/high/reentrancy.rs:480— Analyzer::analyze_stmt has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 4, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Analyzer::analyze_stmt (cognitive 27) crates/lint/src/sol/low/reentrancy_events.rs:214— Analyzer::analyze_stmt has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 3 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Analyzer::add_facts (cognitive 26) crates/lint/src/sol/high/arbitrary_send_erc20.rs:402— Analyzer::add_facts has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 1 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 15). 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.
Analyzer::stmt (cognitive 23) crates/lint/src/sol/high/arbitrary_send_eth.rs:265— Analyzer::stmt has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Analyzer::visit_expr (cognitive 21) crates/lint/src/sol/med/ecrecover.rs:766— Analyzer::visit_expr has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Analyzer::visit_expr (cognitive 18) crates/lint/src/sol/high/arbitrary_send_erc20.rs:650— Analyzer::visit_expr has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 1 (3 pts), boolean chains 2, 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.
Analyzer::add_facts (cognitive 16) crates/lint/src/sol/high/arbitrary_send_eth.rs:214— Analyzer::add_facts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 pts), boolean chains 1, 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.
Analyzer::add_facts_unchecked (cognitive 16) crates/lint/src/sol/high/controlled_delegatecall.rs:180— Analyzer::add_facts_unchecked has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 pts), boolean chains 1, 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.
Analyzer::balance_forms (cognitive 16) crates/lint/src/sol/high/reentrancy.rs:1353— Analyzer::balance_forms has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), boolean chains 5, match/switch 3 (5 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Analyzer::analyze_expr (cognitive 16) crates/lint/src/sol/low/reentrancy_events.rs:321— Analyzer::analyze_expr has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 3 (6 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 4). 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.
Backend::simulate_raw (cognitive 165) crates/anvil/src/eth/backend/mem/mod.rs:9386— Backend::simulate_raw has cognitive complexity 165 (threshold 15). Drivers by points: if/else 61 (135 pts), boolean chains 12, loops 5 (9 pts), match/switch 4 (9 pts) (nesting depth added 83). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Backend::validate_pool_transaction_for (cognitive 71) crates/anvil/src/eth/backend/mem/mod.rs:10607— Backend::validate_pool_transaction_for has cognitive complexity 71 (threshold 15). Drivers by points: if/else 29 (55 pts), boolean chains 12, match/switch 2 (4 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Backend::load_state (cognitive 65) crates/anvil/src/eth/backend/mem/mod.rs:8839— Backend::load_state has cognitive complexity 65 (threshold 15). Drivers by points: if/else 36 (50 pts), boolean chains 8, loops 3 (6 pts), match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Backend::validate_pool_transaction (cognitive 37) crates/anvil/src/eth/backend/mem/mod.rs:10463— Backend::validate_pool_transaction has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Backend::do_mine_block_locked (cognitive 28) crates/anvil/src/eth/backend/mem/mod.rs:6510— Backend::do_mine_block_locked has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21 (23 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Backend::with_genesis (cognitive 27) crates/anvil/src/eth/backend/mem/mod.rs:4642— Backend::with_genesis has cognitive complexity 27 (threshold 15). Drivers by points: if/else 23 (27 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Backend::stage_fork_reset (cognitive 26) crates/anvil/src/eth/backend/mem/mod.rs:5193— Backend::stage_fork_reset has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 9, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Backend::parse_transaction_request (cognitive 21) crates/anvil/src/eth/backend/mem/mod.rs:3454— Backend::parse_transaction_request has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 8 (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.
Backend::debug_execution_witness (cognitive 17) crates/anvil/src/eth/backend/mem/mod.rs:7930— Backend::debug_execution_witness has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 3 (4 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Backend::get_blob_by_versioned_hash (cognitive 16) crates/anvil/src/eth/backend/mem/mod.rs:4617— Backend::get_blob_by_versioned_hash has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Backend::removed_logs_since (cognitive 16) crates/anvil/src/eth/backend/mem/mod.rs:5939— Backend::removed_logs_since has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 2 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Backend::apply_fork_transaction_replay (cognitive 16) crates/anvil/src/eth/backend/mem/mod.rs:6130— Backend::apply_fork_transaction_replay has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 4, loops 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Backend::rollback_and_publish (cognitive 16) crates/anvil/src/eth/backend/mem/mod.rs:8072— Backend::rollback_and_publish has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 2 (5 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Change coupling: mktx.rs ↔ send.rs crates/cast/src/cmd/mktx.rs:1— `crates/cast/src/cmd/mktx.rs` and `crates/cast/src/cmd/send.rs` change together 80% of the time (28 of the 35 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 28 shared commits counted here, the most recent 3 are `b8eadaa9` feat(tempo): detect configurable account senders in cast and forge (#…; `b18a091f` feat(cast): Tempo configurable accounts in cast wallet (#18378); `7d1c2338` refactor(tempo): decouple wallets and mpp (#18095) — run `git show` on any of them.
Change coupling: access_list.rs ↔ call.rs crates/cast/src/cmd/access_list.rs:1— `crates/cast/src/cmd/access_list.rs` and `crates/cast/src/cmd/call.rs` change together 68% of the time (15 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `e65dedad` fix(cast): use --from without unlocking wallet (#17404); `2494dc85` fix(cast,script): resolve transaction networks more consistently (#16…; `22931fe9` fix(cast): complete browser wallet restoration (#16015) — run `git show` on any of them.
Change coupling: calldata.rs ↔ invariants.rs crates/evm/fuzz/src/strategies/calldata.rs:1— `crates/evm/fuzz/src/strategies/calldata.rs` and `crates/evm/fuzz/src/strategies/invariants.rs` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `f8798eb7` perf(fuzz): reduce inactive inspector overhead (#15380); `7ba38c2f` fix(fuzz): bound enum inputs to valid variants (#15375); `e8e36e38` perf(fuzz): remove locks from invariant dictionaries (#14806) — run `git show` on any of them.
Change coupling: handlers.rs ↔ mod.rs crates/anvil/src/server/beacon/handlers.rs:1— `crates/anvil/src/server/beacon/handlers.rs` and `crates/anvil/src/server/mod.rs` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `e783a509` refactor(anvil): make EthApi generic over `N: Network` (#13751); `b6d41bed` chore(anvil): tidy up `anvil::server` module (#12663); `a3355751` chore(anvil): deprecate `getBlobSidecars` Beacon API endpoint (#12568) (at that commit the file was still `crates/anvil/src/server/beacon_handler.rs`) — run `git show` on any of them.
Change coupling: mod.rs ↔ lib.rs crates/evm/core/src/fork/mod.rs:1— `crates/evm/core/src/fork/mod.rs` and `crates/script/src/lib.rs` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `fd6f899e` perf(fork): prefetch the state of simulated calls (#18247); `2b4b0553` refactor(fork): let backends own fork preparation (#17376); `587f37b9` fix(evm): preserve exact fork ancestry (#16131) — run `git show` on any of them.
Change coupling: call.rs ↔ estimate.rs crates/cast/src/cmd/call.rs:1— `crates/cast/src/cmd/call.rs` and `crates/cast/src/cmd/estimate.rs` change together 55% of the time (17 of the 31 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `e65dedad` fix(cast): use --from without unlocking wallet (#17404); `2494dc85` fix(cast,script): resolve transaction networks more consistently (#16…; `22931fe9` fix(cast): complete browser wallet restoration (#16015) — run `git show` on any of them.
Change coupling: macros.rs ↔ util.rs crates/test-utils/src/macros.rs:1— `crates/test-utils/src/macros.rs` and `crates/test-utils/src/util.rs` change together 52% of the time (11 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `ea7b1546` test: log TestCommand exit status, output (#12137); `0d830288` feat: snapbox migration (#8728); `84d98427` test: improve external tests (#6991) — run `git show` on any of them.
Change coupling: mod.rs ↔ sourcify.rs crates/verify/src/etherscan/mod.rs:1— `crates/verify/src/etherscan/mod.rs` and `crates/verify/src/sourcify.rs` change together 51% of the time (18 of the 35 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 18 shared commits counted here, the most recent 3 are `f936b23d` feat(forge): verify external factory deployments (#15863); `0a2d4cce` fix(verify): keep create --verify stdout clean (#15636); `82a76b66` feat(verify): submit to Etherscan and Sourcify in one go (#15124) — run `git show` on any of them.
Change coupling: lib.rs ↔ flatten.rs crates/config/src/lib.rs:1— `crates/config/src/lib.rs` and `crates/forge/src/cmd/flatten.rs` change together 50% of the time (15 of the 30 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 15 shared commits counted here, the most recent 3 are `0e519ffd` chore: tweak coverage warnings (#9814) (at that commit the file was still `crates/forge/bin/cmd/flatten.rs`); `fbad377a` bump compilers (#8011) (at that commit the file was still `crates/forge/bin/cmd/flatten.rs`); `0a4d2462` feat: optimize compilation by reading AST (#7599) (at that commit the file was still `crates/forge/bin/cmd/flatten.rs`) — run `git show` on any of them.
Change coupling: mod.rs ↔ replay.rs crates/evm/evm/src/executors/fuzz/mod.rs:1— `crates/evm/evm/src/executors/fuzz/mod.rs` and `crates/evm/evm/src/executors/invariant/replay.rs` change together 50% of the time (14 of the 28 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 14 shared commits counted here, the most recent 3 are `b3ccaf9f` feat(forge): show fork block on failures (#16179); `92a84f51` fix(debugger): identify forked contracts in debug traces (#15048); `e8ad9407` refactor(evm): thread `Network` through `Executor` (#14095) — run `git show` on any of them.
Change coupling: erc20.rs ↔ mod.rs crates/cast/src/cmd/erc20.rs:1— `crates/cast/src/cmd/erc20.rs` and `crates/cast/src/cmd/tip20/mod.rs` change together 50% of the time (9 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 9 shared commits counted here, the most recent 3 are `63ce1f29` fix(cli): estimate Tempo WebAuthn gas (#15935); `637b8d4a` fix(cast): honor sync for Tempo access keys (#15930); `043d28e2` fix(cast): allow remote sponsors with Tempo access keys (#15920) — run `git show` on any of them.
Change coupling: mod.rs ↔ showmap.rs crates/evm/evm/src/executors/fuzz/mod.rs:1— `crates/evm/evm/src/executors/fuzz/mod.rs` and `crates/evm/evm/src/executors/showmap.rs` change together 50% of the time (8 of the 16 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 8 shared commits counted here, the most recent 3 are `561ab83e` refactor: remove dead code from shared and evm crates (#17339); `195561fe` fix(fuzz): enforce sender policy on corpus replay (#17274); `4939d803` refactor(evm): reuse resolved tool addresses (#16553) — run `git show` on any of them.
Change coupling: prank.rs ↔ script.rs crates/cheatcodes/src/evm/prank.rs:1— `crates/cheatcodes/src/evm/prank.rs` and `crates/cheatcodes/src/script.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 5 shared commits counted here, the most recent 3 are `c16acc2e` chore(cheatcodes): relax `DatabaseExt` bounds to `Database<Error = D…; `e2f8ef2b` refactor(evm): relax `Context` bounds in `cheatcodes` (#13725); `e1f83573` chore(cheatcodes): relax some bounds to `FoundryContextExt` (#13656) — run `git show` on any of them.
Duplicated block (10 lines × 2) crates/anvil/src/eth/backend/mem/mod.rs:4318— crates/anvil/src/eth/backend/mem/mod.rs:4318-4327 | crates/anvil/src/eth/backend/mem/mod.rs:9323-9332 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/anvil/src/eth/backend/mem/mod.rs:4409— crates/anvil/src/eth/backend/mem/mod.rs:4409-4418 | crates/anvil/src/eth/backend/mem/mod.rs:7876-7885 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/anvil/src/eth/backend/mem/mod.rs:7835— crates/anvil/src/eth/backend/mem/mod.rs:7835-7844 | crates/anvil/src/eth/backend/mem/mod.rs:7999-8008 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/backend/mem/mod.rs:7835` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/cast/src/cmd/erc4626.rs:984— crates/cast/src/cmd/erc4626.rs:984-993 | crates/cast/src/cmd/erc4626.rs:1063-1072 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/cast/src/cmd/erc4626.rs:1075` calls `wrap_err` and `crates/cast/src/cmd/erc4626.rs:996` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) crates/evm/core/src/opts.rs:372— crates/evm/core/src/opts.rs:372-381 | crates/evm/core/src/opts.rs:665-674 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/evm/symbolic/src/executor/cheatcodes.rs:128— crates/evm/symbolic/src/executor/cheatcodes.rs:128-137 | crates/evm/symbolic/src/executor/cheatcodes.rs:149-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 (10 lines × 2) crates/evm/symbolic/src/runtime/expr/expr.rs:592— crates/evm/symbolic/src/runtime/expr/expr.rs:592-601 | crates/evm/symbolic/src/runtime/expr/expr.rs:674-683 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/lint/src/sol/high/arbitrary_send_erc20.rs:607— crates/lint/src/sol/high/arbitrary_send_erc20.rs:607-616 | crates/lint/src/sol/high/arbitrary_send_eth.rs:314-323 — before extracting anything, compare `crates/lint/src/sol/high/arbitrary_send_erc20.rs` and `crates/lint/src/sol/high/arbitrary_send_eth.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/lint/src/sol/high/arbitrary_send_erc20.rs:607` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) crates/lint/src/sol/high/arbitrary_send_erc20.rs:651— crates/lint/src/sol/high/arbitrary_send_erc20.rs:651-660 | crates/lint/src/sol/high/arbitrary_send_eth.rs:356-365 — before extracting anything, compare `crates/lint/src/sol/high/arbitrary_send_erc20.rs` and `crates/lint/src/sol/high/arbitrary_send_eth.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/lint/src/sol/high/arbitrary_send_erc20.rs:651` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) crates/forge/src/brutalizer/value.rs:37— crates/forge/src/brutalizer/value.rs:37-46 | crates/forge/src/brutalizer/value.rs:49-58 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) crates/forge/src/runner.rs:588— crates/forge/src/runner.rs:588-597 | crates/forge/src/runner.rs:628-637 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) crates/evm/symbolic/src/executor/cheatcodes.rs:2940— crates/evm/symbolic/src/executor/cheatcodes.rs:2940-2949 | crates/evm/symbolic/src/executor/cheatcodes.rs:2962-2971 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) crates/evm/fuzz/src/strategies/int.rs:175— crates/evm/fuzz/src/strategies/int.rs:175-184 | crates/evm/fuzz/src/strategies/uint.rs:151-160 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/fuzz/src/strategies/int.rs:175` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/evm/fuzz/src/strategies/int.rs:189` calls `overflowing_from_sign_and_abs` and `crates/evm/fuzz/src/strategies/uint.rs:162` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) crates/cast/src/cmd/batch_mktx.rs:163— crates/cast/src/cmd/batch_mktx.rs:163-169 | crates/cast/src/cmd/mktx.rs:397-403 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cast/src/cmd/batch_mktx.rs:163` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) crates/cast/src/cmd/storage.rs:423— crates/cast/src/cmd/storage.rs:423-429 | crates/forge/src/cmd/inspect.rs:423-429 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cast/src/cmd/storage.rs:423` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/cast/src/cmd/storage.rs:430` calls `into`, `to_string` and `crates/forge/src/cmd/inspect.rs:430` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) crates/evm/symbolic/src/executor/cheatcodes.rs:430— crates/evm/symbolic/src/executor/cheatcodes.rs:430-436 | crates/evm/symbolic/src/executor/create.rs:144-150 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/evm/symbolic/src/executor/create.rs:151` calls `transfer` and `crates/evm/symbolic/src/executor/cheatcodes.rs:438` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) crates/forge/src/mutation/mutators/elim_delegate_mutator.rs:18— crates/forge/src/mutation/mutators/elim_delegate_mutator.rs:18-24 | crates/forge/src/mutation/mutators/elim_delegate_mutator.rs:44-50 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/forge/src/mutation/mutators/elim_delegate_mutator.rs:18` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) crates/lint/src/sol/high/arbitrary_send_erc20.rs:58— crates/lint/src/sol/high/arbitrary_send_erc20.rs:58-64 | crates/lint/src/sol/high/arbitrary_send_eth.rs:54-60 — before extracting anything, compare `crates/lint/src/sol/high/arbitrary_send_erc20.rs` and `crates/lint/src/sol/high/arbitrary_send_eth.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) crates/primitives/src/transaction/envelope.rs:460— crates/primitives/src/transaction/envelope.rs:460-466 | crates/primitives/src/transaction/envelope.rs:482-488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/primitives/src/transaction/envelope.rs:460` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) crates/anvil/src/eth/api.rs:1207— crates/anvil/src/eth/api.rs:1207-1213 | crates/anvil/src/eth/api.rs:3165-3171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/api.rs:1207` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) crates/lint/src/sol/high/arbitrary_send_erc20.rs:263— crates/lint/src/sol/high/arbitrary_send_erc20.rs:263-269 | crates/lint/src/sol/high/arbitrary_send_eth.rs:129-135 — before extracting anything, compare `crates/lint/src/sol/high/arbitrary_send_erc20.rs` and `crates/lint/src/sol/high/arbitrary_send_eth.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/lint/src/sol/high/arbitrary_send_erc20.rs:263` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) crates/cast/src/cmd/call.rs:234— crates/cast/src/cmd/call.rs:234-240 | crates/cast/src/cmd/run.rs:244-250 — 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) crates/evm/symbolic/src/runtime/expr/bool.rs:317— crates/evm/symbolic/src/runtime/expr/bool.rs:317-325 | crates/evm/symbolic/src/runtime/expr/expr.rs:497-503 — 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) crates/evm/traces/src/decoder/mod.rs:1360— crates/evm/traces/src/decoder/mod.rs:1360-1368 | crates/evm/traces/src/decoder/mod.rs:1372-1378 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/traces/src/decoder/mod.rs:1360` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/evm/traces/src/decoder/mod.rs:1369` calls `String`, `to_string` and `crates/evm/traces/src/decoder/mod.rs:1379` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) crates/anvil/src/eth/pool/mod.rs:421— crates/anvil/src/eth/pool/mod.rs:421-427 | crates/anvil/src/eth/pool/mod.rs:439-446 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/test-utils/src/rpc.rs:507— crates/test-utils/src/rpc.rs:507-513 | crates/test-utils/src/rpc.rs:744-750 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/test-utils/src/rpc.rs:507` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
FunctionRunner::run_invariant_test (cognitive 214) crates/forge/src/runner.rs:3909— FunctionRunner::run_invariant_test has cognitive complexity 214 (threshold 15). Drivers by points: if/else 72 (136 pts), match/switch 17 (46 pts), boolean chains 22, loops 6 (10 pts) (nesting depth added 97). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionRunner::try_seed_invariant_corpus_from_frontiers (cognitive 118) crates/forge/src/runner.rs:3378— FunctionRunner::try_seed_invariant_corpus_from_frontiers has cognitive complexity 118 (threshold 15). Drivers by points: if/else 31 (76 pts), match/switch 6 (18 pts), loops 5 (14 pts), boolean chains 10 (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionRunner::replay_symbolic_artifact (cognitive 73) crates/forge/src/runner.rs:2750— FunctionRunner::replay_symbolic_artifact has cognitive complexity 73 (threshold 15). Drivers by points: if/else 25 (49 pts), match/switch 8 (16 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionRunner::replay_persisted_handler_failures (cognitive 54) crates/forge/src/runner.rs:1728— FunctionRunner::replay_persisted_handler_failures has cognitive complexity 54 (threshold 15). Drivers by points: if/else 15 (39 pts), match/switch 4 (7 pts), boolean chains 6, loops 2 (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.
FunctionRunner::replay_invariant_checkpoints (cognitive 35) crates/forge/src/runner.rs:3194— FunctionRunner::replay_invariant_checkpoints has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 6, loops 2 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionRunner::import_symbolic_fuzz_frontiers (cognitive 26) crates/forge/src/runner.rs:2134— FunctionRunner::import_symbolic_fuzz_frontiers has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 6, loops 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.
FunctionRunner::run_fuzz_test (cognitive 26) crates/forge/src/runner.rs:5205— FunctionRunner::run_fuzz_test has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
FunctionRunner::import_symbolic_invariant_frontiers (cognitive 24) crates/forge/src/runner.rs:2287— FunctionRunner::import_symbolic_invariant_frontiers has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 7, loops 3, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FunctionRunner::run_table_test (cognitive 21) crates/forge/src/runner.rs:3810— FunctionRunner::run_table_test has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionRunner::build_fuzz_state_uncached (cognitive 21) crates/forge/src/runner.rs:5628— FunctionRunner::build_fuzz_state_uncached has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionRunner::replay_symbolic_counterexample (cognitive 19) crates/forge/src/runner.rs:2515— FunctionRunner::replay_symbolic_counterexample has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
FunctionRunner::run (cognitive 16) crates/forge/src/runner.rs:1902— FunctionRunner::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×12
Edited copy of a member (8 corresponding lines) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1934— crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1934-1941 | crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1943-1950 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/cast/src/cmd/tempo/zone/auth.rs:26— crates/cast/src/cmd/tempo/zone/auth.rs:26-34 | REDACTED:2736-2743 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/evm/symbolic/src/runtime/state.rs:1638— crates/evm/symbolic/src/runtime/state.rs:1638-1649 | crates/evm/symbolic/src/runtime/state.rs:1740-1747 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/cli/src/opts/rpc.rs:89— crates/cli/src/opts/rpc.rs:89-96 | crates/cli/src/opts/rpc_common.rs:87-94 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/cli/src/opts/rpc.rs:201— crates/cli/src/opts/rpc.rs:201-210 | crates/verify/src/verify.rs:1026-1033 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/evm/symbolic/src/runtime/expr/expr.rs:2502— crates/evm/symbolic/src/runtime/expr/expr.rs:2502-2509 | crates/evm/symbolic/src/runtime/expr/expr.rs:2517-2530 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/lint/src/sol/low/block_timestamp.rs:108— crates/lint/src/sol/low/block_timestamp.rs:108-115 | crates/lint/src/sol/med/div_mul.rs:251-259 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/forge/src/mutation/mutators/mod.rs:52— crates/forge/src/mutation/mutators/mod.rs:52-59 | crates/forge/src/mutation/mutators/mod.rs:62-71 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/chisel/src/session.rs:285— crates/chisel/src/session.rs:285-293 | crates/chisel/src/session.rs:328-335 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/test-utils/src/lib.rs:61— crates/test-utils/src/lib.rs:61-70 | crates/cli/src/utils/mod.rs:121-128 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/lint/src/sol/gas/cache_array_length.rs:142— crates/lint/src/sol/gas/cache_array_length.rs:142-149 | crates/lint/src/sol/high/arbitrary_send_eth.rs:986-993 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) crates/test-utils/src/prj.rs:750— crates/test-utils/src/prj.rs:750-757 | crates/test-utils/src/prj.rs:761-769 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
forge::args::run_command (cyclomatic 54) crates/forge/src/args.rs:36— forge::args::run_command has cyclomatic complexity 54 (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.
forge::cmd::clone::update_config_by_metadata (cyclomatic 42) crates/forge/src/cmd/clone.rs:416— forge::cmd::clone::update_config_by_metadata has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
forge::mutation::orchestrator::run_mutation_testing (cyclomatic 37) crates/forge/src/mutation/orchestrator.rs:134— forge::mutation::orchestrator::run_mutation_testing has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
forge::workspace::copy_project (cyclomatic 23) crates/forge/src/workspace.rs:269— forge::workspace::copy_project 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.
forge::cmd::fuzz::push_scalar_value_candidates (cyclomatic 20) crates/forge/src/cmd/fuzz.rs:974— forge::cmd::fuzz::push_scalar_value_candidates has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
forge::cmd::clone::dump_sources (cyclomatic 18) crates/forge/src/cmd/clone.rs:525— forge::cmd::clone::dump_sources 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.
forge::mutation::runner::run_mutations_parallel_with_progress (cyclomatic 18) crates/forge/src/mutation/runner.rs:165— forge::mutation::runner::run_mutations_parallel_with_progress 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.
forge::symbolic_minimizer::minimize_compound_value (cyclomatic 18) crates/forge/src/symbolic_minimizer.rs:625— forge::symbolic_minimizer::minimize_compound_value 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.
forge::cmd::fuzz::minimize_sequence (cyclomatic 17) crates/forge/src/cmd/fuzz.rs:770— forge::cmd::fuzz::minimize_sequence has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
forge::mutation::orchestrator::resolve_mutate_paths (cyclomatic 17) crates/forge/src/mutation/orchestrator.rs:565— forge::mutation::orchestrator::resolve_mutate_paths has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
forge::mutation::mutators::function_body_mutator::constant_return (cyclomatic 16) crates/forge/src/mutation/mutators/function_body_mutator.rs:73— forge::mutation::mutators::function_body_mutator::constant_return has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
forge_doc::hir_ext::replace_inline_links (cognitive 80) crates/doc/src/hir_ext.rs:881— forge_doc::hir_ext::replace_inline_links has cognitive complexity 80 (threshold 15). Drivers by points: if/else 17 (61 pts), match/switch 4 (18 pts), loops 1 (nesting depth added 58). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
forge_doc::render::render_contract (cognitive 62) crates/doc/src/render.rs:70— forge_doc::render::render_contract has cognitive complexity 62 (threshold 15). Drivers by points: if/else 14 (30 pts), match/switch 6 (15 pts), loops 8 (13 pts), boolean chains 4 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge_doc::render::collect_comments (cognitive 48) crates/doc/src/render.rs:492— forge_doc::render::collect_comments has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (32 pts), match/switch 2 (7 pts), loops 5 (6 pts), boolean chains 3 (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.
forge_doc::vocs::escape_mdx_outside_code_fences (cognitive 46) crates/doc/src/vocs.rs:332— forge_doc::vocs::escape_mdx_outside_code_fences has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (34 pts), match/switch 1 (5 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge_doc::vocs::build_sidebar (cognitive 28) crates/doc/src/vocs.rs:151— forge_doc::vocs::build_sidebar has cognitive complexity 28 (threshold 15). Drivers by points: loops 7 (19 pts), if/else 5 (9 pts) (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
forge_doc::hir_ext::implicit_edge_compatible (cognitive 24) crates/doc/src/hir_ext.rs:583— forge_doc::hir_ext::implicit_edge_compatible has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 13, if/else 9, match/switch 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
forge_doc::hir_ext::effective_natspec_doc (cognitive 22) crates/doc/src/hir_ext.rs:225— forge_doc::hir_ext::effective_natspec_doc has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 3 (5 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
forge_doc::render::render_function_section (cognitive 19) crates/doc/src/render.rs:340— forge_doc::render::render_function_section has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge_doc::render::write_comment_block (cognitive 17) crates/doc/src/render.rs:835— forge_doc::render::write_comment_block has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge_doc::hir_ext::continuation_parent (cognitive 16) crates/doc/src/hir_ext.rs:387— forge_doc::hir_ext::continuation_parent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge_doc::vocs::rewrite_homepage_links (cognitive 16) crates/doc/src/vocs.rs:406— forge_doc::vocs::rewrite_homepage_links has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 2 (5 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.
TooManyFields: Config crates/config/src/lib.rs:196— TooManyFields — 141 stored fields beside 112 methods. The bar is 30 stored fields; this is 111 over it, 4.70× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Cheatcodes crates/cheatcodes/src/inspector.rs:575— TooManyFields — 75 stored fields beside 88 methods. The bar is 30 stored fields; this is 45 over it, 2.50× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: NodeConfig crates/anvil/src/config.rs:234— TooManyFields — 69 stored fields beside 123 methods. The bar is 30 stored fields; this is 39 over it, 2.30× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: PathState crates/evm/symbolic/src/runtime/state.rs:10— TooManyFields — 48 stored fields beside 66 methods. The bar is 30 stored fields; this is 18 over it, 1.60× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: InspectorStackInner REDACTED:438— TooManyFields — 44 stored fields beside 9 methods. The bar is 30 stored fields; this is 14 over it, 1.47× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: ScriptArgs crates/script/src/lib.rs:118— TooManyFields — 40 stored fields beside 18 methods. The bar is 30 stored fields; this is 10 over it, 1.33× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: NodeArgs crates/anvil/src/cmd.rs:39— TooManyFields — 37 stored fields beside 4 methods. The bar is 30 stored fields; this is 7 over it, 1.23× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: EvmOpts crates/evm/core/src/opts.rs:49— TooManyFields — 34 stored fields beside 39 methods. The bar is 30 stored fields; this is 4 over it, 1.13× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: RawCallResult crates/evm/evm/src/executors/mod.rs:1397— TooManyFields — 32 stored fields beside 14 methods. The bar is 30 stored fields; this is 2 over it, 1.07× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Backend crates/anvil/src/eth/backend/mem/mod.rs:1185— TooManyFields — 31 stored fields beside 324 methods. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: AnvilEvmArgs crates/anvil/src/cmd.rs:533— TooManyFields — 31 stored fields beside 1 method. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×11
Edited copy of a member (12 corresponding lines) crates/anvil/src/eth/backend/mem/in_memory_db.rs:103— crates/anvil/src/eth/backend/mem/in_memory_db.rs:103-117 | crates/anvil/src/eth/backend/mem/state.rs:38-49 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/evm/symbolic/src/runtime/solver/reasoning/monotonic_product.rs:146— crates/evm/symbolic/src/runtime/solver/reasoning/monotonic_product.rs:146-157 | crates/evm/symbolic/src/runtime/solver/reasoning/monotonic_product.rs:160-171 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/lint/src/sol/high/unprotected_initializer.rs:210— crates/lint/src/sol/high/unprotected_initializer.rs:210-221 | crates/lint/src/sol/high/unprotected_initializer.rs:223-236 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/cheatcodes/src/evm/fork.rs:355— crates/cheatcodes/src/evm/fork.rs:355-366 | crates/cheatcodes/src/evm/fork.rs:384-396 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/anvil/src/eth/backend/fork.rs:283— crates/anvil/src/eth/backend/fork.rs:283-294 | crates/anvil/src/eth/backend/fork.rs:488-500 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/evm/core/src/edgecov.rs:76— crates/evm/core/src/edgecov.rs:76-87 | crates/evm/core/src/edgecov.rs:110-127 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/evm/symbolic/src/runtime/state.rs:2727— crates/evm/symbolic/src/runtime/state.rs:2727-2738 | crates/evm/symbolic/src/runtime/state.rs:2745-2756 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/common/src/tempo/session.rs:282— crates/common/src/tempo/session.rs:282-293 | crates/common/src/tempo/session.rs:295-306 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/cheatcodes/src/crypto.rs:472— crates/cheatcodes/src/crypto.rs:472-483 | crates/common/src/tempo/configurable_account.rs:625-636 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/test-utils/src/prj.rs:420— crates/test-utils/src/prj.rs:420-431 | crates/test-utils/src/prj.rs:434-446 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) crates/test-utils/src/script.rs:83— crates/test-utils/src/script.rs:83-94 | crates/test-utils/src/script.rs:98-110 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (9 lines × 2) crates/anvil/src/eth/api.rs:1905— crates/anvil/src/eth/api.rs:1905-1913 | crates/anvil/src/eth/api.rs:3436-3444 — both copies are in the same file, so extract the 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) crates/cast/src/tempo.rs:329— crates/cast/src/tempo.rs:329-337 | crates/cast/src/tempo.rs:367-375 — both copies are in the same file, so extract the 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) crates/evm/core/src/opts.rs:296— crates/evm/core/src/opts.rs:296-304 | crates/evm/core/src/opts.rs:308-316 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) crates/evm/symbolic/src/executor/calls.rs:2616— crates/evm/symbolic/src/executor/calls.rs:2616-2624 | crates/evm/symbolic/src/executor/calls.rs:2636-2644 — both copies are in the same file, so extract the 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) crates/evm/symbolic/src/runtime/expr/expr.rs:1451— crates/evm/symbolic/src/runtime/expr/expr.rs:1451-1459 | crates/evm/symbolic/src/runtime/expr/expr.rs:1471-1479 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/runtime/expr/expr.rs:1451` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/forge/src/cmd/eip712.rs:81— crates/forge/src/cmd/eip712.rs:81-89 | crates/forge/src/cmd/inspect.rs:533-541 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/forge/src/cmd/eip712.rs:81` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 2) crates/evm/symbolic/src/executor/opcodes.rs:903— crates/evm/symbolic/src/executor/opcodes.rs:903-911 | crates/evm/symbolic/src/executor/opcodes.rs:1279-1287 — both copies are in the same file, so extract the 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) crates/script/src/lib.rs:988— crates/script/src/lib.rs:988-996 | crates/script/src/simulate.rs:339-350 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/script/src/lib.rs:988` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) crates/evm/symbolic/src/runtime/solver/mod.rs:325— crates/evm/symbolic/src/runtime/solver/mod.rs:325-333 | crates/evm/symbolic/src/runtime/solver/mod.rs:446-454 — both copies are in the same file, so extract the 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) crates/evm/fuzz/src/strategies/int.rs:200— crates/evm/fuzz/src/strategies/int.rs:200-208 | crates/evm/fuzz/src/strategies/uint.rs:174-182 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) crates/evm/fuzz/src/strategies/int.rs:113— crates/evm/fuzz/src/strategies/int.rs:113-121 | crates/evm/fuzz/src/strategies/uint.rs:101-109 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
cast::args::run_command (cognitive 222) crates/cast/src/args.rs:132— cast::args::run_command has cognitive complexity 222 (threshold 15). Drivers by points: if/else 84 (155 pts), match/switch 20 (42 pts), loops 6 (17 pts), boolean chains 8 (nesting depth added 104). 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.
cast::cmd::wallet::new_keystores (cognitive 43) crates/cast/src/cmd/wallet/mod.rs:1023— cast::cmd::wallet::new_keystores has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 4 (8 pts), match/switch 1 (4 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cast::cmd::logs::stream_logs (cognitive 30) crates/cast/src/cmd/logs.rs:133— cast::cmd::logs::stream_logs has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 3 (7 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cast::debug::handle_traces (cognitive 26) crates/cast/src/debug.rs:61— cast::debug::handle_traces has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cast::cmd::keychain::check_expiring_nonce_window (cognitive 24) crates/cast/src/cmd/keychain.rs:2337— cast::cmd::keychain::check_expiring_nonce_window has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cast::cmd::wallet::new_keypairs (cognitive 21) crates/cast/src/cmd/wallet/mod.rs:1128— cast::cmd::wallet::new_keypairs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 1 (4 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cast::cmd::wallet::session::split_for_command (cognitive 21) crates/cast/src/cmd/wallet/session.rs:411— cast::cmd::wallet::session::split_for_command has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
cast::cmd::wallet::configurable_account::new_wallet_is_configurable (cognitive 20) crates/cast/src/cmd/wallet/configurable_account.rs:64— cast::cmd::wallet::configurable_account::new_wallet_is_configurable has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 7 (12 pts), if/else 6 (7 pts), boolean chains 1 (nesting depth added 6). 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.
cast::rpc_trace::push_frame (cognitive 20) crates/cast/src/rpc_trace.rs:77— cast::rpc_trace::push_frame has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (13 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
cast::cmd::events::decode_logs (cognitive 17) crates/cast/src/cmd/events.rs:149— cast::cmd::events::decode_logs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (7 pts), match/switch 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm_symbolic::runtime::solver::fallback::checked_mul_guard_branch_model (cognitive 104) crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:123— foundry_evm_symbolic::runtime::solver::fallback::checked_mul_guard_branch_model has cognitive complexity 104 (threshold 15). Drivers by points: if/else 21 (78 pts), loops 8 (14 pts), match/switch 3 (8 pts), boolean chains 4 (nesting depth added 68). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm_symbolic::runtime::solver::reasoning::xor::checked_xor_result (cognitive 46) crates/evm/symbolic/src/runtime/solver/reasoning/xor.rs:35— foundry_evm_symbolic::runtime::solver::reasoning::xor::checked_xor_result has cognitive complexity 46 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 8 (13 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm_symbolic::runtime::solver::run_solver_commands (cognitive 36) crates/evm/symbolic/src/runtime/solver/mod.rs:1068— foundry_evm_symbolic::runtime::solver::run_solver_commands has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (22 pts), loops 3 (7 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm_symbolic::runtime::solver::normalize::normalize_cmp_for_solver (cognitive 27) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:422— foundry_evm_symbolic::runtime::solver::normalize::normalize_cmp_for_solver has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 3 (6 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm_symbolic::runtime::solver::fallback::seed_bounded_support_vars (cognitive 26) crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:550— foundry_evm_symbolic::runtime::solver::fallback::seed_bounded_support_vars has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 3 (7 pts), boolean chains 2, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm_symbolic::runtime::folded_slots::walk_mapping_slots (cognitive 24) crates/evm/symbolic/src/runtime/folded_slots.rs:186— foundry_evm_symbolic::runtime::folded_slots::walk_mapping_slots has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm_symbolic::runtime::solver::reasoning::xor::check_certificate (cognitive 23) crates/evm/symbolic/src/runtime/solver/reasoning/xor.rs:219— foundry_evm_symbolic::runtime::solver::reasoning::xor::check_certificate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm_symbolic::runtime::precompiles::execute_symbolic_precompile (cognitive 18) crates/evm/symbolic/src/runtime/precompiles.rs:93— foundry_evm_symbolic::runtime::precompiles::execute_symbolic_precompile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
foundry_evm_symbolic::runtime::solver::fallback::complete_fallback_support_model (cognitive 16) crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:606— foundry_evm_symbolic::runtime::solver::fallback::complete_fallback_support_model has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm_symbolic::runtime::solver::fallback::fallback_single_var_model (cognitive 16) crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:903— foundry_evm_symbolic::runtime::solver::fallback::fallback_single_var_model has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 6 (7 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_cheatcodes::evm::get_recorded_state_diffs (cognitive 95) crates/cheatcodes/src/evm.rs:2229— foundry_cheatcodes::evm::get_recorded_state_diffs has cognitive complexity 95 (threshold 15). Drivers by points: if/else 25 (57 pts), loops 10 (18 pts), boolean chains 12, match/switch 3 (8 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_cheatcodes::json::_json_value_to_token (cognitive 57) crates/cheatcodes/src/json.rs:590— foundry_cheatcodes::json::_json_value_to_token has cognitive complexity 57 (threshold 15). Drivers by points: if/else 17 (48 pts), match/switch 2 (5 pts), boolean chains 4 (nesting depth added 34). 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.
foundry_cheatcodes::expected_emit::get_emit_mismatch_message (cognitive 52) crates/cheatcodes/src/expected_emit.rs:336— foundry_cheatcodes::expected_emit::get_emit_mismatch_message has cognitive complexity 52 (threshold 15). Drivers by points: if/else 22 (39 pts), boolean chains 8, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_cheatcodes::fs::get_artifact_source (cognitive 45) crates/cheatcodes/src/fs.rs:702— foundry_cheatcodes::fs::get_artifact_source has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 12, match/switch 3 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_cheatcodes::fs::deploy_code (cognitive 42) crates/cheatcodes/src/fs.rs:510— foundry_cheatcodes::fs::deploy_code has cognitive complexity 42 (threshold 15). Drivers by points: if/else 25 (36 pts), boolean chains 6 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_cheatcodes::toml::upsert_toml_value (cognitive 40) crates/cheatcodes/src/toml.rs:283— foundry_cheatcodes::toml::upsert_toml_value has cognitive complexity 40 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 2 (6 pts), match/switch 2 (5 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
foundry_cheatcodes::json::split_json_value_key (cognitive 36) crates/cheatcodes/src/json.rs:878— foundry_cheatcodes::json::split_json_value_key has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_cheatcodes::fs::parse_artifact_path (cognitive 30) crates/cheatcodes/src/fs.rs:58— foundry_cheatcodes::fs::parse_artifact_path has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 3, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_cheatcodes::expected_emit::observe_log (cognitive 25) crates/cheatcodes/src/expected_emit.rs:91— foundry_cheatcodes::expected_emit::observe_log has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 6, match/switch 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
foundry_cheatcodes::json::strip_json_comments (cognitive 25) crates/cheatcodes/src/json.rs:473— foundry_cheatcodes::json::strip_json_comments has cognitive complexity 25 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (7 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×10
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×10
Edited copy of a member (9 corresponding lines) crates/evm/symbolic/src/runtime/expr/expr.rs:1195— crates/evm/symbolic/src/runtime/expr/expr.rs:1195-1203 | crates/evm/symbolic/src/runtime/expr/expr.rs:1759-1767 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/forge/src/mutation/mod.rs:457— crates/forge/src/mutation/mod.rs:457-469 | crates/forge/src/mutation/mod.rs:557-565 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/evm/traces/src/debug/sources.rs:309— crates/evm/traces/src/debug/sources.rs:309-317 | crates/evm/traces/src/debug/sources.rs:320-328 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/fmt/src/pp/mod.rs:238— crates/fmt/src/pp/mod.rs:238-246 | crates/fmt/src/pp/mod.rs:276-287 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/lint/src/sol/high/protected_vars.rs:1001— crates/lint/src/sol/high/protected_vars.rs:1001-1012 | crates/lint/src/sol/high/reentrancy.rs:929-937 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/evm/symbolic/src/runtime/expr/bool.rs:656— crates/evm/symbolic/src/runtime/expr/bool.rs:656-664 | crates/evm/symbolic/src/runtime/expr/expr.rs:1328-1336 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/cli/src/opts/build/utils.rs:252— crates/cli/src/opts/build/utils.rs:252-263 | crates/config/src/lib.rs:3629-3637 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/lint/src/sol/high/function_selector_collision.rs:193— crates/lint/src/sol/high/function_selector_collision.rs:193-201 | crates/lint/src/sol/med/ecrecover.rs:889-897 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/lint/src/sol/high/arbitrary_send_eth.rs:965— crates/lint/src/sol/high/arbitrary_send_eth.rs:965-973 | crates/lint/src/sol/high/controlled_delegatecall.rs:418-429 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) crates/evm/fuzz/src/strategies/mutators.rs:426— crates/evm/fuzz/src/strategies/mutators.rs:426-434 | crates/evm/fuzz/src/strategies/mutators.rs:438-446 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×10
Edited copy of a member (6 corresponding lines) crates/forge/src/brutalizer/visitor.rs:52— crates/forge/src/brutalizer/visitor.rs:52-57 | crates/forge/src/brutalizer/visitor.rs:62-68 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) crates/common/src/fs.rs:91— crates/common/src/fs.rs:91-97 | crates/common/src/fs.rs:121-126 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) crates/cast/src/cmd/send.rs:717— crates/cast/src/cmd/send.rs:717-722 | crates/cast/src/cmd/send.rs:735-740 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) crates/script/src/verify.rs:405— crates/script/src/verify.rs:405-410 | crates/script/src/verify/external.rs:740-748 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) crates/cast/src/cmd/tip20/mine.rs:235— crates/cast/src/cmd/tip20/mine.rs:235-240 | crates/forge/src/runner.rs:6191-6196 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) crates/config/src/endpoints.rs:167— crates/config/src/endpoints.rs:167-172 | crates/config/src/etherscan.rs:430-435 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) crates/anvil/src/eth/backend/db.rs:655— crates/anvil/src/eth/backend/db.rs:655-660 | crates/evm/core/src/evm/db.rs:313-318 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) crates/anvil/rpc/src/request.rs:107— crates/anvil/rpc/src/request.rs:107-113 | crates/config/src/endpoints.rs:80-85 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) crates/config/src/endpoints.rs:138— crates/config/src/endpoints.rs:138-143 | crates/config/src/etherscan.rs:439-444 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) crates/config/src/endpoints.rs:129— crates/config/src/endpoints.rs:129-134 | crates/config/src/etherscan.rs:409-414 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Low cohesion: NodeConfig (LCOM4 17) crates/anvil/src/config.rs:234— NodeConfig's methods fall into 17 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 17 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: InspectorStack (LCOM4 10) REDACTED:414— InspectorStack's methods fall into 10 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 10 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: PathState (LCOM4 8) crates/evm/symbolic/src/runtime/state.rs:10— PathState's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: SymbolicWorld (LCOM4 8) crates/evm/symbolic/src/runtime/state.rs:2194— SymbolicWorld's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: SymExpr (LCOM4 7) crates/evm/symbolic/src/runtime/expr/expr.rs:377— SymExpr's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ContractsByArtifact (LCOM4 6) crates/common/src/contracts.rs:222— ContractsByArtifact's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ScriptArgs (LCOM4 6) crates/script/src/lib.rs:118— ScriptArgs's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: InspectorStackInner (LCOM4 5) REDACTED:438— InspectorStackInner's methods fall into 5 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 5 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: InvariantCampaignState (LCOM4 4) crates/evm/evm/src/executors/invariant/campaign.rs:75— InvariantCampaignState's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CommentConfig (LCOM4 4) crates/fmt/src/state/mod.rs:1341— CommentConfig's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Backend::simulate_raw (cyclomatic 65) crates/anvil/src/eth/backend/mem/mod.rs:9386— Backend::simulate_raw 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.
Backend::validate_pool_transaction_for (cyclomatic 46) crates/anvil/src/eth/backend/mem/mod.rs:10607— Backend::validate_pool_transaction_for has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Backend::load_state (cyclomatic 42) crates/anvil/src/eth/backend/mem/mod.rs:8839— Backend::load_state has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Backend::stage_fork_reset (cyclomatic 25) crates/anvil/src/eth/backend/mem/mod.rs:5193— Backend::stage_fork_reset has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Backend::do_mine_block_locked (cyclomatic 25) crates/anvil/src/eth/backend/mem/mod.rs:6510— Backend::do_mine_block_locked has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Backend::validate_pool_transaction (cyclomatic 20) crates/anvil/src/eth/backend/mem/mod.rs:10463— Backend::validate_pool_transaction has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: anvil::eth::backend::mem::halt_reason (cyclomatic 25) 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.
Backend::parse_transaction_request (cyclomatic 19) crates/anvil/src/eth/backend/mem/mod.rs:3454— Backend::parse_transaction_request has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: anvil::eth::backend::mem::halt_reason (cyclomatic 25) 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.
Backend::apply_fork_transaction_replay (cyclomatic 17) crates/anvil/src/eth/backend/mem/mod.rs:6130— Backend::apply_fork_transaction_replay has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: anvil::eth::backend::mem::halt_reason (cyclomatic 25) 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.
Backend::with_genesis (cyclomatic 16) crates/anvil/src/eth/backend/mem/mod.rs:4642— Backend::with_genesis 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: anvil::eth::backend::mem::halt_reason (cyclomatic 25) 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.
foundry_evm::executors::showmap::replay_corpus_to_showmap (cognitive 71) crates/evm/evm/src/executors/showmap.rs:268— foundry_evm::executors::showmap::replay_corpus_to_showmap has cognitive complexity 71 (threshold 15). Drivers by points: if/else 22 (54 pts), boolean chains 12, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm::executors::showmap::replay_sequence_for_minimization (cognitive 47) crates/evm/evm/src/executors/showmap.rs:490— foundry_evm::executors::showmap::replay_sequence_for_minimization has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 4 (12 pts), boolean chains 8 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
foundry_evm::executors::invariant::result::can_continue (cognitive 41) crates/evm/evm/src/executors/invariant/result.rs:255— foundry_evm::executors::invariant::result::can_continue has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (34 pts), boolean chains 4, loops 1 (3 pts) (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.
foundry_evm::executors::invariant::shrink::shrink_sequence_by_removing (cognitive 40) crates/evm/evm/src/executors/invariant/shrink.rs:426— foundry_evm::executors::invariant::shrink::shrink_sequence_by_removing has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 5 (11 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm::executors::corpus_io::read_corpus_tree (cognitive 39) crates/evm/evm/src/executors/corpus_io.rs:95— foundry_evm::executors::corpus_io::read_corpus_tree has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 4 (8 pts), match/switch 2 (4 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm::executors::corpus::sequence_from_test_trace (cognitive 27) crates/evm/evm/src/executors/corpus.rs:2011— foundry_evm::executors::corpus::sequence_from_test_trace has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm::executors::corpus::replay_corpus_sequence_with_executor (cognitive 24) crates/evm/evm/src/executors/corpus.rs:833— foundry_evm::executors::corpus::replay_corpus_sequence_with_executor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (23 pts), 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.
foundry_evm::executors::corpus::replay_corpus_sequences (cognitive 24) crates/evm/evm/src/executors/corpus.rs:934— foundry_evm::executors::corpus::replay_corpus_sequences has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 5 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm::executors::invariant::shrink::check_sequence_value (cognitive 17) crates/evm/evm/src/executors/invariant/shrink.rs:1370— foundry_evm::executors::invariant::shrink::check_sequence_value has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthApi::estimate_unsponsored_gas_with_state (cognitive 40) crates/anvil/src/eth/api.rs:2039— EthApi::estimate_unsponsored_gas_with_state has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 9, match/switch 3 (5 pts), 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.
EthApi::reorg (cognitive 40) crates/anvil/src/eth/api.rs:4656— EthApi::reorg has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (34 pts), match/switch 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthApi::fee_history (cognitive 28) crates/anvil/src/eth/api.rs:1393— EthApi::fee_history has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (16 pts), loops 5 (9 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
EthApi::transaction_by_sender_and_nonce (cognitive 20) crates/anvil/src/eth/api.rs:4021— EthApi::transaction_by_sender_and_nonce has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthApi::evm_mine_detailed (cognitive 20) crates/anvil/src/eth/api.rs:4864— EthApi::evm_mine_detailed has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 2 (4 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthApi::build_tx_request_with_fee_defaults (cognitive 19) crates/anvil/src/eth/api.rs:5318— EthApi::build_tx_request_with_fee_defaults has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthApi::transaction_receipts_subscription (cognitive 17) crates/anvil/src/eth/api.rs:5194— EthApi::transaction_receipts_subscription has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (7 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EthApi::execute (cognitive 16) crates/anvil/src/eth/api.rs:2288— EthApi::execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
EthApi::eip8130_nonce_markers (cognitive 16) crates/anvil/src/eth/api.rs:5507— EthApi::eip8130_nonce_markers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (16 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×9
Edited copy of a member (10 corresponding lines) crates/evm/core/src/backend/mod.rs:1598— crates/evm/core/src/backend/mod.rs:1598-1607 | crates/evm/core/src/evm/tx.rs:213-224 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/evm/symbolic/src/runtime/bytes.rs:197— crates/evm/symbolic/src/runtime/bytes.rs:197-207 | crates/evm/symbolic/src/runtime/calldata.rs:36-45 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/lint/src/sol/analysis/exprs.rs:106— crates/lint/src/sol/analysis/exprs.rs:106-115 | crates/lint/src/sol/high/arbitrary_send_eth.rs:951-962 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/lint/src/sol/analysis/exprs.rs:119— crates/lint/src/sol/analysis/exprs.rs:119-128 | crates/lint/src/sol/high/arbitrary_send_eth.rs:877-887 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/cast/src/cmd/auth.rs:67— crates/cast/src/cmd/auth.rs:67-77 | crates/cast/src/cmd/auth.rs:89-98 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/evm/symbolic/src/runtime/memory.rs:146— crates/evm/symbolic/src/runtime/memory.rs:146-155 | crates/evm/symbolic/src/runtime/memory.rs:169-179 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/anvil/core/src/eth/serde_helpers.rs:42— crates/anvil/core/src/eth/serde_helpers.rs:42-51 | crates/common/src/serde_helpers.rs:135-144 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/anvil/src/eth/backend/mem/monad.rs:640— crates/anvil/src/eth/backend/mem/monad.rs:640-649 | crates/anvil/src/eth/backend/mem/monad.rs:691-700 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) crates/anvil/src/eth/backend/mem/mod.rs:2498— crates/anvil/src/eth/backend/mem/mod.rs:2498-2507 | crates/anvil/src/eth/backend/mem/mod.rs:4039-4049 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
FunctionRunner::run_invariant_test (cyclomatic 110) crates/forge/src/runner.rs:3909— FunctionRunner::run_invariant_test has cyclomatic complexity 110 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FunctionRunner::try_seed_invariant_corpus_from_frontiers (cyclomatic 50) crates/forge/src/runner.rs:3378— FunctionRunner::try_seed_invariant_corpus_from_frontiers 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.
FunctionRunner::replay_symbolic_artifact (cyclomatic 40) crates/forge/src/runner.rs:2750— FunctionRunner::replay_symbolic_artifact has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FunctionRunner::replay_persisted_handler_failures (cyclomatic 27) crates/forge/src/runner.rs:1728— FunctionRunner::replay_persisted_handler_failures has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FunctionRunner::import_symbolic_invariant_frontiers (cyclomatic 23) crates/forge/src/runner.rs:2287— FunctionRunner::import_symbolic_invariant_frontiers has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FunctionRunner::run_fuzz_test (cyclomatic 21) crates/forge/src/runner.rs:5205— FunctionRunner::run_fuzz_test has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FunctionRunner::import_symbolic_fuzz_frontiers (cyclomatic 20) crates/forge/src/runner.rs:2134— FunctionRunner::import_symbolic_fuzz_frontiers has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FunctionRunner::replay_invariant_checkpoints (cyclomatic 18) crates/forge/src/runner.rs:3194— FunctionRunner::replay_invariant_checkpoints 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.
foundry_evm_symbolic::runtime::solver::fallback::checked_mul_guard_branch_model (cyclomatic 39) crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:123— foundry_evm_symbolic::runtime::solver::fallback::checked_mul_guard_branch_model has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
foundry_evm_symbolic::runtime::solver::run_solver_commands (cyclomatic 28) crates/evm/symbolic/src/runtime/solver/mod.rs:1068— foundry_evm_symbolic::runtime::solver::run_solver_commands has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
foundry_evm_symbolic::runtime::solver::reasoning::xor::checked_xor_result (cyclomatic 26) crates/evm/symbolic/src/runtime/solver/reasoning/xor.rs:35— foundry_evm_symbolic::runtime::solver::reasoning::xor::checked_xor_result has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
foundry_evm_symbolic::runtime::precompiles::execute_symbolic_precompile (cyclomatic 21) crates/evm/symbolic/src/runtime/precompiles.rs:93— foundry_evm_symbolic::runtime::precompiles::execute_symbolic_precompile 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. This is NOT this file's highest cyclomatic complexity: foundry_evm_symbolic::runtime::precompiles::execute_precompile (cyclomatic 26) 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.
foundry_evm_symbolic::runtime::solver::fallback::seed_bounded_support_vars (cyclomatic 21) crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:550— foundry_evm_symbolic::runtime::solver::fallback::seed_bounded_support_vars 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.
foundry_evm_symbolic::runtime::solver::normalize::normalize_cmp_for_solver (cyclomatic 19) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:422— foundry_evm_symbolic::runtime::solver::normalize::normalize_cmp_for_solver has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
foundry_evm_symbolic::runtime::solver::reasoning::monotonic_product::collect_order_facts (cyclomatic 17) crates/evm/symbolic/src/runtime/solver/reasoning/monotonic_product.rs:82— foundry_evm_symbolic::runtime::solver::reasoning::monotonic_product::collect_order_facts 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.
foundry_evm_symbolic::runtime::solver::reasoning::xor::check_certificate (cyclomatic 16) crates/evm/symbolic/src/runtime/solver/reasoning/xor.rs:219— foundry_evm_symbolic::runtime::solver::reasoning::xor::check_certificate 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.
Cheatcodes::check_mem_opcodes (cognitive 116) crates/cheatcodes/src/inspector.rs:3595— Cheatcodes::check_mem_opcodes has cognitive complexity 116 (threshold 15). Drivers by points: if/else 27 (59 pts), boolean chains 56, match/switch 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Cheatcodes::call_with_executor (cognitive 108) crates/cheatcodes/src/inspector.rs:1340— Cheatcodes::call_with_executor has cognitive complexity 108 (threshold 15). Drivers by points: if/else 35 (78 pts), match/switch 8 (22 pts), boolean chains 8 (nesting depth added 57). 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.
Cheatcodes::call_end_hook (cognitive 91) crates/cheatcodes/src/inspector.rs:2355— Cheatcodes::call_end_hook has cognitive complexity 91 (threshold 15). Drivers by points: if/else 33 (72 pts), boolean chains 11, match/switch 2 (8 pts) (nesting depth added 45). 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.
Cheatcodes::create_end_hook (cognitive 40) crates/cheatcodes/src/inspector.rs:2800— Cheatcodes::create_end_hook has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 8, match/switch 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cheatcodes::create_hook (cognitive 38) crates/cheatcodes/src/inspector.rs:2628— Cheatcodes::create_hook has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (27 pts), match/switch 3 (7 pts), boolean chains 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cheatcodes::step_hook (cognitive 33) crates/cheatcodes/src/inspector.rs:1996— Cheatcodes::step_hook has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 6, match/switch 2 (5 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Cheatcodes::step_end_hook (cognitive 30) crates/cheatcodes/src/inspector.rs:2137— Cheatcodes::step_end_hook has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 6 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cheatcodes::finish_created_accounts_frame (cognitive 21) crates/cheatcodes/src/inspector.rs:1133— Cheatcodes::finish_created_accounts_frame has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cheatcodes::check_mem_opcodes (cyclomatic 105) crates/cheatcodes/src/inspector.rs:3595— Cheatcodes::check_mem_opcodes has cyclomatic complexity 105 (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.
Cheatcodes::call_with_executor (cyclomatic 53) crates/cheatcodes/src/inspector.rs:1340— Cheatcodes::call_with_executor has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cheatcodes::call_end_hook (cyclomatic 47) crates/cheatcodes/src/inspector.rs:2355— Cheatcodes::call_end_hook 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.
Cheatcodes::step_hook (cyclomatic 28) crates/cheatcodes/src/inspector.rs:1996— Cheatcodes::step_hook has cyclomatic complexity 28 (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.
Cheatcodes::create_end_hook (cyclomatic 25) crates/cheatcodes/src/inspector.rs:2800— Cheatcodes::create_end_hook has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cheatcodes::step_end_hook (cyclomatic 22) crates/cheatcodes/src/inspector.rs:2137— Cheatcodes::step_end_hook 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.
Cheatcodes::create_hook (cyclomatic 22) crates/cheatcodes/src/inspector.rs:2628— Cheatcodes::create_hook 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.
foundry_cheatcodes::evm::get_recorded_state_diffs (cyclomatic 49) crates/cheatcodes/src/evm.rs:2229— foundry_cheatcodes::evm::get_recorded_state_diffs has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
foundry_cheatcodes::fs::get_artifact_source (cyclomatic 34) crates/cheatcodes/src/fs.rs:702— foundry_cheatcodes::fs::get_artifact_source has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
foundry_cheatcodes::fs::deploy_code (cyclomatic 29) crates/cheatcodes/src/fs.rs:510— foundry_cheatcodes::fs::deploy_code 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.
foundry_cheatcodes::expected_emit::get_emit_mismatch_message (cyclomatic 28) crates/cheatcodes/src/expected_emit.rs:336— foundry_cheatcodes::expected_emit::get_emit_mismatch_message has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
foundry_cheatcodes::json::_json_value_to_token (cyclomatic 27) crates/cheatcodes/src/json.rs:590— foundry_cheatcodes::json::_json_value_to_token has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
foundry_cheatcodes::expected_emit::observe_log (cyclomatic 20) crates/cheatcodes/src/expected_emit.rs:91— foundry_cheatcodes::expected_emit::observe_log 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.
foundry_cheatcodes::json::split_json_value_key (cyclomatic 19) crates/cheatcodes/src/json.rs:878— foundry_cheatcodes::json::split_json_value_key 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.
FixmeComment crates/cast/src/cmd/logs.rs:102— // FIXME: this is a hotfix for <https://github.com/foundry-rs/foundry/issues/7682>
FixmeComment crates/anvil/tests/it/fork.rs:2153— // FIXME: Awaits endlessly here. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment crates/anvil/tests/it/pubsub.rs:41— // FIXME: Use .legacy() in tx when implemented in alloy — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment crates/anvil/tests/it/pubsub.rs:64— // FIXME: Use .legacy() in tx — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment crates/anvil/tests/it/pubsub.rs:230— // FIXME: Use legacy() in tx when implemented in alloy — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment crates/anvil/tests/it/pubsub.rs:243— // FIXME: Use legacy() in tx when implemented in alloy — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment crates/anvil/tests/it/pubsub.rs:249— // FIXME: Use legacy() in tx when implemented in alloy — 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.
forge_script::verify::verify_contracts (cognitive 55) crates/script/src/verify.rs:427— forge_script::verify::verify_contracts has cognitive complexity 55 (threshold 15). Drivers by points: if/else 12 (28 pts), match/switch 4 (16 pts), loops 3 (7 pts), boolean chains 4 (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.
forge_script::owner_approvals::prepare (cognitive 44) crates/script/src/owner_approvals.rs:155— forge_script::owner_approvals::prepare has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 5, match/switch 4 (5 pts), loops 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge_script::owner_approvals::assemble (cognitive 34) crates/script/src/owner_approvals.rs:532— forge_script::owner_approvals::assemble has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 6 (11 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge_script::verify::external::candidates_from_output (cognitive 25) crates/script/src/verify/external.rs:568— forge_script::verify::external::candidates_from_output has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge_script::broadcast::reject_expiring_call_before_create (cognitive 20) crates/script/src/broadcast.rs:2279— forge_script::broadcast::reject_expiring_call_before_create has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (11 pts), match/switch 1 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge_script::recovery::previous_unfinished (cognitive 20) crates/script/src/recovery.rs:1010— forge_script::recovery::previous_unfinished has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge_script::verify::external_job (cognitive 20) crates/script/src/verify.rs:282— forge_script::verify::external_job has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (8 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×7
Edited copy of a member (13 corresponding lines) crates/anvil/src/eth/backend/env.rs:123— crates/anvil/src/eth/backend/env.rs:123-135 | crates/evm/core/src/utils.rs:26-38 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1072— crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1072-1084 | crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1145-1157 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/common/src/selectors.rs:67— crates/common/src/selectors.rs:67-79 | crates/common/src/selectors.rs:86-99 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/evm/core/src/evm/eth.rs:120— crates/evm/core/src/evm/eth.rs:120-132 | crates/evm/core/src/evm/eth.rs:134-146 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/evm/evm/src/executors/showmap.rs:717— crates/evm/evm/src/executors/showmap.rs:717-733 | crates/evm/evm/src/executors/showmap.rs:739-751 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/anvil/src/eth/backend/mem/cache.rs:58— crates/anvil/src/eth/backend/mem/cache.rs:58-70 | crates/anvil/src/eth/backend/mem/cache.rs:75-89 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) crates/script/src/simulate.rs:97— crates/script/src/simulate.rs:97-110 | crates/script/src/simulate.rs:119-131 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
cast::args::run_command (cyclomatic 215) crates/cast/src/args.rs:132— cast::args::run_command has cyclomatic complexity 215 (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.
cast::cmd::wallet::new_keystores (cyclomatic 19) crates/cast/src/cmd/wallet/mod.rs:1023— cast::cmd::wallet::new_keystores 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.
cast::cmd::wallet::configurable_account::new_wallet_is_configurable (cyclomatic 19) crates/cast/src/cmd/wallet/configurable_account.rs:64— cast::cmd::wallet::configurable_account::new_wallet_is_configurable 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.
cast::cmd::keychain::check_expiring_nonce_window (cyclomatic 18) crates/cast/src/cmd/keychain.rs:2337— cast::cmd::keychain::check_expiring_nonce_window has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: KeychainSubcommand::run (cyclomatic 19) 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.
cast::cmd::logs::stream_logs (cyclomatic 17) crates/cast/src/cmd/logs.rs:133— cast::cmd::logs::stream_logs has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
cast::cmd::wallet::session::split_for_command (cyclomatic 17) crates/cast/src/cmd/wallet/session.rs:411— cast::cmd::wallet::session::split_for_command has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
forge_doc::render::render_contract (cyclomatic 46) crates/doc/src/render.rs:70— forge_doc::render::render_contract has cyclomatic complexity 46 (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.
forge_doc::render::collect_comments (cyclomatic 29) crates/doc/src/render.rs:492— forge_doc::render::collect_comments 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.
forge_doc::hir_ext::implicit_edge_compatible (cyclomatic 23) crates/doc/src/hir_ext.rs:583— forge_doc::hir_ext::implicit_edge_compatible has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
forge_doc::hir_ext::effective_natspec_doc (cyclomatic 21) crates/doc/src/hir_ext.rs:225— forge_doc::hir_ext::effective_natspec_doc has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
forge_doc::hir_ext::replace_inline_links (cyclomatic 20) crates/doc/src/hir_ext.rs:881— forge_doc::hir_ext::replace_inline_links has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
forge_doc::vocs::escape_mdx_outside_code_fences (cyclomatic 18) crates/doc/src/vocs.rs:332— forge_doc::vocs::escape_mdx_outside_code_fences 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.
forge_lint::sol::med::div_mul::check_expr (cyclomatic 29) crates/lint/src/sol/med/div_mul.rs:142— forge_lint::sol::med::div_mul::check_expr has cyclomatic complexity 29 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
forge_lint::sol::med::div_mul::check_stmt (cyclomatic 20) crates/lint/src/sol/med/div_mul.rs:62— forge_lint::sol::med::div_mul::check_stmt has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
forge_lint::sol::med::tautological_compare::exprs_equal (cyclomatic 18) crates/lint/src/sol/med/tautological_compare.rs:48— forge_lint::sol::med::tautological_compare::exprs_equal 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.
forge_lint::sol::med::uninitialized_state_variables::storage_aliases (cyclomatic 18) crates/lint/src/sol/med/uninitialized_state_variables.rs:183— forge_lint::sol::med::uninitialized_state_variables::storage_aliases 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.
forge_lint::sol::analysis::modifier_outcome::stmt_outcome (cyclomatic 17) crates/lint/src/sol/analysis/modifier_outcome.rs:70— forge_lint::sol::analysis::modifier_outcome::stmt_outcome 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.
forge_lint::sol::codesize::unwrapped_modifier_logic::snippet (cyclomatic 16) crates/lint/src/sol/codesize/unwrapped_modifier_logic.rs:87— forge_lint::sol::codesize::unwrapped_modifier_logic::snippet 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.
forge_lint::sol::med::div_mul::check_expr (cognitive 36) crates/lint/src/sol/med/div_mul.rs:142— forge_lint::sol::med::div_mul::check_expr has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 4 (10 pts), match/switch 3 (6 pts), boolean chains 4 (nesting depth added 19). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
forge_lint::sol::med::uninitialized_state_variables::storage_aliases (cognitive 30) crates/lint/src/sol/med/uninitialized_state_variables.rs:183— forge_lint::sol::med::uninitialized_state_variables::storage_aliases has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 4 (7 pts), match/switch 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.
forge_lint::sol::analysis::access_control::for_each_guard (cognitive 22) crates/lint/src/sol/analysis/access_control.rs:295— forge_lint::sol::analysis::access_control::for_each_guard has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge_lint::sol::codesize::unwrapped_modifier_logic::snippet (cognitive 20) crates/lint/src/sol/codesize/unwrapped_modifier_logic.rs:87— forge_lint::sol::codesize::unwrapped_modifier_logic::snippet has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge_lint::sol::high::protected_vars::protected_variables (cognitive 19) crates/lint/src/sol/high/protected_vars.rs:119— forge_lint::sol::high::protected_vars::protected_variables has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
forge_lint::sol::med::div_mul::check_stmt (cognitive 18) crates/lint/src/sol/med/div_mul.rs:62— forge_lint::sol::med::div_mul::check_stmt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts), boolean chains 1, match/switch 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.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×6
Edited copy of a member (18 corresponding lines) crates/config/src/providers/ext.rs:310— crates/config/src/providers/ext.rs:310-327 | crates/config/src/providers/ext.rs:350-367 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) crates/anvil/src/eth/api.rs:3007— crates/anvil/src/eth/api.rs:3007-3024 | crates/anvil/src/eth/api.rs:3079-3099 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) crates/cli/src/opts/rpc.rs:98— crates/cli/src/opts/rpc.rs:98-115 | crates/cli/src/opts/rpc_common.rs:97-118 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) crates/anvil/src/eth/api.rs:5151— crates/anvil/src/eth/api.rs:5151-5168 | crates/anvil/src/eth/api.rs:5174-5191 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) crates/cast/src/cmd/call.rs:947— crates/cast/src/cmd/call.rs:947-966 | crates/cast/src/cmd/run.rs:1144-1161 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) crates/evm/fuzz/src/strategies/int.rs:140— crates/evm/fuzz/src/strategies/int.rs:140-157 | crates/evm/fuzz/src/strategies/uint.rs:120-137 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×6
Edited copy of a member (14 corresponding lines) crates/evm/symbolic/src/runtime/state.rs:2944— crates/evm/symbolic/src/runtime/state.rs:2944-2957 | crates/evm/symbolic/src/runtime/state.rs:2966-2979 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/evm/symbolic/src/executor/calls.rs:2615— crates/evm/symbolic/src/executor/calls.rs:2615-2628 | crates/evm/symbolic/src/executor/calls.rs:2635-2648 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/chisel/src/dispatcher.rs:532— crates/chisel/src/dispatcher.rs:532-545 | crates/chisel/src/dispatcher.rs:547-560 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/anvil/src/eth/pool/mod.rs:419— crates/anvil/src/eth/pool/mod.rs:419-432 | crates/anvil/src/eth/pool/mod.rs:435-451 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/anvil/src/eth/backend/mem/mod.rs:4055— crates/anvil/src/eth/backend/mem/mod.rs:4055-4068 | crates/anvil/src/eth/backend/mem/mod.rs:4089-4102 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) crates/evm/fuzz/src/strategies/calldata.rs:161— crates/evm/fuzz/src/strategies/calldata.rs:161-180 | crates/evm/fuzz/src/strategies/calldata.rs:188-201 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×6
Edited copy of a member (7 corresponding lines) crates/cast/src/cmd/mod.rs:73— crates/cast/src/cmd/mod.rs:73-79 | crates/cli/src/json.rs:189-196 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/evm/traces/src/folded_stack_trace.rs:213— crates/evm/traces/src/folded_stack_trace.rs:213-219 | crates/evm/traces/src/speedscope/builder.rs:123-132 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/lint/src/sol/high/unprotected_initializer.rs:188— crates/lint/src/sol/high/unprotected_initializer.rs:188-194 | crates/lint/src/sol/low/require_revert_in_loop.rs:40-46 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/common/src/provider/curl_transport.rs:128— crates/common/src/provider/curl_transport.rs:128-134 | crates/common/src/provider/runtime_transport.rs:511-520 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/test-utils/src/prj.rs:691— crates/test-utils/src/prj.rs:691-697 | crates/test-utils/src/prj.rs:701-707 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) crates/evm/fuzz/src/strategies/int.rs:57— crates/evm/fuzz/src/strategies/int.rs:57-63 | crates/evm/fuzz/src/strategies/uint.rs:50-56 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1891— crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1891-1903 | crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1920-1932 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1891` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) crates/script/src/execute.rs:408— crates/script/src/execute.rs:408-420 | crates/script/src/execute.rs:561-573 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/script/src/execute.rs:408` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) REDACTED:2336— REDACTED:2336-2348 | REDACTED:2480-2492 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2336` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) crates/lint/src/sol/high/arbitrary_send_erc20.rs:557— crates/lint/src/sol/high/arbitrary_send_erc20.rs:557-569 | crates/lint/src/sol/high/arbitrary_send_eth.rs:282-294 — before extracting anything, compare `crates/lint/src/sol/high/arbitrary_send_erc20.rs` and `crates/lint/src/sol/high/arbitrary_send_eth.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/lint/src/sol/high/arbitrary_send_erc20.rs:557` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/lint/src/sol/high/arbitrary_send_erc20.rs:584` calls `push`, `clone` and `crates/lint/src/sol/high/arbitrary_send_eth.rs:295` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) crates/cast/src/cmd/access_list.rs:72— crates/cast/src/cmd/access_list.rs:72-84 | crates/cast/src/cmd/estimate.rs:99-111 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:85— crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:85-97 | crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:1003-1015 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:98` calls `default` and `crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:1016` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) crates/cast/src/cmd/mktx.rs:142— crates/cast/src/cmd/mktx.rs:142-153 | crates/cast/src/cmd/send.rs:152-163 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cast/src/cmd/mktx.rs:142` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) crates/evm/symbolic/src/executor/calls.rs:510— crates/evm/symbolic/src/executor/calls.rs:510-521 | crates/evm/symbolic/src/executor/calls.rs:524-535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/calls.rs:510` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) crates/evm/symbolic/src/runtime/memory.rs:730— crates/evm/symbolic/src/runtime/memory.rs:730-741 | crates/evm/symbolic/src/runtime/memory.rs:755-766 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) crates/verify/src/bytecode.rs:594— crates/verify/src/bytecode.rs:594-605 | crates/verify/src/bytecode.rs:936-950 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/verify/src/bytecode.rs:594` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) crates/linking/src/lib.rs:721— crates/linking/src/lib.rs:721-732 | crates/linking/src/lib.rs:816-827 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/linking/src/lib.rs:721` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) crates/lint/src/sol/high/arbitrary_send_erc20.rs:541— crates/lint/src/sol/high/arbitrary_send_erc20.rs:541-552 | crates/lint/src/sol/high/arbitrary_send_eth.rs:266-277 — before extracting anything, compare `crates/lint/src/sol/high/arbitrary_send_erc20.rs` and `crates/lint/src/sol/high/arbitrary_send_eth.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/lint/src/sol/high/arbitrary_send_erc20.rs:541` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Off the main sequence: anvil-rpc — anvil-rpc: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: foundry-cli-markdown — foundry-cli-markdown: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: foundry-evm-sancov — foundry-evm-sancov: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: foundry-linking — foundry-linking: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: foundry-evm-networks — foundry-evm-networks: abstractness 0.00, instability 0.08, distance 0.92 — zone of pain — concrete and depended on by 11 project(s), so it's rigid to change.
Off the main sequence: foundry-config — foundry-config: abstractness 0.01, instability 0.11, distance 0.88 — zone of pain — concrete and depended on by 17 project(s), so it's rigid to change.
foundry_evm::executors::showmap::replay_corpus_to_showmap (cyclomatic 39) crates/evm/evm/src/executors/showmap.rs:268— foundry_evm::executors::showmap::replay_corpus_to_showmap has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
foundry_evm::executors::showmap::replay_sequence_for_minimization (cyclomatic 24) crates/evm/evm/src/executors/showmap.rs:490— foundry_evm::executors::showmap::replay_sequence_for_minimization 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.
foundry_evm::executors::invariant::shrink::shrink_sequence_by_removing (cyclomatic 21) crates/evm/evm/src/executors/invariant/shrink.rs:426— foundry_evm::executors::invariant::shrink::shrink_sequence_by_removing 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.
foundry_evm::executors::invariant::result::can_continue (cyclomatic 19) crates/evm/evm/src/executors/invariant/result.rs:255— foundry_evm::executors::invariant::result::can_continue 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.
foundry_evm::executors::corpus_io::read_corpus_tree (cyclomatic 18) crates/evm/evm/src/executors/corpus_io.rs:95— foundry_evm::executors::corpus_io::read_corpus_tree has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CallTraceDecoder::decode_cheatcode_inputs (cognitive 44) crates/evm/traces/src/decoder/mod.rs:1295— CallTraceDecoder::decode_cheatcode_inputs has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 7, match/switch 2 (3 pts) (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.
CallTraceDecoder::decode_function (cognitive 41) crates/evm/traces/src/decoder/mod.rs:1102— CallTraceDecoder::decode_function has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (33 pts), boolean chains 6, 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.
CallTraceDecoder::populate_traces (cognitive 26) crates/evm/traces/src/decoder/mod.rs:1028— CallTraceDecoder::populate_traces has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CallTraceDecoder::collect_abi (cognitive 19) crates/evm/traces/src/decoder/mod.rs:973— CallTraceDecoder::collect_abi has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (5 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.
CallTraceDecoder::decode_event_inner (cognitive 17) crates/evm/traces/src/decoder/mod.rs:1610— CallTraceDecoder::decode_event_inner has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5 (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.
foundry_common::preprocessor::deps::remove_bytecode_dependencies (cognitive 36) crates/common/src/preprocessor/deps.rs:866— foundry_common::preprocessor::deps::remove_bytecode_dependencies has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_common::tempo::configurable_account::quorum (cognitive 27) crates/common/src/tempo/configurable_account.rs:402— foundry_common::tempo::configurable_account::quorum has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 6 (10 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_common::tempo::auth::ensure_access_key (cognitive 25) crates/common/src/tempo/auth.rs:97— foundry_common::tempo::auth::ensure_access_key has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_common::external_storage::resolve (cognitive 23) crates/common/src/external_storage.rs:98— foundry_common::external_storage::resolve has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_common::compile::add_root_remapping_diagnostics (cognitive 20) crates/common/src/compile.rs:1229— foundry_common::compile::add_root_remapping_diagnostics has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkerCorpus::export_to_workers (cognitive 33) crates/evm/evm/src/executors/corpus.rs:1749— WorkerCorpus::export_to_workers has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 6 (8 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkerCorpus::calibrate (cognitive 23) crates/evm/evm/src/executors/corpus.rs:1614— WorkerCorpus::calibrate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 1, 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.
WorkerCorpus::seed_from_test_traces (cognitive 21) crates/evm/evm/src/executors/corpus.rs:1402— WorkerCorpus::seed_from_test_traces has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkerCorpus::load_sync_corpus (cognitive 21) crates/evm/evm/src/executors/corpus.rs:1537— WorkerCorpus::load_sync_corpus has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WorkerCorpus::process_inputs_inner (cognitive 19) crates/evm/evm/src/executors/corpus.rs:1207— WorkerCorpus::process_inputs_inner has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×5
Edited copy of a member (20 corresponding lines) crates/anvil/src/eth/backend/mem/mod.rs:626— crates/anvil/src/eth/backend/mem/mod.rs:626-649 | crates/anvil/src/eth/backend/mem/mod.rs:689-708 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) crates/common/src/provider/curl_transport.rs:44— crates/common/src/provider/curl_transport.rs:44-63 | crates/common/src/provider/curl_transport.rs:155-182 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) crates/evm/symbolic/src/runtime/solver/smt/mod.rs:108— crates/evm/symbolic/src/runtime/solver/smt/mod.rs:108-127 | crates/evm/symbolic/src/runtime/solver/smt/mod.rs:164-188 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) crates/forge/src/symbolic_minimizer.rs:821— crates/forge/src/symbolic_minimizer.rs:821-840 | crates/forge/src/symbolic_minimizer.rs:868-888 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) crates/forge/src/cmd/inspect.rs:441— crates/forge/src/cmd/inspect.rs:441-461 | crates/forge/src/cmd/inspect.rs:463-482 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×5
Edited copy of a member (4 corresponding lines) crates/lint/src/sol/analysis/exprs.rs:80— crates/lint/src/sol/analysis/exprs.rs:80-83 | crates/lint/src/sol/high/enumerable_loop_removal.rs:380-383 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) crates/lint/src/sol/analysis/exprs.rs:94— crates/lint/src/sol/analysis/exprs.rs:94-98 | crates/lint/src/sol/high/arbitrary_send_eth.rs:981-984 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) crates/lint/src/sol/high/arbitrary_send_erc20.rs:298— crates/lint/src/sol/high/arbitrary_send_erc20.rs:298-301 | crates/lint/src/sol/high/arbitrary_send_eth.rs:185-188 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) crates/lint/src/sol/codesize/unwrapped_modifier_logic.rs:190— crates/lint/src/sol/codesize/unwrapped_modifier_logic.rs:190-193 | crates/lint/src/sol/med/unsafe_oz_erc721_mint.rs:313-316 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) crates/verify/src/etherscan/mod.rs:73— crates/verify/src/etherscan/mod.rs:73-76 | crates/verify/src/sourcify.rs:45-48 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (14 lines × 2) crates/anvil/src/eth/backend/mem/mod.rs:4862— crates/anvil/src/eth/backend/mem/mod.rs:4862-4875 | crates/anvil/src/eth/backend/mem/mod.rs:5089-5102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/backend/mem/mod.rs:4862` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) crates/config/src/providers/warnings.rs:300— crates/config/src/providers/warnings.rs:300-313 | crates/config/src/providers/warnings.rs:380-393 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/config/src/providers/warnings.rs:300` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) crates/lint/src/sol/high/arbitrary_send_erc20.rs:697— crates/lint/src/sol/high/arbitrary_send_erc20.rs:697-710 | crates/lint/src/sol/high/arbitrary_send_eth.rs:392-405 — before extracting anything, compare `crates/lint/src/sol/high/arbitrary_send_erc20.rs` and `crates/lint/src/sol/high/arbitrary_send_eth.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/lint/src/sol/high/arbitrary_send_erc20.rs:697` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) crates/linking/src/lib.rs:884— crates/linking/src/lib.rs:884-897 | crates/linking/src/lib.rs:981-994 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/linking/src/lib.rs:884` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) crates/config/src/providers/ext.rs:314— crates/config/src/providers/ext.rs:314-327 | crates/config/src/providers/ext.rs:354-367 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/config/src/providers/ext.rs:314` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) crates/anvil/src/eth/api.rs:3605— crates/anvil/src/eth/api.rs:3605-3615 | crates/anvil/src/eth/api.rs:5092-5102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/api.rs:3605` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) crates/evm/symbolic/src/executor/opcodes.rs:776— crates/evm/symbolic/src/executor/opcodes.rs:776-786 | crates/evm/symbolic/src/executor/opcodes.rs:878-888 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/opcodes.rs:776` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) crates/anvil/src/eth/backend/mem/in_memory_db.rs:107— crates/anvil/src/eth/backend/mem/in_memory_db.rs:107-117 | crates/anvil/src/eth/backend/mem/state.rs:39-49 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/backend/mem/in_memory_db.rs:107` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `crate) fn record_changes(&mut` in one and `&mut` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) crates/linking/src/lib.rs:839— crates/linking/src/lib.rs:839-849 | crates/linking/src/lib.rs:909-919 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) crates/evm/fuzz/src/lib.rs:215— crates/evm/fuzz/src/lib.rs:215-225 | crates/evm/fuzz/src/lib.rs:240-250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/fuzz/src/lib.rs:215` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
SymExpr::binop (cyclomatic 80) crates/evm/symbolic/src/runtime/expr/expr.rs:505— SymExpr::binop has cyclomatic complexity 80 (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.
SymExpr::unsigned_bits_cached (cyclomatic 24) crates/evm/symbolic/src/runtime/expr/expr.rs:1659— SymExpr::unsigned_bits_cached 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.
SymExpr::known_byte (cyclomatic 19) crates/evm/symbolic/src/runtime/expr/expr.rs:1586— SymExpr::known_byte 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.
SymExpr::byte_term (cyclomatic 17) crates/evm/symbolic/src/runtime/expr/expr.rs:1780— SymExpr::byte_term has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ConstraintContext::normalize_word (cyclomatic 24) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:814— ConstraintContext::normalize_word 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.
ConstraintContext::normalize_bool (cyclomatic 21) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:676— ConstraintContext::normalize_bool has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ConstraintContext::upper_bound_constraint (cyclomatic 21) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1196— ConstraintContext::upper_bound_constraint 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.
ConstraintContext::normalize_signed_add_comparison (cyclomatic 18) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:923— ConstraintContext::normalize_signed_add_comparison 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.
Checker::stmt (cognitive 67) crates/lint/src/sol/med/cheatcode_environment.rs:489— Checker::stmt has cognitive complexity 67 (threshold 15). Drivers by points: if/else 17 (41 pts), loops 7 (18 pts), match/switch 2 (5 pts), boolean chains 3 (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.
Checker::expr_inner (cognitive 66) crates/lint/src/sol/med/cheatcode_environment.rs:716— Checker::expr_inner has cognitive complexity 66 (threshold 15). Drivers by points: if/else 26 (45 pts), loops 4 (10 pts), boolean chains 6, match/switch 3 (5 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.
Checker::visit_stmt (cognitive 21) crates/lint/src/sol/med/uninitialized_local.rs:103— Checker::visit_stmt has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (7 pts), boolean chains 1, match/switch 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.
Checker::visit_expr (cognitive 17) crates/lint/src/sol/low/block_timestamp.rs:218— Checker::visit_expr has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, loops 1 (3 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SymExpr::binop (cognitive 51) crates/evm/symbolic/src/runtime/expr/expr.rs:505— SymExpr::binop has cognitive complexity 51 (threshold 15). Drivers by points: if/else 16 (23 pts), match/switch 12 (23 pts), boolean chains 5 (nesting depth added 18). 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.
SymExpr::known_byte (cognitive 26) crates/evm/symbolic/src/runtime/expr/expr.rs:1586— SymExpr::known_byte has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 3 (6 pts) (nesting depth added 15). 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.
SymExpr::unsigned_bits_cached (cognitive 24) crates/evm/symbolic/src/runtime/expr/expr.rs:1659— SymExpr::unsigned_bits_cached has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 4 (11 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.
SymExpr::byte_term (cognitive 23) crates/evm/symbolic/src/runtime/expr/expr.rs:1780— SymExpr::byte_term has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 2 (3 pts) (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
PreSimulationState::show_traces (cognitive 35) crates/script/src/execute.rs:518— PreSimulationState::show_traces has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 3 (7 pts), match/switch 2 (5 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PreSimulationState::eligible (cognitive 27) crates/script/src/library_deployments.rs:149— PreSimulationState::eligible has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 8, match/switch 2 (3 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PreSimulationState::collect_simulation_results (cognitive 27) crates/script/src/simulate.rs:299— PreSimulationState::collect_simulation_results has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 2 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PreSimulationState::equivalent_candidate (cognitive 26) crates/script/src/library_deployments.rs:247— PreSimulationState::equivalent_candidate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 3 (4 pts), boolean chains 3, match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConstraintContext::normalize_word (cognitive 32) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:814— ConstraintContext::normalize_word has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 8, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConstraintContext::bounded_bool_value (cognitive 21) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:882— ConstraintContext::bounded_bool_value has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ConstraintContext::normalize_signed_add_comparison (cognitive 21) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:923— ConstraintContext::normalize_signed_add_comparison has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, loops 1 (2 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConstraintContext::upper_bound_constraint (cognitive 20) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1196— ConstraintContext::upper_bound_constraint has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 12 (20 pts) (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.
ScriptArgs::preprocess (cognitive 27) crates/script/src/lib.rs:388— ScriptArgs::preprocess has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ScriptArgs::check_contract_sizes (cognitive 27) crates/script/src/lib.rs:912— ScriptArgs::check_contract_sizes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 3, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScriptArgs::run_script (cognitive 26) crates/script/src/lib.rs:504— ScriptArgs::run_script has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScriptArgs::prepare_script (cognitive 20) crates/script/src/lib.rs:647— ScriptArgs::prepare_script has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm_core::evm::lifecycle::merge_changes (cognitive 22) crates/evm/core/src/evm/lifecycle.rs:1840— foundry_evm_core::evm::lifecycle::merge_changes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm_core::fork::prefetch::spawn (cognitive 20) crates/evm/core/src/fork/prefetch.rs:62— foundry_evm_core::fork::prefetch::spawn has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (5 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm_core::evm::lifecycle::apply_account (cognitive 17) crates/evm/core/src/evm/lifecycle.rs:1995— foundry_evm_core::evm::lifecycle::apply_account has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
foundry_evm_core::fork::multi::create_fork (cognitive 16) crates/evm/core/src/fork/multi.rs:737— foundry_evm_core::fork::multi::create_fork has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/anvil/src/eth/backend/mem/mod.rs:4447— crates/anvil/src/eth/backend/mem/mod.rs:4447-4495 | crates/anvil/src/eth/backend/mem/mod.rs:7226-7267 | crates/anvil/src/eth/backend/mem/mod.rs:8021-8055 | crates/anvil/src/eth/backend/mem/mod.rs:8357-8420 — 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) crates/evm/symbolic/src/executor/calls.rs:14— crates/evm/symbolic/src/executor/calls.rs:14-253 | crates/evm/symbolic/src/executor/calls.rs:266-302 | crates/evm/symbolic/src/executor/calls.rs:470-500 | crates/evm/symbolic/src/executor/cheatcodes.rs:739-774 — 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) crates/lint/src/sol/info/internal_function_used_once.rs:26— crates/lint/src/sol/info/internal_function_used_once.rs:26-99 | crates/lint/src/sol/info/missing_inheritance.rs:19-122 | crates/lint/src/sol/info/unused_error.rs:21-62 | crates/lint/src/sol/low/inconsistent_type_names.rs:20-58 — 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) crates/test-utils/src/rpc.rs:304— crates/test-utils/src/rpc.rs:304-334 | crates/test-utils/src/rpc.rs:506-545 | crates/test-utils/src/rpc.rs:553-586 | crates/test-utils/src/rpc.rs:743-789 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×4
Edited copy of a member (21 corresponding lines) crates/anvil/src/eth/backend/fork.rs:398— crates/anvil/src/eth/backend/fork.rs:398-418 | crates/anvil/src/eth/backend/fork.rs:452-473 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) crates/evm/symbolic/src/abi.rs:488— crates/evm/symbolic/src/abi.rs:488-508 | crates/evm/symbolic/src/abi.rs:516-536 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) crates/lint/src/sol/high/reentrancy.rs:766— crates/lint/src/sol/high/reentrancy.rs:766-790 | crates/lint/src/sol/low/missing_events_access_control.rs:107-127 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) crates/anvil/src/eth/backend/mem/mod.rs:7830— crates/anvil/src/eth/backend/mem/mod.rs:7830-7850 | crates/anvil/src/eth/backend/mem/mod.rs:7994-8014 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×4
Edited copy of a member (19 corresponding lines) crates/lint/src/sol/high/arbitrary_send_erc20.rs:261— crates/lint/src/sol/high/arbitrary_send_erc20.rs:261-284 | crates/lint/src/sol/high/arbitrary_send_eth.rs:127-145 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) crates/lint/src/sol/low/missing_events_access_control.rs:228— crates/lint/src/sol/low/missing_events_access_control.rs:228-246 | crates/lint/src/sol/low/missing_events_arithmetic.rs:183-202 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) crates/anvil/src/eth/backend/mem/mod.rs:3148— crates/anvil/src/eth/backend/mem/mod.rs:3148-3166 | crates/anvil/src/eth/backend/mem/mod.rs:3176-3194 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) crates/evm/fuzz/src/lib.rs:207— crates/evm/fuzz/src/lib.rs:207-225 | crates/evm/fuzz/src/lib.rs:232-250 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×4
Edited copy of a member (15 corresponding lines) crates/evm/symbolic/src/runtime/memory.rs:729— crates/evm/symbolic/src/runtime/memory.rs:729-744 | crates/evm/symbolic/src/runtime/memory.rs:754-768 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) crates/evm/core/src/backend/mod.rs:1634— crates/evm/core/src/backend/mod.rs:1634-1648 | crates/evm/core/src/evm/tx.rs:266-283 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) crates/forge/src/symbolic_minimizer.rs:521— crates/forge/src/symbolic_minimizer.rs:521-540 | crates/forge/src/symbolic_minimizer.rs:1144-1158 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) crates/fmt/src/state/sol.rs:856— crates/fmt/src/state/sol.rs:856-870 | crates/fmt/src/state/sol.rs:872-889 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (11–12 lines × 2) crates/anvil/src/eth/backend/mem/mod.rs:6311— crates/anvil/src/eth/backend/mem/mod.rs:6311-6321 | crates/anvil/src/eth/backend/mem/mod.rs:6863-6874 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/backend/mem/mod.rs:6311` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) crates/evm/symbolic/src/executor/calls.rs:46— crates/evm/symbolic/src/executor/calls.rs:46-57 | crates/evm/symbolic/src/executor/opcodes.rs:1282-1292 — 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–12 lines × 2) crates/forge/src/mutation/mutators/unary_op_mutator.rs:65— crates/forge/src/mutation/mutators/unary_op_mutator.rs:65-76 | crates/forge/src/mutation/mutators/unary_op_mutator.rs:86-96 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/forge/src/mutation/mutators/unary_op_mutator.rs:65` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–12 lines × 2) crates/evm/fuzz/src/sequence.rs:404— crates/evm/fuzz/src/sequence.rs:404-414 | crates/evm/fuzz/src/sequence.rs:436-447 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/fuzz/src/sequence.rs:404` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
EthApi::execute (cyclomatic 191) crates/anvil/src/eth/api.rs:2288— EthApi::execute has cyclomatic complexity 191 (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.
EthApi::estimate_unsponsored_gas_with_state (cyclomatic 30) crates/anvil/src/eth/api.rs:2039— EthApi::estimate_unsponsored_gas_with_state has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EthApi::fee_history (cyclomatic 18) crates/anvil/src/eth/api.rs:1393— EthApi::fee_history has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
InspectorStackRefMut::transact_inner (cyclomatic 47) REDACTED:1366— InspectorStackRefMut::transact_inner has cyclomatic complexity 47 (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.
InspectorStackRefMut::call (cyclomatic 31) REDACTED:2138— InspectorStackRefMut::call has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
InspectorStackRefMut::create (cyclomatic 25) REDACTED:2350— InspectorStackRefMut::create has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Checker::expr_inner (cyclomatic 45) crates/lint/src/sol/med/cheatcode_environment.rs:716— Checker::expr_inner has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Checker::stmt (cyclomatic 40) crates/lint/src/sol/med/cheatcode_environment.rs:489— Checker::stmt has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Checker::visit_stmt (cyclomatic 16) crates/lint/src/sol/med/uninitialized_local.rs:103— Checker::visit_stmt 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.
forge_script::owner_approvals::prepare (cyclomatic 34) crates/script/src/owner_approvals.rs:155— forge_script::owner_approvals::prepare has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
forge_script::verify::verify_contracts (cyclomatic 25) crates/script/src/verify.rs:427— forge_script::verify::verify_contracts has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
forge_script::owner_approvals::assemble (cyclomatic 18) crates/script/src/owner_approvals.rs:532— forge_script::owner_approvals::assemble 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.
EntryAnalyzer::analyze_expr (cyclomatic 32) crates/lint/src/sol/high/protected_vars.rs:742— EntryAnalyzer::analyze_expr 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.
EntryAnalyzer::analyze_stmt (cyclomatic 27) crates/lint/src/sol/high/protected_vars.rs:567— EntryAnalyzer::analyze_stmt has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EntryAnalyzer::collect_slot_roots (cyclomatic 21) crates/lint/src/sol/high/protected_vars.rs:1117— EntryAnalyzer::collect_slot_roots has cyclomatic complexity 21 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PreSimulationState::eligible (cyclomatic 22) crates/script/src/library_deployments.rs:149— PreSimulationState::eligible 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.
PreSimulationState::show_traces (cyclomatic 20) crates/script/src/execute.rs:518— PreSimulationState::show_traces has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PreSimulationState::equivalent_candidate (cyclomatic 17) crates/script/src/library_deployments.rs:247— PreSimulationState::equivalent_candidate has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ScriptArgs::preprocess (cyclomatic 21) crates/script/src/lib.rs:388— ScriptArgs::preprocess has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ScriptArgs::run_script (cyclomatic 20) crates/script/src/lib.rs:504— ScriptArgs::run_script has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ScriptArgs::check_contract_sizes (cyclomatic 16) crates/script/src/lib.rs:912— ScriptArgs::check_contract_sizes 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.
HackComment crates/script/src/runner.rs:214— // HACK: if the current sender is the default script sender (which is a default value), we — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment crates/fmt/src/state/sol.rs:838— // HACK: heuristics: — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment crates/evm/traces/src/debug/mod.rs:364— // HACK: alloy parser treats user-defined types as uint8: https://github.com/alloy-rs/core/pull/386 — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
CallArgs::run_with_network_and_opts (cognitive 115) crates/cast/src/cmd/call.rs:404— CallArgs::run_with_network_and_opts has cognitive complexity 115 (threshold 15). Drivers by points: if/else 48 (86 pts), match/switch 9 (16 pts), boolean chains 10, loops 1 (3 pts) (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CallArgs::run (cognitive 17) crates/cast/src/cmd/call.rs:242— CallArgs::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CallArgs::run_curl (cognitive 16) crates/cast/src/cmd/call.rs:834— CallArgs::run_curl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
InspectorStackRefMut::transact_inner (cognitive 72) REDACTED:1366— InspectorStackRefMut::transact_inner has cognitive complexity 72 (threshold 15). Drivers by points: if/else 35 (44 pts), loops 6 (16 pts), boolean chains 8, match/switch 3 (4 pts) (nesting depth added 20). 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.
InspectorStackRefMut::call (cognitive 35) REDACTED:2138— InspectorStackRefMut::call has cognitive complexity 35 (threshold 15). Drivers by points: if/else 21 (24 pts), boolean chains 7, match/switch 2 (4 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
InspectorStackRefMut::create (cognitive 28) REDACTED:2350— InspectorStackRefMut::create has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 5 (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.
CreateArgs::deploy (cognitive 57) crates/forge/src/cmd/create.rs:509— CreateArgs::deploy has cognitive complexity 57 (threshold 15). Drivers by points: if/else 37 (50 pts), boolean chains 4, match/switch 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CreateArgs::run (cognitive 16) crates/forge/src/cmd/create.rs:142— CreateArgs::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CreateArgs::run_generic (cognitive 16) crates/forge/src/cmd/create.rs:234— CreateArgs::run_generic has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WarningsProvider::collect_nested_section_warnings (cognitive 51) crates/config/src/providers/warnings.rs:324— WarningsProvider::collect_nested_section_warnings has cognitive complexity 51 (threshold 15). Drivers by points: if/else 14 (37 pts), loops 4 (12 pts), boolean chains 2 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WarningsProvider::collect_warnings (cognitive 23) crates/config/src/providers/warnings.rs:169— WarningsProvider::collect_warnings has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (9 pts), boolean chains 4 (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.
WarningsProvider::collect_standalone_section_warnings (cognitive 23) crates/config/src/providers/warnings.rs:263— WarningsProvider::collect_standalone_section_warnings has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Campaign::report (cognitive 38) crates/forge/src/cmd/properties.rs:602— Campaign::report has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (22 pts), loops 8 (11 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Campaign::run_agent (cognitive 20) crates/forge/src/cmd/properties.rs:842— Campaign::run_agent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 2 (3 pts), match/switch 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.
Campaign::run_tests (cognitive 16) crates/forge/src/cmd/properties.rs:1001— Campaign::run_tests has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (4 pts), match/switch 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.
NodeConfig::setup_fork_db_config_with_replay (cognitive 36) crates/anvil/src/config.rs:2152— NodeConfig::setup_fork_db_config_with_replay has cognitive complexity 36 (threshold 15). Drivers by points: if/else 23 (29 pts), boolean chains 6, loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
NodeConfig::setup (cognitive 21) crates/anvil/src/config.rs:1523— NodeConfig::setup has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (19 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.
NodeConfig::as_string (cognitive 17) crates/anvil/src/config.rs:387— NodeConfig::as_string has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 3 (5 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CoverageArgs::collect (cognitive 35) crates/forge/src/cmd/coverage.rs:562— CoverageArgs::collect has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 4 (8 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CoverageArgs::build (cognitive 33) crates/forge/src/cmd/coverage.rs:271— CoverageArgs::build has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 5, loops 1 (2 pts), match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CoverageArgs::prepare (cognitive 18) crates/forge/src/cmd/coverage.rs:463— CoverageArgs::prepare has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymBytes::append_concrete_range (cognitive 33) crates/evm/symbolic/src/runtime/bytes.rs:547— SymBytes::append_concrete_range has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymBytes::slice_concrete (cognitive 28) crates/evm/symbolic/src/runtime/bytes.rs:209— SymBytes::slice_concrete has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 4, loops 1 (2 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymBytes::byte (cognitive 22) crates/evm/symbolic/src/runtime/bytes.rs:135— SymBytes::byte has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
EntryAnalyzer::analyze_expr (cognitive 32) crates/lint/src/sol/high/protected_vars.rs:742— EntryAnalyzer::analyze_expr has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 9, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
EntryAnalyzer::analyze_stmt (cognitive 25) crates/lint/src/sol/high/protected_vars.rs:567— EntryAnalyzer::analyze_stmt has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
EntryAnalyzer::collect_slot_roots (cognitive 18) crates/lint/src/sol/high/protected_vars.rs:1117— EntryAnalyzer::collect_slot_roots has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 1 (2 pts), boolean chains 1, match/switch 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.
PathState::expr_upper_bound_usize_cached (cognitive 30) crates/evm/symbolic/src/runtime/state.rs:570— PathState::expr_upper_bound_usize_cached has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 8 (17 pts), if/else 6 (13 pts) (nesting depth added 16). 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.
PathState::apply_executor_env (cognitive 28) crates/evm/symbolic/src/runtime/state.rs:164— PathState::apply_executor_env has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 8 (10 pts), boolean chains 3 (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.
PathState::replay_persistent_writes (cognitive 17) crates/evm/symbolic/src/runtime/state.rs:1260— PathState::replay_persistent_writes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 4 (5 pts), match/switch 2 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DelegateTargetCollector::visit_modifier_chain (cognitive 30) crates/lint/src/sol/high/function_selector_collision.rs:232— DelegateTargetCollector::visit_modifier_chain has cognitive complexity 30 (threshold 15). Drivers by points: loops 5 (16 pts), if/else 6 (13 pts), boolean chains 1 (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DelegateTargetCollector::visit_expr (cognitive 29) crates/lint/src/sol/high/function_selector_collision.rs:542— DelegateTargetCollector::visit_expr has cognitive complexity 29 (threshold 15). Drivers by points: loops 6 (16 pts), if/else 5 (10 pts), match/switch 2 (3 pts) (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
DelegateTargetCollector::visit_stmt (cognitive 29) crates/lint/src/sol/high/function_selector_collision.rs:618— DelegateTargetCollector::visit_stmt has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 5 (13 pts), match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SlotIdentifier::handle_struct (cognitive 28) crates/common/src/slot_identifier.rs:593— SlotIdentifier::handle_struct has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SlotIdentifier::handle_mapping (cognitive 21) crates/common/src/slot_identifier.rs:755— SlotIdentifier::handle_mapping has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SlotIdentifier::identify (cognitive 17) crates/common/src/slot_identifier.rs:414— SlotIdentifier::identify has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm_traces::trace_arena_at_depth (cognitive 25) crates/evm/traces/src/lib.rs:362— foundry_evm_traces::trace_arena_at_depth has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (8 pts), match/switch 2 (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.
foundry_evm_traces::render_trace_arena_inner (cognitive 21) crates/evm/traces/src/lib.rs:428— foundry_evm_traces::render_trace_arena_inner has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (7 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_evm_traces::decoder::precompiles::is_known_precompile (cognitive 17) crates/evm/traces/src/decoder/precompiles.rs:474— foundry_evm_traces::decoder::precompiles::is_known_precompile has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts), match/switch 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Config::ensure_solc (cognitive 19) crates/config/src/lib.rs:1775— Config::ensure_solc has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Config::restrictions (cognitive 18) crates/config/src/lib.rs:1470— Config::restrictions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Config::list_foundry_cache (cognitive 18) crates/config/src/lib.rs:2849— Config::list_foundry_cache has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×3
Edited copy of a member (3 corresponding lines) crates/lint/src/sol/high/arbitrary_send_erc20.rs:174— crates/lint/src/sol/high/arbitrary_send_erc20.rs:174-176 | crates/lint/src/sol/high/reentrancy.rs:1655-1657 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) crates/verify/src/etherscan/mod.rs:543— crates/verify/src/etherscan/mod.rs:543-545 | crates/verify/src/sourcify.rs:125-127 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) crates/lint/src/sol/analysis/exprs.rs:75— crates/lint/src/sol/analysis/exprs.rs:75-77 | crates/lint/src/sol/high/encode_packed_collision.rs:39-41 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (17 lines × 2) REDACTED:2149— REDACTED:2149-2165 | REDACTED:2366-2382 — both copies are in the same file, so extract the 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) crates/evm/symbolic/src/abi.rs:492— crates/evm/symbolic/src/abi.rs:492-508 | crates/evm/symbolic/src/abi.rs:520-536 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/abi.rs:492` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) crates/lint/src/sol/high/arbitrary_send_erc20.rs:405— crates/lint/src/sol/high/arbitrary_send_erc20.rs:405-421 | crates/lint/src/sol/high/arbitrary_send_eth.rs:217-233 — before extracting anything, compare `crates/lint/src/sol/high/arbitrary_send_erc20.rs` and `crates/lint/src/sol/high/arbitrary_send_eth.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/lint/src/sol/high/arbitrary_send_erc20.rs:405` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) crates/evm/symbolic/src/executor/calls.rs:80— crates/evm/symbolic/src/executor/calls.rs:80-94 | crates/evm/symbolic/src/executor/calls.rs:100-114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/calls.rs:80` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) crates/cheatcodes/src/crypto.rs:913— crates/cheatcodes/src/crypto.rs:913-927 | crates/common/src/wallet.rs:80-94 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cheatcodes/src/crypto.rs:913` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) crates/test-utils/src/rpc.rs:307— crates/test-utils/src/rpc.rs:307-321 | crates/test-utils/src/rpc.rs:556-570 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/test-utils/src/rpc.rs:307` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12–13 lines × 2) crates/cheatcodes/src/inspector.rs:3498— crates/cheatcodes/src/inspector.rs:3498-3510 | crates/cheatcodes/src/inspector.rs:3522-3533 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cheatcodes/src/inspector.rs:3498` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/cheatcodes/src/inspector.rs:3521` calls `stack`, `peek` and `crates/cheatcodes/src/inspector.rs:3496` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12–13 lines × 2) crates/evm/symbolic/src/executor/invariant.rs:150— crates/evm/symbolic/src/executor/invariant.rs:150-161 | crates/evm/symbolic/src/executor/invariant.rs:185-197 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/invariant.rs:150` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/evm/symbolic/src/executor/invariant.rs:198` calls `push` and `crates/evm/symbolic/src/executor/invariant.rs:162` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12–13 lines × 2) crates/forge/src/runner.rs:2148— crates/forge/src/runner.rs:2148-2160 | crates/forge/src/runner.rs:2301-2312 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/forge/src/runner.rs:2148` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) crates/anvil/src/eth/backend/mem/mod.rs:7457— crates/anvil/src/eth/backend/mem/mod.rs:7457-7466 | crates/anvil/src/eth/backend/mem/mod.rs:7551-7559 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/backend/mem/mod.rs:7457` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/anvil/src/eth/backend/mem/mod.rs:7455` calls `Ok` and `crates/anvil/src/eth/backend/mem/mod.rs:7549` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9–10 lines × 2) crates/common/src/tempo/configurable_account.rs:491— crates/common/src/tempo/configurable_account.rs:491-499 | crates/common/src/tempo/configurable_account.rs:789-798 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/common/src/tempo/configurable_account.rs:491` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) crates/evm/symbolic/src/executor/opcodes.rs:1155— crates/evm/symbolic/src/executor/opcodes.rs:1155-1163 | crates/evm/symbolic/src/executor/opcodes.rs:1174-1183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/opcodes.rs:1155` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) crates/cast/src/cmd/mktx.rs:310— crates/cast/src/cmd/mktx.rs:310-315 | crates/cast/src/cmd/mktx.rs:337-342 | crates/cast/src/cmd/mktx.rs:391-396 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) crates/evm/symbolic/src/runtime/expr/bool.rs:449— crates/evm/symbolic/src/runtime/expr/bool.rs:449-454 | crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:155-160 | crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:172-177 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/runtime/expr/bool.rs:449` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:171` calls `push` and `crates/evm/symbolic/src/runtime/expr/bool.rs:448` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 3) crates/evm/symbolic/src/runtime/expr/bool.rs:782— crates/evm/symbolic/src/runtime/expr/bool.rs:782-787 | crates/evm/symbolic/src/runtime/expr/bool.rs:789-794 | crates/evm/symbolic/src/runtime/expr/expr.rs:1579-1584 — 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 (5 lines × 3) crates/evm/symbolic/src/executor/opcodes.rs:904— crates/evm/symbolic/src/executor/opcodes.rs:904-908 | crates/evm/symbolic/src/executor/opcodes.rs:1280-1284 | crates/evm/symbolic/src/executor/opcodes.rs:1462-1466 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/opcodes.rs:904` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 3) crates/evm/symbolic/src/runtime/expr/bool.rs:198— crates/evm/symbolic/src/runtime/expr/bool.rs:198-202 | crates/evm/symbolic/src/runtime/expr/bool.rs:213-217 | crates/evm/symbolic/src/runtime/expr/bool.rs:258-262 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/evm/symbolic/src/runtime/expr/bool.rs:204` calls `Const`, `is_zero`, `constant` and `crates/evm/symbolic/src/runtime/expr/bool.rs:263` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 3) crates/fmt/src/state/sol.rs:740— crates/fmt/src/state/sol.rs:740-744 | crates/fmt/src/state/sol.rs:2531-2535 | crates/fmt/src/state/sol.rs:2592-2596 — 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.
Outbound HTTP without resilience crates/cast/src/cmd/safe/service.rs:315— `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/forge/src/cmd/clone.rs:806— `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience crates/forge/src/cmd/exploit.rs:275— `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
BundledState::broadcast (cyclomatic 94) crates/script/src/broadcast.rs:794— BundledState::broadcast has cyclomatic complexity 94 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BundledState::broadcast_batch (cyclomatic 55) crates/script/src/broadcast.rs:1627— BundledState::broadcast_batch has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CallArgs::run_with_network_and_opts (cyclomatic 61) crates/cast/src/cmd/call.rs:404— CallArgs::run_with_network_and_opts has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CallArgs::run (cyclomatic 20) crates/cast/src/cmd/call.rs:242— CallArgs::run 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.
anvil::eth::error::blockchain_error_to_rpc_result (cyclomatic 56) crates/anvil/src/eth/error/mod.rs:467— anvil::eth::error::blockchain_error_to_rpc_result has cyclomatic complexity 56 (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.
anvil::try_spawn (cyclomatic 16) crates/anvil/src/lib.rs:142— anvil::try_spawn 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.
SymBoolExpr::cmp (cyclomatic 48) crates/evm/symbolic/src/runtime/expr/bool.rs:72— SymBoolExpr::cmp has cyclomatic complexity 48 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SymBoolExpr::implies_unsigned_less_or_equal (cyclomatic 18) crates/evm/symbolic/src/runtime/expr/bool.rs:554— SymBoolExpr::implies_unsigned_less_or_equal 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.
RemappingsProvider::get_remappings (cyclomatic 38) crates/config/src/providers/remappings.rs:233— RemappingsProvider::get_remappings has cyclomatic complexity 38 (threshold 15). Of this number, 36 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RemappingsProvider::find_nested_foundry_remappings (cyclomatic 19) crates/config/src/providers/remappings.rs:551— RemappingsProvider::find_nested_foundry_remappings 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.
ContractRunner::run_tests (cyclomatic 38) crates/forge/src/runner.rs:859— ContractRunner::run_tests has cyclomatic complexity 38 (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.
ContractRunner::_setup (cyclomatic 26) crates/forge/src/runner.rs:547— ContractRunner::_setup has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CallTraceDecoder::decode_cheatcode_inputs (cyclomatic 34) crates/evm/traces/src/decoder/mod.rs:1295— CallTraceDecoder::decode_cheatcode_inputs has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CallTraceDecoder::decode_function (cyclomatic 23) crates/evm/traces/src/decoder/mod.rs:1102— CallTraceDecoder::decode_function 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.
PathState::expr_upper_bound_usize_cached (cyclomatic 31) crates/evm/symbolic/src/runtime/state.rs:570— PathState::expr_upper_bound_usize_cached has cyclomatic complexity 31 (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.
PathState::apply_executor_env (cyclomatic 21) crates/evm/symbolic/src/runtime/state.rs:164— PathState::apply_executor_env 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.
Campaign::report (cyclomatic 29) crates/forge/src/cmd/properties.rs:602— Campaign::report 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.
Campaign::run_agent (cyclomatic 16) crates/forge/src/cmd/properties.rs:842— Campaign::run_agent 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.
NodeConfig::setup_fork_db_config_with_replay (cyclomatic 27) crates/anvil/src/config.rs:2152— NodeConfig::setup_fork_db_config_with_replay has cyclomatic complexity 27 (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.
NodeConfig::setup (cyclomatic 16) crates/anvil/src/config.rs:1523— NodeConfig::setup 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.
VerifyArgs::run_with_resolved_context (cyclomatic 25) crates/verify/src/verify.rs:605— VerifyArgs::run_with_resolved_context has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VerifyArgs::resolve_context (cyclomatic 20) crates/verify/src/verify.rs:810— VerifyArgs::resolve_context has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SmtLibSubprocessSolver::is_sat_inner (cyclomatic 24) crates/evm/symbolic/src/runtime/solver/mod.rs:403— SmtLibSubprocessSolver::is_sat_inner has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SmtLibSubprocessSolver::model (cyclomatic 19) crates/evm/symbolic/src/runtime/solver/mod.rs:284— SmtLibSubprocessSolver::model has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
foundry_cli_markdown::build_command_markdown (cyclomatic 22) crates/cli-markdown/src/lib.rs:179— foundry_cli_markdown::build_command_markdown has cyclomatic complexity 22 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
foundry_cli_markdown::write_arg_markdown (cyclomatic 21) crates/cli-markdown/src/lib.rs:311— foundry_cli_markdown::write_arg_markdown has cyclomatic complexity 21 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
ProjectCompiler::handle_output (cyclomatic 22) crates/common/src/compile.rs:430— ProjectCompiler::handle_output has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ProjectCompiler::compile (cyclomatic 16) crates/common/src/compile.rs:269— ProjectCompiler::compile 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.
SymBytes::slice_concrete (cyclomatic 20) crates/evm/symbolic/src/runtime/bytes.rs:209— SymBytes::slice_concrete has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SymBytes::append_concrete_range (cyclomatic 19) crates/evm/symbolic/src/runtime/bytes.rs:547— SymBytes::append_concrete_range 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.
foundry_common::tempo::auth::ensure_access_key (cyclomatic 18) crates/common/src/tempo/auth.rs:97— foundry_common::tempo::auth::ensure_access_key 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.
foundry_common::external_storage::resolve (cyclomatic 16) crates/common/src/external_storage.rs:98— foundry_common::external_storage::resolve 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.
BundledState::broadcast (cognitive 229) crates/script/src/broadcast.rs:794— BundledState::broadcast has cognitive complexity 229 (threshold 15). Drivers by points: if/else 56 (152 pts), match/switch 9 (29 pts), loops 9 (26 pts), boolean chains 22 (nesting depth added 133). 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.
BundledState::broadcast_batch (cognitive 75) crates/script/src/broadcast.rs:1627— BundledState::broadcast_batch has cognitive complexity 75 (threshold 15). Drivers by points: if/else 41 (57 pts), match/switch 6 (9 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InvariantExecutor::run_invariant_worker (cognitive 222) crates/evm/evm/src/executors/invariant/mod.rs:1020— InvariantExecutor::run_invariant_worker has cognitive complexity 222 (threshold 15). Drivers by points: if/else 75 (188 pts), boolean chains 22, match/switch 2 (7 pts), loops 3 (5 pts) (nesting depth added 120). 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.
InvariantExecutor::invariant_fuzz (cognitive 17) crates/evm/evm/src/executors/invariant/mod.rs:801— InvariantExecutor::invariant_fuzz has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RemappingsProvider::get_remappings (cognitive 72) crates/config/src/providers/remappings.rs:233— RemappingsProvider::get_remappings has cognitive complexity 72 (threshold 15). Drivers by points: if/else 15 (42 pts), loops 8 (15 pts), boolean chains 11, match/switch 2 (4 pts) (nesting depth added 36). Of this number, 69 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
RemappingsProvider::find_nested_foundry_remappings (cognitive 36) crates/config/src/providers/remappings.rs:551— RemappingsProvider::find_nested_foundry_remappings has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 6, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecoveryPlan::validate_signed_payloads (cognitive 61) crates/script/src/recovery.rs:850— RecoveryPlan::validate_signed_payloads has cognitive complexity 61 (threshold 15). Drivers by points: if/else 15 (44 pts), boolean chains 7, match/switch 2 (7 pts), loops 2 (3 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecoveryPlan::operations_match (cognitive 17) crates/script/src/recovery.rs:811— RecoveryPlan::operations_match has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DependencyInstallOpts::install (cognitive 59) crates/cli/src/install.rs:226— DependencyInstallOpts::install has cognitive complexity 59 (threshold 15). Drivers by points: if/else 19 (51 pts), match/switch 1 (4 pts), boolean chains 3, loops 1 (nesting depth added 35). 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.
DependencyInstallOpts::install_existing_dependencies (cognitive 19) crates/cli/src/install.rs:129— DependencyInstallOpts::install_existing_dependencies has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 1 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContractRunner::_setup (cognitive 51) crates/forge/src/runner.rs:547— ContractRunner::_setup has cognitive complexity 51 (threshold 15). Drivers by points: if/else 18 (41 pts), loops 4 (6 pts), boolean chains 3, match/switch 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContractRunner::run_tests (cognitive 50) crates/forge/src/runner.rs:859— ContractRunner::run_tests has cognitive complexity 50 (threshold 15). Drivers by points: if/else 29 (38 pts), boolean chains 8, loops 2, match/switch 1 (2 pts) (nesting depth added 10). 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.
ProjectCompiler::handle_output (cognitive 41) crates/common/src/compile.rs:430— ProjectCompiler::handle_output has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 6 (16 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProjectCompiler::compile (cognitive 18) crates/common/src/compile.rs:269— ProjectCompiler::compile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 6, loops 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
VerifyArgs::resolve_context (cognitive 40) crates/verify/src/verify.rs:810— VerifyArgs::resolve_context has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23 (39 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VerifyArgs::run_with_resolved_context (cognitive 32) crates/verify/src/verify.rs:605— VerifyArgs::run_with_resolved_context has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (17 pts), match/switch 5 (8 pts), boolean chains 6, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnvilBlockExecutor::execute_pool_transactions (cognitive 37) crates/anvil/src/eth/backend/executor.rs:539— AnvilBlockExecutor::execute_pool_transactions has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 4 (9 pts), boolean chains 3, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnvilBlockExecutor::finish (cognitive 17) crates/anvil/src/eth/backend/executor.rs:459— AnvilBlockExecutor::finish has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 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.
SlotInfo::decode_values (cognitive 34) crates/common/src/slot_identifier.rs:273— SlotInfo::decode_values has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (29 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
SlotInfo::decode (cognitive 18) crates/common/src/slot_identifier.rs:82— SlotInfo::decode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_cli_markdown::build_command_markdown (cognitive 32) crates/cli-markdown/src/lib.rs:179— foundry_cli_markdown::build_command_markdown has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (16 pts), loops 6 (12 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 11). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
foundry_cli_markdown::write_arg_markdown (cognitive 30) crates/cli-markdown/src/lib.rs:311— foundry_cli_markdown::write_arg_markdown has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (22 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 7). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
CommentGatherer::split_block_comment_into_lines (cognitive 32) crates/common/src/comments/mod.rs:315— CommentGatherer::split_block_comment_into_lines has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 3, loops 1 (nesting depth added 15). 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.
CommentGatherer::process_token (cognitive 28) crates/common/src/comments/mod.rs:216— CommentGatherer::process_token has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 1 (3 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 14). 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.
Cx::unsafe_mint_target (cognitive 32) crates/lint/src/sol/med/unsafe_oz_erc721_mint.rs:151— Cx::unsafe_mint_target has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 12, loops 2, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cx::modifier_coverage_at_body (cognitive 21) crates/lint/src/sol/med/unsafe_oz_erc721_mint.rs:751— Cx::modifier_coverage_at_body has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilledTransactionsState::bundle (cognitive 30) crates/script/src/simulate.rs:691— FilledTransactionsState::bundle has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 13). 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.
FilledTransactionsState::print_gas_estimate (cognitive 22) crates/script/src/simulate.rs:886— FilledTransactionsState::print_gas_estimate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ExecutionLifecycle::resume (cognitive 29) crates/evm/core/src/evm/lifecycle.rs:1269— ExecutionLifecycle::resume has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 7 (9 pts), boolean chains 8 (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.
ExecutionLifecycle::suspend (cognitive 20) crates/evm/core/src/evm/lifecycle.rs:1170— ExecutionLifecycle::suspend has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 5 (6 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReadyTransactions::prune_tags (cognitive 28) crates/anvil/src/eth/pool/transactions.rs:597— ReadyTransactions::prune_tags has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 4 (10 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReadyTransactions::remove_with_markers (cognitive 17) crates/anvil/src/eth/pool/transactions.rs:666— ReadyTransactions::remove_with_markers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SmtLibSubprocessSolver::is_sat_inner (cognitive 28) crates/evm/symbolic/src/runtime/solver/mod.rs:403— SmtLibSubprocessSolver::is_sat_inner has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 4, match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SmtLibSubprocessSolver::model (cognitive 18) crates/evm/symbolic/src/runtime/solver/mod.rs:284— SmtLibSubprocessSolver::model has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
foundry_debugger::soldb::write_bundle (cognitive 24) crates/debugger/src/soldb.rs:725— foundry_debugger::soldb::write_bundle has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_debugger::soldb::executed_programs (cognitive 18) crates/debugger/src/soldb.rs:575— foundry_debugger::soldb::executed_programs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExternalIdentifier::get_abis (cognitive 24) crates/evm/traces/src/identifier/external.rs:323— ExternalIdentifier::get_abis has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExternalIdentifier::identify_addresses (cognitive 16) crates/evm/traces/src/identifier/external.rs:425— ExternalIdentifier::identify_addresses has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BindJsonArgs::find_and_resolve_structs (cognitive 24) crates/forge/src/cmd/bind_json.rs:134— BindJsonArgs::find_and_resolve_structs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BindJsonArgs::resolve_conflicts (cognitive 17) crates/forge/src/cmd/bind_json.rs:234— BindJsonArgs::resolve_conflicts has cognitive complexity 17 (threshold 15). Drivers by points: loops 8 (11 pts), if/else 3 (6 pts) (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
RawCallResult::merge_edge_coverage (cognitive 23) crates/evm/evm/src/executors/mod.rs:1595— RawCallResult::merge_edge_coverage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (9 pts), match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RawCallResult::merge_sancov_coverage (cognitive 18) crates/evm/evm/src/executors/mod.rs:1701— RawCallResult::merge_sancov_coverage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
WriteAnalyzer::visit_stmt (cognitive 23) crates/lint/src/sol/low/missing_events_access_control.rs:348— WriteAnalyzer::visit_stmt has cognitive complexity 23 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 5 (9 pts), boolean chains 1, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
WriteAnalyzer::analyze_function (cognitive 17) crates/lint/src/sol/low/missing_events_access_control.rs:179— WriteAnalyzer::analyze_function has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (4 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.
anvil::try_spawn (cognitive 21) crates/anvil/src/lib.rs:142— anvil::try_spawn has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
anvil::eth::backend::db::commit_changes (cognitive 19) crates/anvil/src/eth/backend/db.rs:593— anvil::eth::backend::db::commit_changes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 5, match/switch 2 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Git::submodules_in_worktree (cognitive 21) crates/cli/src/utils/mod.rs:866— Git::submodules_in_worktree has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Git::submodule_mappings_at (cognitive 16) crates/cli/src/utils/mod.rs:973— Git::submodule_mappings_at has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymMemory::byte_dynamic_with_delta_and_bounds (cognitive 20) crates/evm/symbolic/src/runtime/memory.rs:514— SymMemory::byte_dynamic_with_delta_and_bounds has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymMemory::read_stored_bytes (cognitive 18) crates/evm/symbolic/src/runtime/memory.rs:376— SymMemory::read_stored_bytes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolicWorld::replay_storage_assignments (cognitive 16) crates/evm/symbolic/src/runtime/state.rs:2410— SymbolicWorld::replay_storage_assignments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 4 (6 pts), match/switch 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolicWorld::storage_base (cognitive 16) crates/evm/symbolic/src/runtime/state.rs:2604— SymbolicWorld::storage_base has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Change-coupling hub: batch_mktx.rs → keychain.rs, send.rs, broadcast.rs crates/cast/src/cmd/batch_mktx.rs— `crates/cast/src/cmd/batch_mktx.rs` changes together with 3 other files — `crates/cast/src/cmd/keychain.rs`, `crates/cast/src/cmd/send.rs`, `crates/script/src/broadcast.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Change-coupling hub: tests.rs → keychain.rs, send.rs, create.rs, broadcast.rs crates/common/src/tempo/tests.rs— `crates/common/src/tempo/tests.rs` changes together with 4 other files — `crates/cast/src/cmd/keychain.rs`, `crates/cast/src/cmd/send.rs`, `crates/forge/src/cmd/create.rs`, `crates/script/src/broadcast.rs` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
D4 · Code Duplication· Edited copy of a member (53 corresponding lines) · ×2
Edited copy of a member (53 corresponding lines) crates/anvil/src/eth/backend/mem/mod.rs:7446— crates/anvil/src/eth/backend/mem/mod.rs:7446-7498 | crates/anvil/src/eth/backend/mem/mod.rs:7537-7598 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (53 corresponding lines) crates/config/src/providers/warnings.rs:268— crates/config/src/providers/warnings.rs:268-320 | crates/config/src/providers/warnings.rs:330-400 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×2
Edited copy of a member (27 corresponding lines) crates/cheatcodes/src/evm.rs:1681— crates/cheatcodes/src/evm.rs:1681-1711 | crates/cheatcodes/src/evm.rs:1716-1742 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) crates/script-sequence/src/sequence.rs:240— crates/script-sequence/src/sequence.rs:240-266 | crates/script/src/multi_sequence.rs:62-93 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×2
Edited copies of one member (3 members, 17+ corresponding lines) crates/primitives/src/transaction/envelope.rs:352— crates/primitives/src/transaction/envelope.rs:352-368 | crates/primitives/src/transaction/receipt.rs:281-297 | crates/primitives/src/transaction/receipt.rs:395-411 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) crates/primitives/src/transaction/receipt.rs:300— crates/primitives/src/transaction/receipt.rs:300-316 | crates/primitives/src/transaction/receipt.rs:319-335 | crates/primitives/src/transaction/receipt.rs:413-432 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×2
Edited copy of a member (16 corresponding lines) crates/lint/src/sol/gas/immutable.rs:120— crates/lint/src/sol/gas/immutable.rs:120-135 | crates/lint/src/sol/high/arbitrary_send_eth.rs:923-938 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) crates/common/src/provider/mpp/transport.rs:280— crates/common/src/provider/mpp/transport.rs:280-295 | crates/common/src/provider/mpp/transport.rs:301-316 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) crates/forge/src/symbolic_minimizer.rs:446— crates/forge/src/symbolic_minimizer.rs:446-476 | crates/forge/src/symbolic_minimizer.rs:1362-1383 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) crates/forge/src/symbolic_minimizer.rs:545— crates/forge/src/symbolic_minimizer.rs:545-578 | crates/forge/src/symbolic_minimizer.rs:1180-1201 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×2
Edited copy of a member (17 corresponding lines) crates/primitives/src/transaction/receipt.rs:195— crates/primitives/src/transaction/receipt.rs:195-211 | crates/primitives/src/transaction/receipt.rs:214-230 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) crates/common/src/preprocessor/deps.rs:420— crates/common/src/preprocessor/deps.rs:420-442 | crates/common/src/preprocessor/deps.rs:549-565 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×2
Edited copies of one member (3 members, 13+ corresponding lines) crates/common/src/fs.rs:148— crates/common/src/fs.rs:148-160 | crates/common/src/fs.rs:163-178 | crates/common/src/fs.rs:181-194 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) crates/anvil/src/eth/backend/mem/mod.rs:4142— crates/anvil/src/eth/backend/mem/mod.rs:4142-4156 | crates/anvil/src/eth/backend/mem/mod.rs:4208-4227 | crates/anvil/src/eth/backend/mem/mod.rs:8283-8295 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 12+ corresponding lines) · ×2
Edited copies of one member (4 members, 12+ corresponding lines) crates/anvil/src/eth/backend/mem/mod.rs:2691— crates/anvil/src/eth/backend/mem/mod.rs:2691-2702 | crates/anvil/src/eth/backend/mem/mod.rs:2707-2718 | crates/anvil/src/eth/backend/mem/mod.rs:2723-2737 | crates/anvil/src/eth/backend/mem/mod.rs:2742-2756 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 12+ corresponding lines) crates/anvil/src/args.rs:7— crates/anvil/src/args.rs:7-20 | crates/cast/src/args.rs:109-120 | crates/chisel/src/args.rs:31-42 | crates/forge/src/args.rs:13-25 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×2
Edited copy of a member (5 corresponding lines) crates/forge/src/mutation/mutators/binary_op_mutator.rs:130— crates/forge/src/mutation/mutators/binary_op_mutator.rs:130-134 | crates/forge/src/mutation/mutators/require_mutator.rs:130-134 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) crates/forge/src/brutalizer/transform.rs:24— crates/forge/src/brutalizer/transform.rs:24-28 | crates/forge/src/mutation/mutators/unary_op_mutator.rs:141-145 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (19 lines × 2) crates/cheatcodes/src/inspector.rs:2391— crates/cheatcodes/src/inspector.rs:2391-2409 | crates/cheatcodes/src/inspector.rs:2824-2842 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cheatcodes/src/inspector.rs:2391` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) crates/fmt/src/state/mod.rs:1045— crates/fmt/src/state/mod.rs:1045-1063 | crates/fmt/src/state/mod.rs:1079-1097 — both copies are in the same file, so extract the 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) crates/linking/src/lib.rs:679— crates/linking/src/lib.rs:679-694 | crates/linking/src/lib.rs:754-769 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/linking/src/lib.rs:679` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) crates/doc/src/hir_ext.rs:913— crates/doc/src/hir_ext.rs:913-928 | crates/doc/src/hir_ext.rs:935-950 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/doc/src/hir_ext.rs:913` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 2) crates/config/src/providers/warnings.rs:346— crates/config/src/providers/warnings.rs:346-359 | crates/config/src/providers/warnings.rs:386-400 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/config/src/providers/warnings.rs:346` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/config/src/providers/warnings.rs:385` calls `keys`, `cloned`, `collect` and `crates/config/src/providers/warnings.rs:345` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14–15 lines × 2) crates/evm/symbolic/src/executor/calls.rs:274— crates/evm/symbolic/src/executor/calls.rs:274-287 | crates/evm/symbolic/src/executor/calls.rs:473-487 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/calls.rs:274` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 2) crates/cast/src/cmd/batch_mktx.rs:154— crates/cast/src/cmd/batch_mktx.rs:154-161 | crates/cast/src/cmd/mktx.rs:386-394 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cast/src/cmd/batch_mktx.rs:154` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8–9 lines × 2) crates/test-utils/src/rpc.rs:461— crates/test-utils/src/rpc.rs:461-468 | crates/test-utils/src/rpc.rs:822-830 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/test-utils/src/rpc.rs:461` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 3) crates/evm/symbolic/src/runtime/expr/expr.rs:508— crates/evm/symbolic/src/runtime/expr/expr.rs:508-515 | crates/evm/symbolic/src/runtime/expr/expr.rs:695-702 | crates/evm/symbolic/src/runtime/expr/expr.rs:714-721 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 3) crates/lint/src/sol/high/arbitrary_send_erc20.rs:403— crates/lint/src/sol/high/arbitrary_send_erc20.rs:403-410 | crates/lint/src/sol/high/arbitrary_send_eth.rs:215-222 | crates/lint/src/sol/high/controlled_delegatecall.rs:181-188 — before extracting anything, compare `crates/lint/src/sol/high/arbitrary_send_erc20.rs` and `crates/lint/src/sol/high/arbitrary_send_eth.rs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `crates/lint/src/sol/high/arbitrary_send_erc20.rs:403` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `pred` to `&Expr<'_>` in one and `&'gcx Expr<'gcx>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 3) crates/evm/symbolic/src/executor/opcodes.rs:961— crates/evm/symbolic/src/executor/opcodes.rs:961-967 | crates/evm/symbolic/src/executor/opcodes.rs:972-978 | crates/evm/symbolic/src/executor/opcodes.rs:984-990 — 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) crates/forge/src/cmd/equivalence.rs:191— crates/forge/src/cmd/equivalence.rs:191-197 | crates/forge/src/cmd/equivalence.rs:209-215 | crates/forge/src/cmd/equivalence.rs:226-233 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/forge/src/cmd/equivalence.rs:191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 4) crates/evm/symbolic/src/executor/opcodes.rs:817— crates/evm/symbolic/src/executor/opcodes.rs:817-822 | crates/evm/symbolic/src/executor/opcodes.rs:870-875 | crates/evm/symbolic/src/executor/opcodes.rs:914-919 | crates/evm/symbolic/src/executor/opcodes.rs:1290-1295 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/opcodes.rs:817` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 4) crates/evm/symbolic/src/runtime/expr/expr.rs:559— crates/evm/symbolic/src/runtime/expr/expr.rs:559-564 | crates/evm/symbolic/src/runtime/expr/expr.rs:747-752 | crates/evm/symbolic/src/runtime/expr/expr.rs:760-765 | crates/evm/symbolic/src/runtime/expr/expr.rs:772-777 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/evm/symbolic/src/runtime/expr/expr.rs:754` calls `Const`, `is_zero`, `zero` and `crates/evm/symbolic/src/runtime/expr/expr.rs:778` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 5) crates/evm/symbolic/src/executor/opcodes.rs:644— crates/evm/symbolic/src/executor/opcodes.rs:644-648 | crates/evm/symbolic/src/executor/opcodes.rs:756-760 | crates/evm/symbolic/src/executor/opcodes.rs:812-816 | crates/evm/symbolic/src/executor/opcodes.rs:865-869 | crates/evm/symbolic/src/executor/opcodes.rs:1323-1327 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/opcodes.rs:644` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 5) crates/evm/symbolic/src/executor/opcodes.rs:764— crates/evm/symbolic/src/executor/opcodes.rs:764-768 | crates/evm/symbolic/src/executor/opcodes.rs:819-823 | crates/evm/symbolic/src/executor/opcodes.rs:872-876 | crates/evm/symbolic/src/executor/opcodes.rs:916-920 | crates/evm/symbolic/src/executor/opcodes.rs:1292-1296 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/opcodes.rs:764` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/evm/symbolic/src/executor/opcodes.rs:763` calls `pop` and `crates/evm/symbolic/src/executor/opcodes.rs:818` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
InvariantExecutor::run_invariant_worker (cyclomatic 95) crates/evm/evm/src/executors/invariant/mod.rs:1020— InvariantExecutor::run_invariant_worker has cyclomatic complexity 95 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WalletSubcommands::run (cyclomatic 84) crates/cast/src/cmd/wallet/mod.rs:467— WalletSubcommands::run has cyclomatic complexity 84 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VerifyBytecodeArgs::prepare_runtime_verification (cyclomatic 58) crates/verify/src/bytecode.rs:318— VerifyBytecodeArgs::prepare_runtime_verification has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FmtArgs::run (cyclomatic 56) crates/forge/src/cmd/fmt.rs:60— FmtArgs::run has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SelectorsSubcommands::run (cyclomatic 53) crates/forge/src/cmd/selectors.rs:102— SelectorsSubcommands::run has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
benchmark_clickhouse.build_rows (cyclomatic 47) .github/scripts/benchmark_clickhouse.py:204— benchmark_clickhouse.build_rows 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.
SendTxArgs::run_generic_inner (cyclomatic 44) crates/cast/src/cmd/send.rs:193— SendTxArgs::run_generic_inner 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.
CreateArgs::deploy (cyclomatic 39) crates/forge/src/cmd/create.rs:509— CreateArgs::deploy has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ListArgs::run (cyclomatic 38) crates/cast/src/cmd/wallet/list.rs:63— ListArgs::run has cyclomatic complexity 38 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
InspectArgs::run (cyclomatic 38) crates/forge/src/cmd/inspect.rs:60— InspectArgs::run has cyclomatic complexity 38 (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.
UpdateArgs::run (cyclomatic 37) crates/forge/src/cmd/update.rs:38— UpdateArgs::run has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MakeTxArgs::run_generic (cyclomatic 36) crates/cast/src/cmd/mktx.rs:155— MakeTxArgs::run_generic has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ContractsByArtifact::find_by_deployed_code_exact_inner (cyclomatic 33) crates/common/src/contracts.rs:354— ContractsByArtifact::find_by_deployed_code_exact_inner 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.
GuardWalker::walk (cyclomatic 31) crates/lint/src/sol/med/unsafe_oz_erc721_mint.rs:1015— GuardWalker::walk 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.
ReturnDataObserver::visit_expr (cyclomatic 30) crates/common/src/preprocessor/deps.rs:1208— ReturnDataObserver::visit_expr has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PubSubConnection::poll (cyclomatic 29) crates/anvil/server/src/pubsub.rs:194— PubSubConnection::poll 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.
EquivalenceArgs::run (cyclomatic 28) crates/forge/src/cmd/equivalence.rs:103— EquivalenceArgs::run has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cx::unsafe_mint_target (cyclomatic 28) crates/lint/src/sol/med/unsafe_oz_erc721_mint.rs:151— Cx::unsafe_mint_target has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RecoveryPlan::validate_signed_payloads (cyclomatic 27) crates/script/src/recovery.rs:850— RecoveryPlan::validate_signed_payloads has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TestResult::render (cyclomatic 26) crates/forge/src/result.rs:1420— TestResult::render has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CoverageArgs::build (cyclomatic 25) crates/forge/src/cmd/coverage.rs:271— CoverageArgs::build has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SolidityLinter::lint (cyclomatic 25) crates/lint/src/sol/mod.rs:284— SolidityLinter::lint has cyclomatic complexity 25 (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.
SessionSource::inspect (cyclomatic 24) crates/chisel/src/executor.rs:151— SessionSource::inspect 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.
DependencyInstallOpts::install (cyclomatic 24) crates/cli/src/install.rs:226— DependencyInstallOpts::install 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.
PreprocessorDependencies::new (cyclomatic 24) crates/common/src/preprocessor/deps.rs:81— PreprocessorDependencies::new 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.
AnvilBlockExecutor::execute_pool_transactions (cyclomatic 23) crates/anvil/src/eth/backend/executor.rs:539— AnvilBlockExecutor::execute_pool_transactions 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.
TxBuilderInner::build (cyclomatic 23) crates/cast/src/tx.rs:714— TxBuilderInner::build has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ExecutionLifecycle::resume (cyclomatic 23) crates/evm/core/src/evm/lifecycle.rs:1269— ExecutionLifecycle::resume has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
BytecodeDependencyCollector::visit_expr (cyclomatic 22) crates/common/src/preprocessor/deps.rs:689— BytecodeDependencyCollector::visit_expr 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.
MultiForkHandler::poll (cyclomatic 22) crates/evm/core/src/fork/multi.rs:516— MultiForkHandler::poll 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.
LocalTraceIdentifier::identify_code (cyclomatic 22) crates/evm/traces/src/identifier/local.rs:46— LocalTraceIdentifier::identify_code 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.
InitArgs::run (cyclomatic 22) crates/forge/src/cmd/init.rs:70— InitArgs::run 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.
BatchMakeTxArgs::run (cyclomatic 21) crates/cast/src/cmd/batch_mktx.rs:65— BatchMakeTxArgs::run has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BuildOpts::data (cyclomatic 21) crates/cli/src/opts/build/core.rs:237— BuildOpts::data has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MissingInheritance::check_project (cyclomatic 21) crates/lint/src/sol/info/missing_inheritance.rs:19— MissingInheritance::check_project 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.
StorageArgs::run (cyclomatic 20) crates/cast/src/cmd/storage.rs:98— StorageArgs::run 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.
WarningsProvider::collect_nested_section_warnings (cyclomatic 20) crates/config/src/providers/warnings.rs:324— WarningsProvider::collect_nested_section_warnings has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SymBinOp::eval (cyclomatic 20) crates/evm/symbolic/src/runtime/expr/expr.rs:2310— SymBinOp::eval has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ResolveArgs::run (cyclomatic 20) crates/forge/src/cmd/compiler.rs:73— ResolveArgs::run has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DelegateTargetCollector::visit_stmt (cyclomatic 20) crates/lint/src/sol/high/function_selector_collision.rs:618— DelegateTargetCollector::visit_stmt has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
foundry_common_fmt::dynamic::_serialize_value_as_json (cyclomatic 19) crates/common/fmt/src/dynamic.rs:169— foundry_common_fmt::dynamic::_serialize_value_as_json 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.
WorkerCorpus::export_to_workers (cyclomatic 19) crates/evm/evm/src/executors/corpus.rs:1749— WorkerCorpus::export_to_workers 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.
ScriptProgress::wait_for_pending (cyclomatic 19) crates/script/src/progress.rs:224— ScriptProgress::wait_for_pending 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.
finalize-release.finalize_nightly (cyclomatic 19) .github/scripts/finalize-release.py:249— finalize-release.finalize_nightly has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DynValueFormatter::value (cyclomatic 18) crates/common/fmt/src/dynamic.rs:18— DynValueFormatter::value 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.
WorkerCorpusSeed::load_from_disk (cyclomatic 18) crates/evm/evm/src/executors/corpus.rs:431— WorkerCorpusSeed::load_from_disk 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.
SymbolicCalldata::variants_with_prefix (cyclomatic 18) crates/evm/symbolic/src/abi.rs:62— SymbolicCalldata::variants_with_prefix has cyclomatic complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ExpressionDigests::digest (cyclomatic 18) crates/evm/symbolic/src/runtime/expr/mod.rs:54— ExpressionDigests::digest 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.
FuzzCminArgs::run_to (cyclomatic 18) crates/forge/src/cmd/fuzz.rs:367— FuzzCminArgs::run_to 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.
WriteAnalyzer::visit_stmt (cyclomatic 18) crates/lint/src/sol/low/missing_events_access_control.rs:348— WriteAnalyzer::visit_stmt has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
FoundryTransactionRequest::try_from (cyclomatic 18) crates/primitives/src/transaction/request.rs:365— FoundryTransactionRequest::try_from 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.
ScriptRunner::setup (cyclomatic 18) crates/script/src/runner.rs:84— ScriptRunner::setup 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.
VerificationProviderType::client (cyclomatic 18) crates/verify/src/provider.rs:215— VerificationProviderType::client 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.
RunArgs::prepare (cyclomatic 17) crates/cast/src/cmd/run.rs:511— RunArgs::prepare has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
UnchangedStateVariables::check_nested_contract (cyclomatic 17) crates/lint/src/sol/gas/immutable.rs:34— UnchangedStateVariables::check_nested_contract has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FilledTransactionsState::bundle (cyclomatic 17) crates/script/src/simulate.rs:691— FilledTransactionsState::bundle has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PubSubEthRpcHandler::on_pub_sub (cyclomatic 16) crates/anvil/src/server/rpc_handlers.rs:65— PubSubEthRpcHandler::on_pub_sub has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Create2Args::run (cyclomatic 16) REDACTED:162— Create2Args::run 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.
Lockfile::check (cyclomatic 16) crates/cli/src/lockfile.rs:182— Lockfile::check has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
EvmArgs::data (cyclomatic 16) crates/cli/src/opts/evm.rs:177— EvmArgs::data 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.
CommentGatherer::process_token (cyclomatic 16) crates/common/src/comments/mod.rs:216— CommentGatherer::process_token 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.
DynamicTestLinkingPreprocessor::preprocess_with_dependencies (cyclomatic 16) crates/common/src/preprocessor/mod.rs:91— DynamicTestLinkingPreprocessor::preprocess_with_dependencies 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.
foundry_evm_core::evm::lifecycle::merge_changes (cyclomatic 16) crates/evm/core/src/evm/lifecycle.rs:1840— foundry_evm_core::evm::lifecycle::merge_changes 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.
ExternalFetcher::poll_next (cyclomatic 16) crates/evm/traces/src/identifier/external.rs:574— ExternalFetcher::poll_next 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.
foundry_evm_traces::decoder::precompiles::is_known_precompile (cyclomatic 16) crates/evm/traces/src/decoder/precompiles.rs:474— foundry_evm_traces::decoder::precompiles::is_known_precompile 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.
LintArgs::run (cyclomatic 16) crates/forge/src/cmd/lint.rs:50— LintArgs::run 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.
MultiContractRunnerBuilder::build (cyclomatic 16) crates/forge/src/multi_runner.rs:779— MultiContractRunnerBuilder::build 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.
SendTransactionKind::prepare (cyclomatic 16) crates/script/src/broadcast.rs:105— SendTransactionKind::prepare 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.
WalletSubcommands::run (cognitive 148) crates/cast/src/cmd/wallet/mod.rs:467— WalletSubcommands::run has cognitive complexity 148 (threshold 15). Drivers by points: if/else 64 (122 pts), match/switch 9 (19 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 70). 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.
SelectorsSubcommands::run (cognitive 135) crates/forge/src/cmd/selectors.rs:102— SelectorsSubcommands::run has cognitive complexity 135 (threshold 15). Drivers by points: if/else 37 (75 pts), loops 16 (51 pts), boolean chains 6, match/switch 2 (3 pts) (nesting depth added 74). 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.
VerifyBytecodeArgs::prepare_runtime_verification (cognitive 110) crates/verify/src/bytecode.rs:318— VerifyBytecodeArgs::prepare_runtime_verification has cognitive complexity 110 (threshold 15). Drivers by points: if/else 50 (90 pts), match/switch 9 (14 pts), boolean chains 6 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FmtArgs::run (cognitive 99) crates/forge/src/cmd/fmt.rs:60— FmtArgs::run has cognitive complexity 99 (threshold 15). Drivers by points: if/else 33 (57 pts), boolean chains 17, loops 5 (13 pts), match/switch 6 (12 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReturnDataObserver::visit_expr (cognitive 79) crates/common/src/preprocessor/deps.rs:1208— ReturnDataObserver::visit_expr has cognitive complexity 79 (threshold 15). Drivers by points: if/else 13 (47 pts), loops 8 (25 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 53). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
SendTxArgs::run_generic_inner (cognitive 77) crates/cast/src/cmd/send.rs:193— SendTxArgs::run_generic_inner has cognitive complexity 77 (threshold 15). Drivers by points: if/else 45 (69 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContractsByArtifact::find_by_deployed_code_exact_inner (cognitive 68) crates/common/src/contracts.rs:354— ContractsByArtifact::find_by_deployed_code_exact_inner has cognitive complexity 68 (threshold 15). Drivers by points: if/else 25 (49 pts), match/switch 4 (9 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MakeTxArgs::run_generic (cognitive 67) crates/cast/src/cmd/mktx.rs:155— MakeTxArgs::run_generic has cognitive complexity 67 (threshold 15). Drivers by points: if/else 37 (60 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ListArgs::run (cognitive 67) crates/cast/src/cmd/wallet/list.rs:63— ListArgs::run has cognitive complexity 67 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 10 (25 pts), boolean chains 8, match/switch 6 (7 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
benchmark_clickhouse.build_rows (cognitive 65) .github/scripts/benchmark_clickhouse.py:204— benchmark_clickhouse.build_rows has cognitive complexity 65 (threshold 15). Drivers by points: if/else 28 (43 pts), boolean chains 13, loops 4 (6 pts), ternaries 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PubSubConnection::poll (cognitive 64) crates/anvil/server/src/pubsub.rs:194— PubSubConnection::poll has cognitive complexity 64 (threshold 15). Drivers by points: if/else 10 (32 pts), match/switch 6 (21 pts), loops 5 (9 pts), boolean chains 2 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GuardWalker::walk (cognitive 59) crates/lint/src/sol/med/unsafe_oz_erc721_mint.rs:1015— GuardWalker::walk has cognitive complexity 59 (threshold 15). Drivers by points: if/else 19 (46 pts), boolean chains 8, match/switch 2 (4 pts), loops 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymbolicCalldata::variants_with_prefix (cognitive 56) crates/evm/symbolic/src/abi.rs:62— SymbolicCalldata::variants_with_prefix has cognitive complexity 56 (threshold 15). Drivers by points: loops 11 (30 pts), if/else 4 (15 pts), match/switch 3 (11 pts) (nesting depth added 38). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
MultiForkHandler::poll (cognitive 51) crates/evm/core/src/fork/multi.rs:516— MultiForkHandler::poll has cognitive complexity 51 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 5 (10 pts), match/switch 4 (10 pts), boolean chains 5 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InitArgs::run (cognitive 50) crates/forge/src/cmd/init.rs:70— InitArgs::run has cognitive complexity 50 (threshold 15). Drivers by points: if/else 27 (49 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TestResult::render (cognitive 49) crates/forge/src/result.rs:1420— TestResult::render has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 8, loops 2 (6 pts), match/switch 3 (6 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ResolveArgs::run (cognitive 48) crates/forge/src/cmd/compiler.rs:73— ResolveArgs::run has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (30 pts), loops 5 (12 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UpdateArgs::run (cognitive 48) crates/forge/src/cmd/update.rs:38— UpdateArgs::run has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 12, loops 7 (8 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalTraceIdentifier::identify_code (cognitive 43) crates/evm/traces/src/identifier/local.rs:46— LocalTraceIdentifier::identify_code has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (35 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BytecodeDependencyCollector::visit_expr (cognitive 42) crates/common/src/preprocessor/deps.rs:689— BytecodeDependencyCollector::visit_expr has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 3 (9 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 25). 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.
EquivalenceArgs::run (cognitive 42) crates/forge/src/cmd/equivalence.rs:103— EquivalenceArgs::run has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 8, loops 3 (6 pts), match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PreprocessorDependencies::new (cognitive 41) crates/common/src/preprocessor/deps.rs:81— PreprocessorDependencies::new has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (30 pts), loops 8 (10 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionSource::inspect (cognitive 40) crates/chisel/src/executor.rs:151— SessionSource::inspect has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (30 pts), match/switch 3 (4 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScriptProgress::wait_for_pending (cognitive 37) crates/script/src/progress.rs:224— ScriptProgress::wait_for_pending has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (31 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SymBoolExpr::cmp (cognitive 33) crates/evm/symbolic/src/runtime/expr/bool.rs:72— SymBoolExpr::cmp has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 8 (15 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LogsSubscription::poll (cognitive 31) crates/anvil/src/pubsub.rs:50— LogsSubscription::poll has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (24 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExternalCompilation::merge (cognitive 31) crates/common/src/external_compiler.rs:74— ExternalCompilation::merge has cognitive complexity 31 (threshold 15). Drivers by points: loops 8 (17 pts), if/else 6 (14 pts) (nesting depth added 17). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
StateSnapshots::observe_writes (cognitive 31) crates/evm/evm/src/executors/invariant/snapshot.rs:269— StateSnapshots::observe_writes has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 3 (4 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.
AnvilEvmArgs::resolve_rpc_alias (cognitive 30) crates/anvil/src/cmd.rs:782— AnvilEvmArgs::resolve_rpc_alias has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (7 pts), match/switch 1 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LibraryReferences::visit_expr (cognitive 30) crates/common/src/namespaced_storage.rs:434— LibraryReferences::visit_expr has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 4 (12 pts), boolean chains 1 (nesting depth added 19). 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.
ExploitArgs::run (cognitive 30) crates/forge/src/cmd/exploit.rs:108— ExploitArgs::run has cognitive complexity 30 (threshold 15). Drivers by points: loops 7 (14 pts), if/else 7 (13 pts), match/switch 1 (3 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
MissingInheritance::check_project (cognitive 30) crates/lint/src/sol/info/missing_inheritance.rs:19— MissingInheritance::check_project has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 4 (6 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BatchMakeTxArgs::run (cognitive 29) crates/cast/src/cmd/batch_mktx.rs:65— BatchMakeTxArgs::run has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
TomlFileProvider::read (cognitive 29) crates/config/src/providers/ext.rs:88— TomlFileProvider::read has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (26 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 15). 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.
FuzzCminArgs::run_to (cognitive 29) crates/forge/src/cmd/fuzz.rs:367— FuzzCminArgs::run_to has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (25 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScriptRunner::setup (cognitive 29) crates/script/src/runner.rs:84— ScriptRunner::setup has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TxBuilderInner::build (cognitive 28) crates/cast/src/tx.rs:714— TxBuilderInner::build has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 7, match/switch 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DynamicTestLinkingPreprocessor::preprocess_with_dependencies (cognitive 28) crates/common/src/preprocessor/mod.rs:91— DynamicTestLinkingPreprocessor::preprocess_with_dependencies has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LcovReporter::report (cognitive 28) crates/forge/src/coverage.rs:130— LcovReporter::report has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 3 (5 pts), match/switch 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FindBlockArgs::run (cognitive 27) crates/cast/src/cmd/find_block.rs:39— FindBlockArgs::run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AccountStateDiffs::fmt (cognitive 26) crates/cheatcodes/src/evm.rs:187— AccountStateDiffs::fmt has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (6 pts), match/switch 1 (3 pts), boolean chains 2 (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.
InspectArgs::run (cognitive 26) crates/forge/src/cmd/inspect.rs:60— InspectArgs::run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6, match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SolidityLinter::lint (cognitive 26) crates/lint/src/sol/mod.rs:284— SolidityLinter::lint has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 3 (6 pts), boolean chains 4, match/switch 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
Dependency::from_str (cognitive 25) crates/cli/src/opts/dependency.rs:56— Dependency::from_str has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (21 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FuzzCampaign::run_sequence (cognitive 25) crates/evm/evm/src/executors/campaign.rs:63— FuzzCampaign::run_sequence has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VerificationProviderType::client (cognitive 25) crates/verify/src/provider.rs:215— VerificationProviderType::client has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 7 (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.
FrameScan::advance (cognitive 24) crates/anvil/server/src/ipc.rs:159— FrameScan::advance has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 3 (8 pts), boolean chains 2, 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.
InterfaceArgs::run (cognitive 24) crates/cast/src/cmd/interface.rs:66— InterfaceArgs::run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (21 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProtectedVars::check_nested_contract (cognitive 24) crates/lint/src/sol/high/protected_vars.rs:44— ProtectedVars::check_nested_contract has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 pts), match/switch 1 (4 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.
WorkerCorpusSeed::load_from_disk (cognitive 23) crates/evm/evm/src/executors/corpus.rs:431— WorkerCorpusSeed::load_from_disk has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SparsedTraceArena::resolve_arena::clear_node (cognitive 23) crates/evm/traces/src/lib.rs:205— SparsedTraceArena::resolve_arena::clear_node has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultiContractRunnerBuilder::build (cognitive 23) crates/forge/src/multi_runner.rs:779— MultiContractRunnerBuilder::build has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TodoComment::check_full_source_unit (cognitive 23) crates/lint/src/sol/info/todo.rs:22— TodoComment::check_full_source_unit has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PreExecutionState::maybe_new_sender (cognitive 23) crates/script/src/execute.rs:216— PreExecutionState::maybe_new_sender has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 15). 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.
DynValueFormatter::value (cognitive 22) crates/common/fmt/src/dynamic.rs:18— DynValueFormatter::value has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SymBinOp::eval (cognitive 22) crates/evm/symbolic/src/runtime/expr/expr.rs:2310— SymBinOp::eval has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (21 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.
ContractSources::insert (cognitive 22) crates/evm/traces/src/debug/sources.rs:168— ContractSources::insert has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (6 pts), match/switch 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExternalFetcher::poll_next (cognitive 22) crates/evm/traces/src/identifier/external.rs:574— ExternalFetcher::poll_next has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LintArgs::run (cognitive 22) crates/forge/src/cmd/lint.rs:50— LintArgs::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (17 pts), loops 1 (2 pts), match/switch 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
FunctionSelectorCollision::check_nested_contract (cognitive 22) crates/lint/src/sol/high/function_selector_collision.rs:41— FunctionSelectorCollision::check_nested_contract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScriptTransactionBuilder::set_call (cognitive 22) crates/script/src/transaction.rs:32— ScriptTransactionBuilder::set_call has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
compare-benchmark-thresholds.compare (cognitive 22) .github/scripts/compare-benchmark-thresholds.py:77— compare-benchmark-thresholds.compare has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 4 (10 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RunArgs::prepare (cognitive 21) crates/cast/src/cmd/run.rs:511— RunArgs::prepare has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, match/switch 2 (5 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
StorageArgs::run (cognitive 21) crates/cast/src/cmd/storage.rs:98— StorageArgs::run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4, match/switch 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DocBuilder::build (cognitive 21) crates/doc/src/builder.rs:89— DocBuilder::build has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (17 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PersistentWrite::apply_all (cognitive 21) crates/evm/core/src/evm/lifecycle.rs:396— PersistentWrite::apply_all has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FoldedSlots::resolve_nested (cognitive 21) crates/evm/symbolic/src/runtime/folded_slots.rs:110— FoldedSlots::resolve_nested has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ModelSexp::value (cognitive 21) crates/evm/symbolic/src/runtime/solver/mod.rs:1745— ModelSexp::value has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 1 (3 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.
UnchangedStateVariables::check_nested_contract (cognitive 21) crates/lint/src/sol/gas/immutable.rs:34— UnchangedStateVariables::check_nested_contract has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 6, loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
benchmark_clickhouse.build_manifest (cognitive 21) .github/scripts/benchmark_clickhouse.py:76— benchmark_clickhouse.build_manifest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, 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.
finalize-release.finalize_nightly (cognitive 21) .github/scripts/finalize-release.py:249— finalize-release.finalize_nightly has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 3 (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.
HistoricalStateCache::snapshot (cognitive 20) crates/anvil/src/eth/backend/mem/in_memory_db.rs:161— HistoricalStateCache::snapshot has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StateRootCache::record_diff (cognitive 20) crates/anvil/src/eth/backend/mem/state.rs:103— StateRootCache::record_diff has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InMemoryBlockStates::enforce_limits (cognitive 20) crates/anvil/src/eth/backend/mem/storage.rs:144— InMemoryBlockStates::enforce_limits has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 2, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Create2Args::run (cognitive 20) REDACTED:162— Create2Args::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (15 pts), match/switch 3 (4 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.
BuildOpts::data (cognitive 20) crates/cli/src/opts/build/core.rs:237— BuildOpts::data has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20. 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.
LiveInvariantSolver::submit (cognitive 20) crates/evm/evm/src/executors/invariant/live.rs:165— LiveInvariantSolver::submit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Linker::link_bytecode_inner (cognitive 20) crates/linking/src/lib.rs:175— Linker::link_bytecode_inner has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FoundryTransactionRequest::try_from (cognitive 20) crates/primitives/src/transaction/request.rs:365— FoundryTransactionRequest::try_from has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 9 (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.
TrieNode::insert (cognitive 19) crates/anvil/src/eth/backend/mem/state.rs:301— TrieNode::insert has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 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.
BatchSendArgs::run (cognitive 19) crates/cast/src/cmd/batch_send.rs:61— BatchSendArgs::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
PermitArgs::run_generic (cognitive 19) crates/cast/src/cmd/erc20/permit.rs:117— PermitArgs::run_generic has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (13 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EstimateArgs::run_with_network (cognitive 19) crates/cast/src/cmd/estimate.rs:113— EstimateArgs::run_with_network has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (15 pts), match/switch 3, boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
LocalMembers::for_contract (cognitive 19) crates/doc/src/hir_ext.rs:745— LocalMembers::for_contract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MutationExclusionCollector::visit_expr (cognitive 19) crates/forge/src/mutation/type_analysis.rs:132— MutationExclusionCollector::visit_expr has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, loops 2 (5 pts), match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TestOutcome::ensure_ok (cognitive 19) crates/forge/src/result.rs:182— TestOutcome::ensure_ok has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SendTransactionKind::prepare (cognitive 19) crates/script/src/broadcast.rs:105— SendTransactionKind::prepare has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
matrices.main (cognitive 19) .github/scripts/matrices.py:101— matrices.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PendingTransactions::remove_with_dependents (cognitive 18) crates/anvil/src/eth/pool/transactions.rs:298— PendingTransactions::remove_with_dependents has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 5 (8 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SolarParser::parse_ast (cognitive 18) crates/config/src/inline/natspec.rs:476— SolarParser::parse_ast has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (3 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SourceVisitor::visit_stmt (cognitive 18) crates/evm/coverage/src/analysis.rs:322— SourceVisitor::visit_stmt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (2 pts), match/switch 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.
InconsistentTypeNames::check_project (cognitive 18) crates/lint/src/sol/low/inconsistent_type_names.rs:20— InconsistentTypeNames::check_project has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScriptSequenceKind::restore_delegated_pending (cognitive 18) crates/script/src/sequence.rs:439— ScriptSequenceKind::restore_delegated_pending has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VerifierArgs::check_credentials (cognitive 18) crates/verify/src/verify.rs:188— VerifierArgs::check_credentials has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 3 (8 pts), boolean chains 1 (nesting depth added 10). 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.
foundry_common_fmt::dynamic::_serialize_value_as_json (cognitive 17) crates/common/fmt/src/dynamic.rs:169— foundry_common_fmt::dynamic::_serialize_value_as_json has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (5 pts), loops 1 (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.
SourceAnalysis::new (cognitive 17) crates/evm/coverage/src/analysis.rs:597— SourceAnalysis::new has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3, match/switch 1 (2 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.
ExpressionDigests::digest (cognitive 17) crates/evm/symbolic/src/runtime/expr/mod.rs:54— ExpressionDigests::digest has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 2 (4 pts), loops 2 (3 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.
BindArgs::cached_artifact_paths (cognitive 17) crates/forge/src/cmd/bind.rs:273— BindArgs::cached_artifact_paths has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (8 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FuzzShowArgs::run (cognitive 17) crates/forge/src/cmd/fuzz.rs:265— FuzzShowArgs::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (5 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ExternalFunction::check_nested_contract (cognitive 17) crates/lint/src/sol/gas/external_function.rs:106— ExternalFunction::check_nested_contract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Imports::check_full_source_unit (cognitive 17) crates/lint/src/sol/info/imports.rs:36— Imports::check_full_source_unit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LockedEther::check_nested_contract (cognitive 17) crates/lint/src/sol/med/locked_ether.rs:33— LockedEther::check_nested_contract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NodeArgs::into_node_config (cognitive 16) crates/anvil/src/cmd.rs:271— NodeArgs::into_node_config has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 1 (2 pts), match/switch 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PubSubEthRpcHandler::on_pub_sub (cognitive 16) crates/anvil/src/server/rpc_handlers.rs:65— PubSubEthRpcHandler::on_pub_sub has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (13 pts), if/else 1 (3 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.
Installer::match_tag (cognitive 16) crates/cli/src/install.rs:788— Installer::match_tag has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lockfile::sync (cognitive 16) crates/cli/src/lockfile.rs:122— Lockfile::sync has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
foundry_cli::opts::build::utils::get_solar_sources_from_compile_output (cognitive 16) crates/cli/src/opts/build/utils.rs:159— foundry_cli::opts::build::utils::get_solar_sources_from_compile_output has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SelectorImportRequest::into_chunks (cognitive 16) crates/common/src/selectors.rs:492— SelectorImportRequest::into_chunks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MutationReporter::report (cognitive 16) crates/forge/src/mutation/reporter.rs:31— MutationReporter::report has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), loops 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
InternalFunctionUsedOnce::check_project (cognitive 16) crates/lint/src/sol/info/internal_function_used_once.rs:26— InternalFunctionUsedOnce::check_project has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, loops 2, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FoundryTxEnvelope::try_from (cognitive 16) crates/primitives/src/transaction/envelope.rs:416— FoundryTxEnvelope::try_from has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyFunctions: forge_lint::sol::analysis::exprs crates/lint/src/sol/analysis/exprs.rs:19— TooManyFunctions — 35 free functions. The bar is 30 free functions; this is 5 over it, 1.17× 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.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×1
Change coupling clique: eth.rs, op.rs, tempo.rs crates/evm/core/src/evm/eth.rs— 3 files — `crates/evm/core/src/evm/eth.rs`, `crates/evm/core/src/evm/op.rs`, `crates/evm/core/src/evm/tempo.rs` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
Near-duplicate member pair (49 shared lines) crates/lint/src/sol/high/arbitrary_send_erc20.rs:540— crates/lint/src/sol/high/arbitrary_send_erc20.rs:540-635 | crates/lint/src/sol/high/arbitrary_send_eth.rs:265-340 — These two members are variants of one another: 49 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.
D4 · Code Duplication· Edited copy of a member (71 corresponding lines) · ×1
Edited copy of a member (71 corresponding lines) crates/cast/src/cmd/erc4626.rs:973— crates/cast/src/cmd/erc4626.rs:973-1043 | crates/cast/src/cmd/erc4626.rs:1051-1123 — These two members are one piece of code written twice and then edited apart: 71 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×1
Edited copy of a member (28 corresponding lines) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1876— crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1876-1903 | crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1905-1932 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (45 corresponding lines) · ×1
Edited copy of a member (45 corresponding lines) crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:65— crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:65-109 | crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:976-1027 — These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) crates/anvil/src/eth/backend/mem/fork_db.rs:216— crates/anvil/src/eth/backend/mem/fork_db.rs:216-256 | crates/anvil/src/eth/backend/mem/in_memory_db.rs:586-625 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 35+ corresponding lines) · ×1
Edited copies of one member (3 members, 35+ corresponding lines) crates/lint/src/sol/high/arbitrary_send_erc20.rs:402— crates/lint/src/sol/high/arbitrary_send_erc20.rs:402-440 | crates/lint/src/sol/high/arbitrary_send_eth.rs:214-248 | crates/lint/src/sol/high/controlled_delegatecall.rs:180-215 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 35 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) crates/anvil/src/eth/api.rs:3243— crates/anvil/src/eth/api.rs:3243-3274 | crates/anvil/src/eth/api.rs:3284-3323 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) crates/evm/symbolic/src/runtime/expr/bool.rs:699— crates/evm/symbolic/src/runtime/expr/bool.rs:699-722 | crates/evm/symbolic/src/runtime/expr/bool.rs:741-767 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) crates/evm/symbolic/src/runtime/solver/smt/mod.rs:73— crates/evm/symbolic/src/runtime/solver/smt/mod.rs:73-106 | crates/evm/symbolic/src/runtime/solver/smt/mod.rs:129-162 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) crates/forge/src/symbolic_minimizer.rs:961— crates/forge/src/symbolic_minimizer.rs:961-989 | crates/forge/src/symbolic_minimizer.rs:995-1028 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×1
Edited copy of a member (23 corresponding lines) crates/anvil/src/eth/api.rs:4538— crates/anvil/src/eth/api.rs:4538-4566 | crates/anvil/src/eth/api.rs:4592-4614 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×1
Edited copy of a member (25 corresponding lines) crates/cheatcodes/src/inspector.rs:1214— crates/cheatcodes/src/inspector.rs:1214-1244 | crates/cheatcodes/src/inspector.rs:1254-1278 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 1+ corresponding lines) · ×1
Edited copies of one member (6 members, 1+ corresponding lines) crates/cli/src/install.rs:71— crates/cli/src/install.rs:71-71 | crates/forge/src/cmd/fmt.rs:57-57 | crates/forge/src/cmd/reinit.rs:17-17 | crates/forge/src/cmd/remappings.rs:20-20 | crates/forge/src/cmd/remove.rs:29-29 | crates/forge/src/cmd/update.rs:35-35 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 17+ corresponding lines) · ×1
Edited copies of one member (5 members, 17+ corresponding lines) crates/config/src/lib.rs:2746— crates/config/src/lib.rs:2746-2762 | crates/config/src/lib.rs:2767-2783 | crates/config/src/lib.rs:2788-2804 | crates/config/src/lib.rs:2809-2825 | crates/config/src/lib.rs:2830-2846 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 12+ corresponding lines) · ×1
Edited copies of one member (5 members, 12+ corresponding lines) crates/anvil/src/eth/api.rs:2819— crates/anvil/src/eth/api.rs:2819-2832 | crates/anvil/src/eth/api.rs:2841-2854 | crates/anvil/src/eth/api.rs:2900-2915 | crates/anvil/src/eth/api.rs:3176-3187 | crates/anvil/src/eth/api.rs:3198-3213 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 13+ corresponding lines) · ×1
Edited copies of one member (4 members, 13+ corresponding lines) crates/forge/src/mutation/visitor.rs:149— crates/forge/src/mutation/visitor.rs:149-161 | crates/forge/src/mutation/visitor.rs:166-187 | crates/forge/src/mutation/visitor.rs:189-209 | crates/forge/src/mutation/visitor.rs:211-232 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 11+ corresponding lines) · ×1
Edited copies of one member (4 members, 11+ corresponding lines) crates/primitives/src/transaction/request.rs:129— crates/primitives/src/transaction/request.rs:129-139 | crates/primitives/src/transaction/request.rs:311-321 | crates/primitives/src/transaction/request.rs:335-345 | crates/primitives/src/transaction/request.rs:349-359 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 6+ corresponding lines) · ×1
Edited copies of one member (5 members, 6+ corresponding lines) crates/evm/core/src/fork/multi.rs:200— crates/evm/core/src/fork/multi.rs:200-206 | crates/evm/core/src/fork/multi.rs:211-217 | crates/evm/core/src/fork/multi.rs:225-231 | crates/evm/core/src/fork/multi.rs:239-246 | crates/evm/core/src/fork/multi.rs:251-256 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 3+ corresponding lines) · ×1
Edited copies of one member (3 members, 3+ corresponding lines) crates/forge/src/brutalizer/mod.rs:95— crates/forge/src/brutalizer/mod.rs:95-99 | crates/forge/src/cmd/fuzz.rs:895-899 | crates/forge/src/cmd/inspect.rs:878-880 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (20–23 lines × 2) crates/script/src/simulate.rs:240— crates/script/src/simulate.rs:240-262 | crates/script/src/simulate/monad.rs:200-219 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/script/src/simulate.rs:240` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) crates/evm/symbolic/src/executor/run.rs:231— crates/evm/symbolic/src/executor/run.rs:231-251 | crates/evm/symbolic/src/executor/run.rs:264-284 — both copies are in the same file, so extract the 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–20 lines × 2) crates/cli/src/install.rs:538— crates/cli/src/install.rs:538-557 | crates/cli/src/install.rs:659-675 — both copies are in the same file, so extract the 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–19 lines × 2) crates/forge/src/cmd/fuzz.rs:334— crates/forge/src/cmd/fuzz.rs:334-352 | crates/forge/src/cmd/fuzz.rs:613-629 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/forge/src/cmd/fuzz.rs:334` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18–19 lines × 2) crates/script/src/simulate.rs:268— crates/script/src/simulate.rs:268-286 | crates/script/src/simulate/monad.rs:224-241 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/script/src/simulate.rs:268` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–18 lines × 3) crates/lint/src/sol/info/internal_function_used_once.rs:28— crates/lint/src/sol/info/internal_function_used_once.rs:28-44 | crates/lint/src/sol/info/missing_inheritance.rs:21-36 | crates/lint/src/sol/info/unused_error.rs:23-40 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/lint/src/sol/info/internal_function_used_once.rs:28` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 2) crates/forge/src/cmd/create.rs:358— crates/forge/src/cmd/create.rs:358-375 | crates/forge/src/cmd/create.rs:377-394 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/forge/src/cmd/create.rs:358` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (15–16 lines × 2) crates/anvil/src/eth/backend/mem/fork_db.rs:242— crates/anvil/src/eth/backend/mem/fork_db.rs:242-256 | crates/anvil/src/eth/backend/mem/in_memory_db.rs:610-625 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/backend/mem/fork_db.rs:242` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 3) crates/anvil/src/eth/backend/mem/mod.rs:7308— crates/anvil/src/eth/backend/mem/mod.rs:7308-7322 | crates/anvil/src/eth/backend/mem/mod.rs:7345-7359 | crates/anvil/src/eth/backend/mem/mod.rs:7385-7399 — 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 (13–14 lines × 4) crates/anvil/src/eth/backend/mem/mod.rs:4483— crates/anvil/src/eth/backend/mem/mod.rs:4483-4495 | crates/anvil/src/eth/backend/mem/mod.rs:7254-7267 | crates/anvil/src/eth/backend/mem/mod.rs:8043-8055 | crates/anvil/src/eth/backend/mem/mod.rs:8408-8420 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/anvil/src/eth/backend/mem/mod.rs:4483` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `block` to `BlockNumber` in one and `&Block` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11–13 lines × 2) crates/common/src/provider/mod.rs:409— crates/common/src/provider/mod.rs:409-421 | crates/common/src/provider/mod.rs:480-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/common/src/provider/mod.rs:493` calls `default`, `connect_provider` and `crates/common/src/provider/mod.rs:423` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (2–13 lines × 3) crates/evm/symbolic/src/executor/cheatcodes.rs:2646— crates/evm/symbolic/src/executor/cheatcodes.rs:2646-2658 | crates/evm/symbolic/src/executor/cheatcodes.rs:2667-2668 | crates/evm/symbolic/src/executor/cheatcodes.rs:2670-2682 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/cheatcodes.rs:2646` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/evm/symbolic/src/executor/cheatcodes.rs:2659` calls `read_abi_word_arg` and `crates/evm/symbolic/src/executor/cheatcodes.rs:2669` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10–12 lines × 2) crates/cheatcodes/src/fs.rs:84— crates/cheatcodes/src/fs.rs:84-95 | crates/cheatcodes/src/fs.rs:97-106 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/cheatcodes/src/fs.rs:84` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–10 lines × 2) crates/chisel/src/executor.rs:438— crates/chisel/src/executor.rs:438-447 | crates/chisel/src/executor.rs:456-463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/chisel/src/executor.rs:438` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–8 lines × 5) crates/evm/symbolic/src/executor/create.rs:19— crates/evm/symbolic/src/executor/create.rs:19-25 | crates/evm/symbolic/src/executor/opcodes.rs:758-765 | crates/evm/symbolic/src/executor/opcodes.rs:814-821 | crates/evm/symbolic/src/executor/opcodes.rs:867-874 | crates/evm/symbolic/src/executor/opcodes.rs:1287-1294 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/evm/symbolic/src/executor/opcodes.rs:766` calls `pop` and `crates/evm/symbolic/src/executor/opcodes.rs:822` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (4–7 lines × 4) crates/evm/symbolic/src/executor/calls.rs:134— crates/evm/symbolic/src/executor/calls.rs:134-140 | crates/evm/symbolic/src/executor/calls.rs:274-278 | crates/evm/symbolic/src/executor/calls.rs:472-478 | crates/evm/symbolic/src/executor/cheatcodes.rs:749-752 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/symbolic/src/executor/calls.rs:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6 lines × 5) crates/evm/symbolic/src/executor/create.rs:19— crates/evm/symbolic/src/executor/create.rs:19-24 | crates/evm/symbolic/src/executor/opcodes.rs:646-652 | crates/evm/symbolic/src/executor/opcodes.rs:758-764 | crates/evm/symbolic/src/executor/opcodes.rs:814-820 | crates/evm/symbolic/src/executor/opcodes.rs:867-873 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/evm/symbolic/src/executor/opcodes.rs:765` calls `pop` and `crates/evm/symbolic/src/executor/opcodes.rs:653` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 6) crates/evm/symbolic/src/executor/create.rs:19— crates/evm/symbolic/src/executor/create.rs:19-23 | crates/evm/symbolic/src/executor/opcodes.rs:646-651 | crates/evm/symbolic/src/executor/opcodes.rs:758-763 | crates/evm/symbolic/src/executor/opcodes.rs:814-819 | crates/evm/symbolic/src/executor/opcodes.rs:867-872 | crates/evm/symbolic/src/executor/opcodes.rs:1464-1469 — there are 6 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 6 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/evm/symbolic/src/executor/opcodes.rs:765` calls `pop` and `crates/evm/symbolic/src/executor/opcodes.rs:653` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 4) crates/lint/src/sol/info/internal_function_used_once.rs:34— crates/lint/src/sol/info/internal_function_used_once.rs:34-41 | crates/lint/src/sol/info/missing_inheritance.rs:26-33 | crates/lint/src/sol/info/unused_error.rs:30-37 | crates/lint/src/sol/low/inconsistent_type_names.rs:26-33 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/lint/src/sol/low/inconsistent_type_names.rs:25` calls `source_map` and `crates/lint/src/sol/info/internal_function_used_once.rs:30` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 5) crates/config/src/lib.rs:2748— crates/config/src/lib.rs:2748-2757 | crates/config/src/lib.rs:2769-2778 | crates/config/src/lib.rs:2790-2799 | crates/config/src/lib.rs:2811-2820 | crates/config/src/lib.rs:2832-2841 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/config/src/lib.rs:2748` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) crates/forge/src/cmd/selectors.rs:420— crates/forge/src/cmd/selectors.rs:420-428 | crates/forge/src/cmd/selectors.rs:431-439 | crates/forge/src/cmd/selectors.rs:442-450 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/forge/src/cmd/selectors.rs:420` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/test-utils/src/rpc.rs:304— crates/test-utils/src/rpc.rs:304-334 | crates/test-utils/src/rpc.rs:506-545 | crates/test-utils/src/rpc.rs:553-586 | crates/test-utils/src/rpc.rs:636-679 | crates/test-utils/src/rpc.rs:819-865 — These 5 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 5 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 5 times.
D4 · Code Duplication· Edited copy of a member (37 corresponding lines) · ×1
Edited copy of a member (37 corresponding lines) crates/test-utils/src/rpc.rs:457— crates/test-utils/src/rpc.rs:457-496 | crates/test-utils/src/rpc.rs:592-628 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (4–21 lines × 5) crates/test-utils/src/rpc.rs:329— crates/test-utils/src/rpc.rs:329-332 | crates/test-utils/src/rpc.rs:540-543 | crates/test-utils/src/rpc.rs:581-584 | crates/test-utils/src/rpc.rs:656-676 | crates/test-utils/src/rpc.rs:842-862 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/test-utils/src/rpc.rs:329` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/test-utils/src/rpc.rs:676` calls `local_addr`, `unwrap` and `crates/test-utils/src/rpc.rs:332` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (17–18 lines × 2) crates/test-utils/src/rpc.rs:476— crates/test-utils/src/rpc.rs:476-493 | crates/test-utils/src/rpc.rs:770-786 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/test-utils/src/rpc.rs:476` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–14 lines × 2) crates/evm/evm/src/executors/fuzz/mod.rs:576— crates/evm/evm/src/executors/fuzz/mod.rs:576-583 | crates/evm/evm/src/executors/fuzz/mod.rs:710-723 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/evm/evm/src/executors/fuzz/mod.rs:576` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) crates/test-utils/src/rpc.rs:311— crates/test-utils/src/rpc.rs:311-322 | crates/test-utils/src/rpc.rs:511-522 | crates/test-utils/src/rpc.rs:560-571 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/test-utils/src/rpc.rs:311` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/test-utils/src/rpc.rs:310` calls `clone` and `crates/test-utils/src/rpc.rs:510` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Sync-over-async blocking crates/anvil/src/config.rs:2152— `setup_fork_db_config_with_replay` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs.
Interpolated log message defeats structured logging crates/verify/src/bytecode.rs:686— `trace!` at line 686 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/verify/src/bytecode.rs:991— `trace!` at line 991 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/verify/src/verify.rs:845— `warn!` at line 845 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/verify/src/etherscan/mod.rs:231— `warn!` at line 231 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/script/src/broadcast.rs:149— `warn!` at line 149 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/script/src/broadcast.rs:332— `debug!` at line 332 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/script/src/broadcast.rs:337— `debug!` at line 337 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/script/src/progress.rs:244— `trace!` at line 244 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/script/src/simulate.rs:759— `trace!` at line 759 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/script/src/verify.rs:209— `warn!` at line 209 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/script/src/verify.rs:432— `trace!` at line 432 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/script/src/verify.rs:585— `trace!` at line 585 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/forge/src/multi_runner.rs:235— `debug!` at line 235 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/forge/src/runner.rs:982— `debug!` at line 982 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/forge/src/runner.rs:1002— `debug!` at line 1002 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/forge/src/cmd/clone.rs:943— `trace!` at line 943 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/forge/src/cmd/clone.rs:954— `trace!` at line 954 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/forge/src/cmd/clone.rs:1087— `trace!` at line 1087 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/forge/src/cmd/fmt.rs:168— `warn!` at line 168 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/forge/src/cmd/lint.rs:83— `warn!` at line 83 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/evm/traces/src/identifier/external.rs:430— `trace!` at line 430 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/evm/traces/src/identifier/external.rs:459— `trace!` at line 459 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/evm/traces/src/identifier/external.rs:469— `trace!` at line 469 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/evm/traces/src/identifier/external.rs:774— `trace!` at line 774 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging crates/evm/traces/src/identifier/local.rs:182— `trace!` at line 182 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Duplicated predicate crates/forge/src/cmd/inspect.rs:65— `!build.compiler.extra_output.is_empty() || !build.compiler.extra_output_files.is_empty()` appears character-identically in 2 files — crates/forge/src/cmd/inspect.rs, crates/forge/src/cmd/selectors.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/evm/symbolic/src/executor/cheatcodes.rs:445— `!matches!(outcome.status, CallStatus::Success) && state.expected_revert.as_ref().is_some_and(ExpectedRevert::repeats_with_reverter)` appears character-identically in 2 files — crates/evm/symbolic/src/executor/cheatcodes.rs, crates/evm/symbolic/src/executor/create.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/forge/src/cmd/exploit.rs:329— `!output.status.success() && output.stdout.is_empty()` appears character-identically in 2 files — crates/forge/src/cmd/exploit.rs, crates/forge/src/cmd/properties.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/evm/symbolic/src/executor/calls.rs:2668— `!self.symbolic_gas() && expr.contains_gasleft()` appears character-identically in 2 files — crates/evm/symbolic/src/executor/calls.rs, crates/evm/symbolic/src/executor/constraints.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/lint/src/sol/high/arbitrary_send_erc20.rs:300— `!var.kind.is_state() || var.is_immutable() || var.is_constant()` appears character-identically in 2 files — crates/lint/src/sol/high/arbitrary_send_erc20.rs, crates/lint/src/sol/high/arbitrary_send_eth.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/evm/core/src/evm/lifecycle.rs:1895— `change.created || change.current.is_none()` appears character-identically in 2 files — crates/evm/core/src/evm/lifecycle.rs, crates/forge/src/result.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/lint/src/sol/high/unprotected_initializer.rs:37— `contract.kind != ContractKind::Contract || contract.linearization_failed()` appears character-identically in 2 files — crates/lint/src/sol/high/unprotected_initializer.rs, crates/lint/src/sol/low/missing_events_arithmetic.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/anvil/src/eth/backend/mem/in_memory_db.rs:109— `delta.original.is_none() || delta.current.is_none()` appears character-identically in 2 files — crates/anvil/src/eth/backend/mem/in_memory_db.rs, crates/anvil/src/eth/backend/mem/state.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/evm/core/src/evm/lifecycle.rs:1364— `evm.state_mut().account(address) && account.exists()` appears character-identically in 2 files — crates/evm/core/src/evm/lifecycle.rs, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/cast/src/cmd/call.rs:577— `frame.error.is_none() && frame.revert_reason.is_none()` appears character-identically in 2 files — crates/cast/src/cmd/call.rs, crates/cast/src/rpc_trace.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/evm/core/src/backend/mod.rs:1643— `parent.header.hash == parent_hash && Some(parent.header.number()) == block.header.number().checked_sub(1)` appears character-identically in 2 files — crates/evm/core/src/backend/mod.rs, crates/evm/core/src/evm/tx.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/anvil/src/eth/api.rs:1304— `self.get_fork() && fork.predates_fork_inclusive(number)` appears character-identically in 2 files — crates/anvil/src/eth/api.rs, crates/anvil/src/eth/backend/mem/mod.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/cast/src/cmd/access_list.rs:73— `self.tx.tempo.is_tempo() || self.tx.tempo.session_id()?.is_some()` appears character-identically in 2 files — crates/cast/src/cmd/access_list.rs, crates/cast/src/cmd/estimate.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/cli/src/utils/cmd.rs:97— `setup_fns.len() == 1 && setup_fns[0].name == "setUp"` appears character-identically in 2 files — crates/cli/src/utils/cmd.rs, crates/forge/src/runner.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/evm/symbolic/src/runtime/expr/bool.rs:331— `then_value == U256::ONE && else_value.is_zero()` appears character-identically in 2 files — crates/evm/symbolic/src/runtime/expr/bool.rs, crates/evm/symbolic/src/runtime/expr/expr.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/evm/symbolic/src/runtime/expr/bool.rs:342— `then_value.is_zero() && else_value == U256::ONE` appears character-identically in 2 files — crates/evm/symbolic/src/runtime/expr/bool.rs, crates/evm/symbolic/src/runtime/expr/expr.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/cast/src/cmd/configurable_key_auth.rs:127— `tx.tempo.sponsor_url.is_none() && !tx.tempo.print_sponsor_hash` appears character-identically in 2 files — crates/cast/src/cmd/configurable_key_auth.rs, crates/cast/src/cmd/wallet/configurable_account.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate crates/lint/src/sol/high/arbitrary_send_erc20.rs:422— `underlying_var(self.gcx, b) && self.is_safe_target(v)` appears character-identically in 2 files — crates/lint/src/sol/high/arbitrary_send_erc20.rs, crates/lint/src/sol/high/arbitrary_send_eth.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.
Silent fallback default on Err crates/anvil/server/src/lib.rs:99— `redact_url_credentials` turns every `Err` into `"[REDACTED_URL]".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/common/src/preprocessor/deps.rs:313— `using_dependency_sources` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/common/src/provider/mod.rs:525— `redact_url` turns every `Err` into `"<redacted>".to_owned()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/common/src/provider/mpp/transport.rs:529— `redacted_url` turns every `Err` into `"<invalid>".to_owned()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/doc/src/markdown.rs:13— `code_regions` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/doc/src/render.rs:792— `fenced_description_regions` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/doc/src/utils.rs:67— `read_deployments` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/evm/symbolic/src/executor/cheatcodes.rs:599— `free_address_write_targets` turns every `Err` into `Ok(Vec::new())` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/evm/symbolic/src/executor/opcodes.rs:314— `guard_fixed_memory_access` turns every `Err` into `true` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/forge/src/mutation/mutators/assignment_mutator.rs:70— `generate_mutants` turns every `Err` into `Ok(vec![])` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/forge/src/mutation/type_analysis.rs:78— `collect_mutation_exclusions` turns every `Err` into `Ok(MutationExclusionsByPath::new())` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err crates/forge/src/mutation/type_analysis.rs:86— `analyze_and_collect` turns every `Err` into `MutationExclusionsByPath::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.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×5
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×2
Orphaned file crates/forge/src/brutalizer/assembly.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 crates/config/src/compilation.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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 4 significant file(s) lose their only recent owner: crates/primitives/src/transaction/base.rs, crates/common/src/transactions/broadcast.rs, crates/anvil/src/server/mod.rs, crates/config/src/resolve.rs. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 3 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (9 single-owned of 566 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 566 of the 731 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (2 file(s)), anonymized user #4 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: crates/evm/symbolic/src/runtime/solver/smt/mod.rs, crates/evm/symbolic/src/runtime/solver/normalize/polynomial.rs, crates/evm/traces/src/erc8021.rs, crates/anvil/core/src/eth/serde_helpers.rs, crates/common/src/external_storage.rs.
No ADRs found crates/solar/Cargo.toml:16— 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/`. ADRs are expected here because `crates/solar/Cargo.toml` makes this repository a deployable product (line 16).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 5 of 36 project(s) overshoot their size bounds, lowering Project Cohesion to 7.2/10. The most over is `crates/anvil` (42315 LoC, 182 module-visible types across 13 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 566 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; 566 of the 731 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: crates/forge/src/brutalizer/assembly.rs, crates/config/src/compilation.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.
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 21/22 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
Outdated: alloy-rlp — `alloy-rlp` is locked at 0.3.16 but 0.3.17 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in crates/anvil/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p alloy-rlp` and commit the updated REDACTED.
Outdated: evmole — `evmole` is locked at 0.9.3 but 0.9.4 is the current stable release on crates.io, and it already satisfies the `"0.9"` requirement declared in crates/cast/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p evmole` and commit the updated REDACTED.
Outdated: flate2 — `flate2` is locked at 1.1.10 but 1.1.11 is the current stable release on crates.io, and it already satisfies the `"1.1"` requirement declared in crates/anvil/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p flate2` and commit the updated REDACTED.
Outdated: globset — `globset` is locked at 0.4.20 but 0.4.21 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in crates/config/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p globset` and commit the updated REDACTED.
Outdated: interprocess — `interprocess` is locked at 2.4.4 but 2.4.8 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in crates/anvil/server/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p interprocess` and commit the updated REDACTED.
Outdated: inturn — `inturn` is locked at 0.2.0 but 0.2.1 is the current stable release on crates.io, and it already satisfies the `"0.2.0"` requirement declared in crates/evm/symbolic/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p inturn` and commit the updated REDACTED.
Outdated: jiff — `jiff` is locked at 0.2.38 but 0.2.43 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in crates/common/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p jiff` and commit the updated REDACTED.
Outdated: proptest — `proptest` is locked at 1.11.0 but 1.12.0 is the current stable release on crates.io, and it already satisfies the `"1.9.0"` requirement declared in crates/cheatcodes/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p proptest` and commit the updated REDACTED.
Outdated: rpassword — `rpassword` is locked at 7.5.4 but 7.5.5 is the current stable release on crates.io, and it already satisfies the `"7"` requirement declared in crates/cast/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rpassword` and commit the updated REDACTED.
Outdated: similar — `similar` is locked at 3.2.0 but 3.2.1 is the current stable release on crates.io, and it already satisfies the `"3"` requirement declared in crates/fmt/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p similar` and commit the updated REDACTED.
Outdated: tokio — `tokio` is locked at 1.53.3 but 1.54.1 is the current stable release on crates.io, and it already satisfies the `"1.53.3"` requirement declared in crates/anvil/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
Outdated: toml — `toml` is locked at 1.1.8+spec-1.1.0 but 1.2.1+spec-1.1.0 is the current stable release on crates.io, and it already satisfies the `"1.1"` requirement declared in crates/cheatcodes/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p toml` and commit the updated REDACTED.
Outdated: toml_edit — `toml_edit` is locked at 0.25.17+spec-1.1.0 but 0.25.19+spec-1.1.0 is the current stable release on crates.io, and it already satisfies the `"0.25"` requirement declared in crates/cheatcodes/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p toml_edit` and commit the updated REDACTED.
Outdated: uuid — `uuid` is locked at 1.28.0 but 1.29.2 is the current stable release on crates.io, and it already satisfies the `"1.19.0"` requirement declared in crates/evm/evm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p uuid` and commit the updated REDACTED.
Off the main sequence: foundry-primitives — foundry-primitives: abstractness 0.00, instability 0.00, distance 1.00 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Off the main sequence: foundry-common — foundry-common: abstractness 0.07, instability 0.09, distance 0.84 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1dae7-80da-7ace-8782-dc161b72bb98 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 3 · Warnings: 1562 · Recommendations: 87 · Info: 16 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 16:32 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.