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

foundry-rs/foundry

Measured 27 October 2026, 05:03 UTC, at code version 0247028

Regression: 1 dimension fell since the last survey

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

CAI score 71out of 100 Strong
CriticalWeakAdequateStrongExemplary
Up 2 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: 324,692 lines of product code in 37 projects, tests not counted · Estimated rebuild effort: about 4.6 person-years · Weakest lens: Maturity, 66

Findings by how serious they are

3 critical 1361 serious 97 minor

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

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
27 October 2026, 05:03 UTC

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

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

66of 66 dimensions measured by tools.
1426of 1461 findings point to an exact file and line, so you can open each one in the code. The other 35 concern the repository as a whole, such as missing documentation.
66dimensions across 7 lenses, read from 324,692 lines of product code in 37 projects.
Chapters

Executive summary

foundry-rs/foundry meets our standard for production, though the project keeps no record of its design decisions. It scores 71 out of 100 and is rated Strong, and all three of its critical findings are security problems.

Maturity, at 66, is the weakest lens and counts most in the score. The best first step is recording design decisions, worth about 4 points. Protecting outgoing calls with timeouts is another step, worth about 2 points. Raising Maturity to 70 would lift the score to about 72.

One known security hole in a package the code depends on can be used by attackers. One password or key is open to anyone who can read the repository, and one pipeline step installs packages that can change without warning. Updating the vulnerable packages, replacing the exposed password or key and pinning what the pipeline installs would close these risks.

The product code is 324,692 lines, about €670,000 to rebuild.

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

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

If Maturity rose from 66 to 70, the lowest score rated Strong, the score would rise from 71 to about 72.

Code composition: what the lines of code are
Product code 64%Tests 36%
New since the last survey: 64 findings

These 64 critical or serious findings weren't in the previous survey, on 13 October 2026.

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

Fixed since the last survey: 29 findings

These 29 critical or serious findings were in the previous survey, on 13 October 2026, and are gone from this one.

  • Cyclomatic Complexity · foundry_evm_symbolic::runtime::expr::bool::visit_unique (cyclomatic 16) crates/evm/symbolic/src/runtime/expr/bool.rs
  • Cognitive Complexity · foundry_evm_coverage::anchors::find_anchor_branch_inner (cognitive 19) crates/evm/coverage/src/anchors.rs
  • Cognitive Complexity · foundry_evm_symbolic::runtime::expr::bool::visit_unique (cognitive 17) crates/evm/symbolic/src/runtime/expr/bool.rs
  • God Classes · FunctionTooLong: foundry_cheatcodes::fs::get_artifact_source crates/cheatcodes/src/fs.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) crates/evm/symbolic/src/executor/calls.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/anvil/src/eth/backend/mem/mod.rs
  • Code Duplication · Duplicated block (14–18 lines × 2) crates/cheatcodes/src/expected_emit.rs
  • Code Duplication · Duplicated block (14–15 lines × 2) crates/evm/symbolic/src/executor/invariant.rs
  • Code Duplication · Duplicated block (7 lines × 2) crates/evm/evm/src/executors/invariant/shrink.rs
  • Code Duplication · Duplicated block (8 lines × 3) crates/evm/symbolic/src/runtime/expr/bool.rs
  • Code Duplication · Duplicated block (9 lines × 2) crates/anvil/src/eth/api.rs
  • Churn × Complexity Hotspots · Hotspot: crates/debugger/src/tui/context.rs crates/debugger/src/tui/context.rs
  • Churn × Complexity Hotspots · Hotspot: crates/script/src/execute.rs crates/script/src/execute.rs
  • Churn × Complexity Hotspots · Repeated repair: crates/common/src/preprocessor/mod.rs crates/common/src/preprocessor/mod.rs
  • Churn × Complexity Hotspots · Repeated repair: crates/linking/src/lib.rs crates/linking/src/lib.rs
  • Churn × Complexity Hotspots · Repeated repair: crates/evm/core/src/utils.rs crates/evm/core/src/utils.rs
  • Churn × Complexity Hotspots · Repeated repair: crates/anvil/src/eth/backend/mem/inspector.rs crates/anvil/src/eth/backend/mem/inspector.rs
  • Churn × Complexity Hotspots · Repeated repair: crates/anvil/src/lib.rs crates/anvil/src/lib.rs
  • Churn × Complexity Hotspots · Repeated repair: crates/common/src/abi.rs crates/common/src/abi.rs
  • Churn × Complexity Hotspots · Repeated repair: crates/evm/coverage/src/lib.rs crates/evm/coverage/src/lib.rs
  • Explicit Debt · TodoComment crates/cast/src/args.rs
  • Explicit Debt · TodoComment crates/cast/src/args.rs
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
  • Change Coupling · Change coupling: mktx.rs ↔ send.rs crates/cast/src/cmd/mktx.rs
  • Change Coupling · Change-coupling hub: estimate.rs → access_list.rs, call.rs, send.rs crates/cast/src/cmd/estimate.rs
  • Change Coupling · Change-coupling hub: tests.rs → erc20.rs, keychain.rs, send.rs, create.rs, broadcast.rs crates/common/src/tempo/tests.rs
  • Change Coupling · Change coupling: batch_mktx.rs ↔ send.rs crates/cast/src/cmd/batch_mktx.rs
  • Supply-chain Provenance & Signing REDACTED
Rebuild cost: about €670,000 · Estimate
Cost to rebuild€220,000 to €1,100,000, for 3,703 to 11,748 hours of work, about 4.6 person-years for 2 to 9 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×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.
SizeLarge: 324,692 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 4 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.
Raises the score by about 4 points · Medium effort · Architecture documentation
3
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.
Raises the score by about 2 points · Medium effort · Outbound HTTP resilience

Diagnosis: what the measurements show together

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

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 4 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 7.1 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 440,977 lines over the last 90 days, which is about 1,788,407 lines a year. At that pace, the extra work comes to an estimated 101.7 to 610.4 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, 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.

arch anvil anvil anvil-core anvil-core anvil->anvil-core foundry-cli foundry-cli anvil->foundry-cli foundry-common foundry-common anvil->foundry-common foundry-config foundry-config anvil->foundry-config foundry-evm foundry-evm anvil->foundry-evm foundry-evm-networks foundry-evm-networks anvil->foundry-evm-networks anvil-core->foundry-common anvil-core->foundry-evm cast cast forge-fmt forge-fmt cast->forge-fmt cast->foundry-cli cast->foundry-common cast->foundry-config foundry-debugger foundry-debugger cast->foundry-debugger cast->foundry-evm cast->foundry-evm-networks chisel chisel chisel->forge-fmt chisel->foundry-cli chisel->foundry-common chisel->foundry-config chisel->foundry-evm chisel->foundry-evm-networks forge forge forge->forge-fmt forge-script forge-script forge->forge-script forge-verify forge-verify forge->forge-verify forge->foundry-cli forge->foundry-common forge->foundry-config forge->foundry-debugger forge->foundry-evm forge->foundry-evm-networks foundry-evm-symbolic foundry-evm-symbolic forge->foundry-evm-symbolic forge-fmt->foundry-common forge-fmt->foundry-config forge-script->forge-verify foundry-cheatcodes foundry-cheatcodes forge-script->foundry-cheatcodes forge-script->foundry-cli forge-script->foundry-common forge-script->foundry-config forge-script->foundry-debugger forge-script->foundry-evm forge-script->foundry-evm-networks forge-verify->foundry-cli forge-verify->foundry-common forge-verify->foundry-config forge-verify->foundry-evm forge-verify->foundry-evm-networks foundry-cheatcodes-spec foundry-cheatcodes-spec foundry-cheatcodes->foundry-cheatcodes-spec foundry-cheatcodes->foundry-common foundry-cheatcodes->foundry-config foundry-evm-core foundry-evm-core foundry-cheatcodes->foundry-evm-core foundry-evm-traces foundry-evm-traces foundry-cheatcodes->foundry-evm-traces foundry-cli->foundry-common foundry-cli->foundry-config foundry-cli->foundry-evm foundry-cli->foundry-evm-networks foundry-common->foundry-config foundry-evm-hardforks foundry-evm-hardforks foundry-config->foundry-evm-hardforks foundry-config->foundry-evm-networks foundry-debugger->foundry-common foundry-debugger->foundry-evm-core foundry-debugger->foundry-evm-traces foundry-evm->foundry-cheatcodes foundry-evm->foundry-common foundry-evm->foundry-config foundry-evm->foundry-evm-core foundry-evm->foundry-evm-hardforks foundry-evm->foundry-evm-networks foundry-evm->foundry-evm-traces foundry-evm-core->foundry-cheatcodes-spec foundry-evm-core->foundry-common foundry-evm-core->foundry-config foundry-evm-core->foundry-evm-hardforks foundry-evm-core->foundry-evm-networks foundry-evm-networks->foundry-evm-hardforks foundry-evm-symbolic->foundry-cheatcodes-spec foundry-evm-symbolic->foundry-common foundry-evm-symbolic->foundry-config foundry-evm-symbolic->foundry-evm foundry-evm-traces->foundry-cheatcodes-spec foundry-evm-traces->foundry-common foundry-evm-traces->foundry-config foundry-evm-traces->foundry-evm-core foundry-evm-traces->foundry-evm-hardforks foundry-evm-traces->foundry-evm-networks __more__ +17 more projects

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.

641 modules, with 1255 dependencies between them. 9 loops run through 115 of the modules, marked above the diagonal.

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 anvil_rpc.request2 foundry_cli.opts.transaction3 foundry_common.contracts4 foundry_config.lint5 foundry_evm_hardforks6 anvil_rpc.response7 cast.rlp_converter8 foundry_cheatcodes.state9 foundry_evm_coverage10 foundry_evm_networks11 foundry_evm_symbolic.runtime.state12 foundry_cheatcodes.inspector13 foundry_config14 foundry_evm_symbolic.runtime.expr.expr15 foundry_evm_traces.decoder16 anvil.eth.backend.mem17 foundry_cli.opts.build.core18 foundry_cli.opts.rpc19 foundry_evm_symbolic.runtime.expr.cx20 foundry_evm_traces21 anvil.eth.backend.db22 cast.tx23 foundry_evm.inspectors.stack24 foundry_evm_core.backend25 foundry_evm_symbolic.runtime.expr.bool26 foundry_evm.executors27 foundry_evm_core.opts28 foundry_evm_symbolic29 forge.result30 foundry_evm.executors.builder31 cast.cmd.call32 forge.runner33 forge.multi_runner34 forge_fmt.state35 forge_lint.sol.med.cheatcode_environment36 anvil.config37 anvil.eth.api38 forge_verify.verify39 forge_script40 forge_verify.bytecode
1 anvil_rpc.request
2 foundry_cli.opts.transaction
3 foundry_common.contracts
4 foundry_config.lint
5 foundry_evm_hardforks
6 anvil_rpc.response2
7 cast.rlp_converter1
8 foundry_cheatcodes.state1
9 foundry_evm_coverage1
10 foundry_evm_networks3
11 foundry_evm_symbolic.runtime.state15137
12 foundry_cheatcodes.inspector1
13 foundry_config1111
14 foundry_evm_symbolic.runtime.expr.expr123
15 foundry_evm_traces.decoder123
16 anvil.eth.backend.mem32134
17 foundry_cli.opts.build.core1
18 foundry_cli.opts.rpc1
19 foundry_evm_symbolic.runtime.expr.cx33
20 foundry_evm_traces11111
21 anvil.eth.backend.db7
22 cast.tx412
23 foundry_evm.inspectors.stack14133
24 foundry_evm_core.backend311
25 foundry_evm_symbolic.runtime.expr.bool21
26 foundry_evm.executors11132
27 foundry_evm_core.opts47211
28 foundry_evm_symbolic7211
29 forge.result121125
30 foundry_evm.executors.builder1111
31 cast.cmd.call11111
32 forge.runner2235195
33 forge.multi_runner21133322221
34 forge_fmt.state11
35 forge_lint.sol.med.cheatcode_environment112
36 anvil.config2312
37 anvil.eth.api121
38 forge_verify.verify231
39 forge_script3113111421
40 forge_verify.bytecode13111111
Uses a module listed above itPart of a loopThe module itself
1 anvil_rpc.request2 foundry_cli.opts.transaction3 foundry_common.contracts4 foundry_config.lint5 foundry_evm_hardforks6 anvil_rpc.response7 cast.rlp_converter8 foundry_cheatcodes.state9 foundry_evm_coverage10 foundry_evm_networks11 foundry_evm_symbolic.runtime.state12 foundry_cheatcodes.inspector13 foundry_config14 foundry_evm_symbolic.runtime.expr.expr15 foundry_evm_traces.decoder16 anvil.eth.backend.mem17 foundry_cli.opts.build.core18 foundry_cli.opts.rpc19 foundry_evm_symbolic.runtime.expr.cx20 foundry_evm_traces21 anvil.eth.backend.db22 cast.tx23 foundry_evm.inspectors.stack24 foundry_evm_core.backend25 foundry_evm_symbolic.runtime.expr.bool26 foundry_evm.executors27 foundry_evm_core.opts28 foundry_evm_symbolic29 forge.result30 foundry_evm.executors.builder31 cast.cmd.call32 forge.runner33 forge.multi_runner34 forge_fmt.state35 forge_lint.sol.med.cheatcode_environment36 anvil.config37 anvil.eth.api38 forge_verify.verify39 forge_script40 forge_verify.bytecodeanvil_rpc.request1foundry_cli.opts.transaction2foundry_common.contracts3foundry_config.lint4foundry_evm_hardforks5anvil_rpc.response6cast.rlp_converter7foundry_cheatcodes.state8foundry_evm_coverage9foundry_evm_networks10foundry_evm_symbolic.runtime.state11foundry_cheatcodes.inspector12foundry_config13foundry_evm_symbolic.runtime.expr.expr14foundry_evm_traces.decoder15anvil.eth.backend.mem16foundry_cli.opts.build.core17foundry_cli.opts.rpc18foundry_evm_symbolic.runtime.expr.cx19foundry_evm_traces20anvil.eth.backend.db21cast.tx22foundry_evm.inspectors.stack23foundry_evm_core.backend24foundry_evm_symbolic.runtime.expr.bool25foundry_evm.executors26foundry_evm_core.opts27foundry_evm_symbolic28forge.result29foundry_evm.executors.builder30cast.cmd.call31forge.runner32forge.multi_runner33forge_fmt.state34forge_lint.sol.med.cheatcode_environment35anvil.config36anvil.eth.api37forge_verify.verify38forge_script39forge_verify.bytecode40211131513711111123123321341133111117412141333112111132472117211121125111111111223519521133322221111122312121231311311142113111111+601 more modules (most-connected shown)

At a glance — Code Health · 75% · Adequate · gated by D2 ·

At a glance — Architecture · 94% · Exemplary ·

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

At a glance — Readiness · 69% · Adequate · gated by P7 ·

At a glance — Security · 88% · Strong ·

At a glance — Event-Driven · 80% · Strong ·

At a glance — Performance · 82% · Strong ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures22High / Critical
A05:2025 — Injection5High / Critical
A07:2025 — Authentication Failures2High / Critical
A02:2025 — Security Misconfiguration1Medium

Roadmap

Begin by addressing the 114 code complexity hotspots, prioritizing mod.rs, runner.rs, and args.rs, while simultaneously resolving the missing architectural decision records by documenting key design choices in the docs/adr folder. Strengthen system stability by enforcing request timeouts and adding retry logic with back-off to all outbound HTTP clients, and conclude by updating the README to clearly explain how to run the test suite.

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

Do thisHelpsEffortDimension
Resolve the 1 No ADRs found finding(s) in ADR Quality.+3.9 ptsLowADR Quality
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+3.8 ptsMediumArchitecture documentation
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.+2.4 ptsMediumOutbound HTTP resilience
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.+2.1 ptsMediumDocumentation (README)
Resolve the 114 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (14), runner.rs (3), args.rs (2).+1.2 ptsHighChurn × Complexity Hotspots
Interpolated log message defeats structured logging+1.2 ptsMediumStructured logging
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.+1.0 ptsMediumObservability
Adopt the transactional outbox pattern so DB writes and message publishes commit atomically — no lost or phantom events on a crash.+0.6 ptsMediumOutbox / dual-write

File quality

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

FileScoreBandWorst signal
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
crates/evm/symbolic/src/runtime/expr/expr.rs5.5MixedCyclomatic Complexity: SymExpr::binop (cyclomatic 78)
crates/fmt/src/state/mod.rs5.5MixedCyclomatic Complexity: State::print_comment (cyclomatic 62)
crates/cast/src/cmd/call.rs5.5MixedCyclomatic Complexity: CallArgs::run_with_network_and_opts (cyclomatic 59)
crates/evm/symbolic/src/runtime/state.rs5.5MixedCyclomatic Complexity: PathState::expr_upper_bound_usize_cached (cyclomatic 31)
crates/anvil/src/config.rs5.5MixedCyclomatic Complexity: NodeConfig::setup_fork_db_config_with_replay (cyclomatic 25)
crates/cast/src/cmd/access_list.rs5.5MixedCode Duplication: Duplicated block (11 lines × 2)
crates/script/src/lib.rs5.5MixedCyclomatic Complexity: ScriptArgs::run_script (cyclomatic 18)
crates/cast/src/cmd/batch_mktx.rs5.6MixedCyclomatic Complexity: BatchMakeTxArgs::run (cyclomatic 16)
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.8MixedDependency Vulnerabilities: Medium advisory (unmaintained): REDACTED
crates/cast/src/cmd/send.rs5.9MixedCyclomatic Complexity: SendTxArgs::run_generic_inner (cyclomatic 36)
crates/cheatcodes/src/inspector.rs6.0MixedExplicit Debt: TodoComment
crates/fmt/src/state/sol.rs6.0MixedExplicit Debt: HackComment
crates/debugger/src/tui/draw.rs6.0MixedExplicit Debt: TodoComment
crates/anvil/src/eth/backend/executor.rs6.0MixedExplicit Debt: TodoComment
crates/chisel/src/executor.rs6.0MixedExplicit Debt: TodoComment
crates/common/src/compile.rs6.0MixedExplicit Debt: TodoComment
crates/evm/evm/src/executors/corpus.rs6.0MixedExplicit Debt: TodoComment
crates/cast/src/cmd/logs.rs6.0MixedExplicit Debt: FixmeComment

How the grades work

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

Critical — 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 — 1361

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 — 97

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

Could not be resolved — 17

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

Methodology & how to trust this report

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

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

What we checked — 66 dimensions across the health lenses
D1D2D3D4D5D6D9D10D12D13D14D15D16D17D19D20D26D28D29D30D31D34D35D36D43D44AX10AX3AX4AX8AX9ED4M1M2M3M4P1P10P2P3P4P6P7PF1PF3X1X12X13X14X15X16X17X18X19X21X22X23X24X25X26X27X28X29X3X30X4

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

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a17bbd-9ee3-731c-afe4-9fe00ccf57cf.

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

Run transparency — what happened this run

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

  • D4 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 196 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 (62,388 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: 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. In the meantime, produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures and real coverage will be read. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then both halves are read on the next scan.
  • D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 10 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 214 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test 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 — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D26 Project Cohesion — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — -------------------- 1 | >>> # syntax=docker/dockerfile:1 2 | 3 | FROM rust:1.98-bookworm@sha256:93ce27a88655056a51dbdd8f5f2d7ddc071c7b0070fb288a37b5a285fc83971e AS chef -------------------- ERROR: failed to solve: failed to resolve source metadata for docker.io/docker/dockerfile:1: failed to do request: Head "https://registry-1.docker.io/v2/docker/dockerfile/manifests/1": Forbidden; runtime evidence skipped.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and 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 — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9). 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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.
  • X4 Structured logging — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 121 further occurrence(s) are not listed individually; the score already reflects all 161.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's 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

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • 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 is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • 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: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

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

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

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

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

233 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was SymbolicExecutor::handle_foundry_cheatcode at 225. A further 20 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. 10 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/forge/src/mutation/mutant.rs (forge::mutation::mutant::deserialize_binop at 21), and 5 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.

State::print_comment (cyclomatic 62) · ×19crates/fmt/src/state/mod.rs:960
Analyzer::analyze_expr (cyclomatic 34) · ×14crates/lint/src/sol/high/reentrancy.rs:619
SymbolicExecutor::handle_foundry_cheatcode (cyclomatic 225) · ×12crates/evm/symbolic/src/executor/cheatcodes.rs:586
forge::args::run_command (cyclomatic 51) · ×11crates/forge/src/args.rs:36
Backend::simulate_raw (cyclomatic 68) · ×10crates/anvil/src/eth/backend/mem/mod.rs:9021

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

What to do

  1. Bring the 4 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with SymbolicExecutor::handle_foundry_cheatcode (cyclomatic 225), cast::args::run_command (cyclomatic 210), 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.2 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity3.7 / 10Weak✓ Tool-verified

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

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

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

393 method(s) exceeded the cognitive complexity threshold of 15; the worst was cast::args::run_command at 208.

State::print_comment (cognitive 160) · ×28crates/fmt/src/state/mod.rs:960
forge::cmd::clone::update_config_by_metadata (cognitive 111) · ×18crates/forge/src/cmd/clone.rs:416
SymbolicExecutor::handle_foundry_cheatcode (cognitive 175) · ×14crates/evm/symbolic/src/executor/cheatcodes.rs:586
Backend::simulate_raw (cognitive 169) · ×14crates/anvil/src/eth/backend/mem/mod.rs:9021
Analyzer::analyze_expr (cognitive 51) · ×14crates/lint/src/sol/high/reentrancy.rs:619

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

What to do

  1. Bring the 10 bodies over 120 down to 120 or less in Cognitive Complexity — start with cast::args::run_command (cognitive 208), FunctionRunner::run_invariant_test (cognitive 199), InvariantExecutor::run_invariant_worker (cognitive 192). — 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 10 together lifts Cognitive Complexity from 3.7 to about 4.6/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God 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.

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

266 god class(es) detected.

FileTooLong: mem/mod.rs · ×86crates/anvil/src/eth/backend/mem/mod.rs
MethodTooLong: SymbolicExecutor.handle_foundry_cheatcode · ×81crates/evm/symbolic/src/executor/cheatcodes.rs:586
ClassTooLong: EthApi · ×38crates/anvil/src/eth/api.rs:151
TooManyMethods: Backend · ×30crates/anvil/src/eth/backend/mem/mod.rs:1094
FunctionTooLong: cast::args::run_command · ×21crates/cast/src/args.rs:132

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

What to do

  1. Resolve the 86 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 (86 warning-level).
  2. Resolve the 81 MethodTooLong finding(s) in God Classes — start with mod.rs (11), runner.rs (10), calls.rs (4). — One of this dimension's main actionable groups (81 warning-level).
  3. Resolve the 38 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 (38 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.7 / 10Stronggated by 202 serious findings✓ Tool-verified

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

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

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

196 duplicated block group(s) detected. A further 6 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 10 of the 202 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.

Duplicated block (6 lines × 2) · ×32crates/anvil/src/eth/api.rs:1148
Duplicated block (8 lines × 2) · ×24crates/anvil/src/eth/api.rs:3496
Duplicated block (9 lines × 2) · ×17crates/anvil/src/eth/api.rs:1822
Duplicated block (5 lines × 2) · ×17crates/anvil/src/eth/api.rs:3100
Duplicated block (10 lines × 2) · ×16crates/anvil/src/eth/backend/mem/mod.rs:4406

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

What to do

  1. Resolve the 32 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with mod.rs (5), expr.rs (5), api.rs (4). — One of this dimension's main actionable groups (32 warning-level).
  2. Resolve the 24 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with api.rs (5), hir_ext.rs (2), expr.rs (2). — One of this dimension's main actionable groups (24 warning-level).
  3. Resolve the 17 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with mod.rs (5), int.rs (2), api.rs. — One of this dimension's main actionable groups (17 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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.

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

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

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

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

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

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

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

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

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

9 of 538 classes have LCOM4 above 3.

Low cohesion: NodeConfig (LCOM4 18) · ×9crates/anvil/src/config.rs:252

What to do

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

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

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

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

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

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

3995 test methods: 2910 unit, 1085 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 10 `it`/`test` case(s) across 2 test file(s) declaring at least one; its tier split is read from package names and paths only. The Rust suite contributes 3985 `#[test]` function(s) across 391 file(s) declaring at least one; its unit/integration split is Cargo's own — 57 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

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.

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

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 214 test source file(s) (.rs) went unread, so its test quality is unmeasured and is not in these counts.

✓ On the Gold path — maintain.

Detailed fixes: d10_recommendation.md.

D12 · Dependency Hygiene9.1 8.8 / 10Strong✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 8.8 / 10 · rule-coverage 97% · ceiling Verified

18 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-hardforks · ×18

What to do

  1. Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 1072 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 92 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.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

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

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

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

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

Top hotspots: crates/anvil/src/eth/api.rs (79×191=15089); crates/anvil/src/eth/backend/mem/mod.rs (165×68=11220); crates/cast/src/args.rs (26×210=5460) Repeated repair below the complexity floor: crates/config/src/lib.rs (20 of 38 changes were fixes); crates/anvil/src/eth/fees.rs (11 of 19 changes were fixes); crates/anvil/src/eth/backend/fork.rs (11 of 18 changes were fixes)

Hotspot: crates/anvil/src/eth/api.rs · ×114crates/anvil/src/eth/api.rs:2154
Repeated repair: crates/config/src/lib.rs · ×35crates/config/src/lib.rs:1513

What to do

  1. Resolve the 114 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (14), runner.rs (3), args.rs (2). — One of this dimension's main actionable groups (114 warning-level).
  2. Resolve the 35 Repeated repair finding(s) in Churn × Complexity Hotspots — start with lib.rs (2), mod.rs (2), fees.rs. — One of this dimension's main actionable groups (35 warning-level).

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

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.

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

12 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is crates/evm/core/src/evm/monad.rs. Counted over 550 of the 722 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

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

✓ On the Gold path — maintain.

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

D17 · Explicit Debt10.0 / 10Stronggated by 49 serious findings✓ Tool-verified

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

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

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

49 deducted task-comment markers across 324692 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.

TodoComment · ×39crates/script-sequence/src/sequence.rs:229
FixmeComment · ×7crates/cast/src/cmd/logs.rs:102
HackComment · ×3crates/script/src/runner.rs:221

What to do

  1. Resolve the 39 TodoComment finding(s) in Explicit Debt — start with lib.rs (3), mod.rs (3), executor.rs (3). — One of this dimension's main actionable groups (39 warning-level).
  2. 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).
  3. 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).
  4. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

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.

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

1 of 1 documentation facets pass in full. 122 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

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

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

No architecture decision records were found.

No ADRs found

What to do

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

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

D26 · Project Cohesion7.2 / 10Strong✓ Tool-verified

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

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

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

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

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

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

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

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

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

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

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

REDACTED
REDACTED

What to do

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

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

D29 · Static Analysis (SAST)6.8 / 10Adequate✓ Tool-verified

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

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

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

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

5 finding(s): 0 critical, 1 high, 4 medium, 0 low. semgrep hit a parse error in 18 file(s) — `.github/scripts/tempo-check.sh` (line 853), `crates/anvil/src/config.rs` (line 2421), `crates/anvil/src/eth/backend/executor.rs` (line 107, line 124, line 343, …), `crates/anvil/src/eth/backend/mem/mod.rs` (line 584, line 587, line 621, …), `crates/cast/src/args.rs` (line 1601), … (+13 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

  1. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 warning-level).
  3. 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.

D30 · Dependency Vulnerabilities5.8 / 10Adequate✓ Tool-verified

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

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

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

20 finding(s): 0 critical, 1 high, 19 medium, 0 low.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. 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).
  2. Resolve the 1 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 7 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (7). — One of this dimension's main actionable groups (7 warning-level).

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

D31 · IaC & Container Security9.9 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

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

REDACTED

What to do

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

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

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

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

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

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

5 of 550 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is crates/evm/traces/src/backtrace/mod.rs. Counted over 550 of the 722 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×5crates/evm/traces/src/backtrace/mod.rs:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

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

D35 · Change Coupling9.3 / 10Stronggated by 24 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: mktx.rs↔send.rs 84%; access_list.rs↔call.rs 73%; eth.rs↔tempo.rs 73%

Change coupling: access_list.rs ↔ call.rs · ×21crates/cast/src/cmd/access_list.rs:1
Change-coupling hub: send.rs → access_list.rs, batch_mktx.rs, estimate.rs, mktx.rs, tests.rs · ×3crates/cast/src/cmd/send.rs

What to do

  1. Resolve the 21 Change coupling finding(s) in Change Coupling — start with mod.rs (3), access_list.rs (2), eth.rs (2). — One of this dimension's main actionable groups (21 warning-level).
  2. Resolve the 3 Change-coupling hub finding(s) in Change Coupling — start with send.rs, mod.rs, tests.rs. — One of this dimension's main actionable groups (3 warning-level).

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

D36 · Supply-chain Provenance & Signing10.0 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

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

Build pipeline generates provenance, signs artifacts and produces an SBOM.

REDACTED
REDACTED

What to do

  1. 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).
  2. 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.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

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.

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

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.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition9.3 / 10Exemplary✓ Tool-verified

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

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

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

What to do

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

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

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

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

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

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

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.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

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.

ED4 · Outbox / dual-write8.0 / 10Strong✓ Tool-verified

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.
M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

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

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 27 of 40 project(s) that lack one — worth up to 1.4 pts.
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

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

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

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

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

P2 · Observability6.9 / 10Adequate✓ Tool-verified

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

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

  • 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.
  • Consider OpenTelemetry tracing/metrics (opentelemetry with tracing-opentelemetry) and a health-check endpoint (a /health route on your axum/actix router) for operability.
P3 · Security & performance tooling9.0 / 10Exemplary✓ Tool-verified

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

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

What to do

  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

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

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

P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

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:277
  • `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. — crates/forge/src/cmd/clone.rs:806

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.
PF1 · Benchmark discipline8.0 / 10Strong✓ Tool-verified

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.

PF3 · Async & latency hygiene8.5 / 10Strong✓ Tool-verified

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

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

  • `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:2061

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`.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

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

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

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

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

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

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

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

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

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

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

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

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

X3 · Exception handling10.0 / 10Exemplary○ Nothing flagged

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

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

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.

X4 · Structured logging4.7 / 10Weak✓ Tool-verified

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 707 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:707
  • `trace!` at line 998 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:998
  • `trace!` at line 1039 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:1039
  • `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 199 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:199
  • `warn!` at line 135 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:135
  • `debug!` at line 309 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:309
  • `debug!` at line 314 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:314
  • `trace!` at line 223 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:223
  • `trace!` at line 708 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:708
  • `warn!` at line 196 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:196
  • `trace!` at line 425 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:425
  • `trace!` at line 553 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:553
  • `debug!` at line 234 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:234
  • `debug!` at line 956 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:956
  • `debug!` at line 976 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:976
  • `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 166 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:166
  • `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 431 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:431
  • `trace!` at line 460 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:460
  • `trace!` at line 470 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:470
  • `trace!` 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: `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:775
  • `trace!` at line 154 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:154
  • `warn!` at line 108 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:108
  • `debug!` at line 279 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:279
  • `warn!` at line 285 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:285
  • `debug!` at line 289 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:289
  • `debug!` at line 295 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:295
  • `debug!` at line 520 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:520
  • `warn!` at line 721 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:721
  • `debug!` at line 746 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:746
  • `trace!` at line 1024 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:1024
  • `debug!` at line 1094 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:1094
  • `trace!` at line 1096 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:1096
  • `warn!` at line 1355 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:1355
  • `debug!` at line 1362 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:1362
  • `warn!` at line 1368 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:1368

What to do

  • Interpolated log message defeats structured logging

Reference — by lens

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

LensScoreRatingImpact
Code Health75%Adequate — gated by D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture94%ExemplaryStrongest area.
Maturity66%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness69%Adequate — gated by P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security88%StrongSolid.
Event-Driven80%StrongSolid.
Performance82%StrongSolid.
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 — 12 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 — 50 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: 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) — -------------------- 1 | >>> # syntax=docker/dockerfile:1 2 | 3 | FROM rust:1.98-bookworm@sha256:93ce27a88655056a51dbdd8f5f2d7ddc071c7b0070fb288a37b5a285fc83971e AS chef -------------------- ERROR: failed to solve: failed to resolve source metadata for docker.io/docker/dockerfile:1: failed to do request: Head "https://registry-1.docker.io/v2/docker/dockerfile/manifests/1": Forbidden; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: 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 — Naming consistency is measured on C# only; JavaScript, Python, Rust, TypeScript not measured.
  • 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+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .py, .rs, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — polyglot repository, one half has no runner
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (124 value object(s))
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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 applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb.
  • 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.
  • 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.
  • 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.

Critical — 3 finding(s)
D28 · Secrets (history) · High secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×1
  • REDACTED
Serious — 1361 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×114
  • Hotspot: crates/anvil/src/eth/api.rs crates/anvil/src/eth/api.rs:2154 — crates/anvil/src/eth/api.rs changed 79 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 191 in EthApi::execute at line 2154. 52 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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:9021 — crates/anvil/src/eth/backend/mem/mod.rs changed 165 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in Backend::simulate_raw at line 9021. 85 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/cast/src/args.rs crates/cast/src/args.rs:132 — crates/cast/src/args.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 210 in cast::args::run_command at line 132. 7 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/cheatcodes.rs crates/evm/symbolic/src/executor/cheatcodes.rs:586 — crates/evm/symbolic/src/executor/cheatcodes.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 225 in SymbolicExecutor::handle_foundry_cheatcode at line 586. 11 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/forge/src/runner.rs crates/forge/src/runner.rs:3802 — crates/forge/src/runner.rs changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 101 in FunctionRunner::run_invariant_test at line 3802. 16 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/cheatcodes/src/inspector.rs crates/cheatcodes/src/inspector.rs:1238 — crates/cheatcodes/src/inspector.rs changed 69 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in Cheatcodes::call_with_executor at line 1238. 30 of those changes were fix/bug commits, and the other 39 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/evm/symbolic/src/executor/opcodes.rs crates/evm/symbolic/src/executor/opcodes.rs:448 — crates/evm/symbolic/src/executor/opcodes.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 155 in SymbolicExecutor::step at line 448. 8 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/evm/evm/src/executors/invariant/mod.rs crates/evm/evm/src/executors/invariant/mod.rs:1084 — crates/evm/evm/src/executors/invariant/mod.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in InvariantExecutor::run_invariant_worker at line 1084. 10 of those changes were fix/bug commits, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/cheatcodes/src/evm.rs crates/cheatcodes/src/evm.rs:2261 — crates/cheatcodes/src/evm.rs changed 50 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in foundry_cheatcodes::evm::get_recorded_state_diffs at line 2261. 18 of those changes were fix/bug commits, and the other 32 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/script/src/broadcast.rs crates/script/src/broadcast.rs:665 — crates/script/src/broadcast.rs changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in BundledState::broadcast at line 665. 16 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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: crates/cast/src/cmd/call.rs crates/cast/src/cmd/call.rs:403 — crates/cast/src/cmd/call.rs changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in CallArgs::run_with_network_and_opts at line 403. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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: REDACTED REDACTED:1761 — REDACTED changed 54 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in InspectorStackRefMut::call at line 1761. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/verify/src/bytecode.rs crates/verify/src/bytecode.rs:330 — crates/verify/src/bytecode.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in VerifyBytecodeArgs::prepare_runtime_verification at line 330. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/evm/symbolic/src/runtime/expr/expr.rs crates/evm/symbolic/src/runtime/expr/expr.rs:425 — crates/evm/symbolic/src/runtime/expr/expr.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in SymExpr::binop at line 425. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/evm/symbolic/src/executor/calls.rs crates/evm/symbolic/src/executor/calls.rs:677 — crates/evm/symbolic/src/executor/calls.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in SymbolicExecutor::call_concrete_target at line 677. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/anvil/src/config.rs crates/anvil/src/config.rs:2061 — crates/anvil/src/config.rs changed 46 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in NodeConfig::setup_fork_db_config_with_replay at line 2061. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/evm/evm/src/executors/mod.rs crates/evm/evm/src/executors/mod.rs:191 — crates/evm/evm/src/executors/mod.rs changed 49 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in Executor::transact_with_monad_block_replay at line 191. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/evm/evm/src/executors/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/cast/src/cmd/wallet/mod.rs crates/cast/src/cmd/wallet/mod.rs:386 — crates/cast/src/cmd/wallet/mod.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in WalletSubcommands::run at line 386. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/symbolic/src/runtime/state.rs crates/evm/symbolic/src/runtime/state.rs:348 — crates/evm/symbolic/src/runtime/state.rs changed 30 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 348. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/core/src/backend/mod.rs crates/evm/core/src/backend/mod.rs:1784 — crates/evm/core/src/backend/mod.rs changed 53 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in Backend::replay_until at line 1784. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/evm/core/src/backend/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/evm/src/executors/fuzz/mod.rs crates/evm/evm/src/executors/fuzz/mod.rs:691 — crates/evm/evm/src/executors/fuzz/mod.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in FuzzedExecutor::run_worker at line 691. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/evm/evm/src/executors/fuzz/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/fmt/src/state/mod.rs crates/fmt/src/state/mod.rs:960 — crates/fmt/src/state/mod.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in State::print_comment at line 960. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/traces/src/decoder/mod.rs crates/evm/traces/src/decoder/mod.rs:1254 — crates/evm/traces/src/decoder/mod.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in CallTraceDecoder::decode_cheatcode_inputs at line 1254. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/fmt/src/state/sol.rs crates/fmt/src/state/sol.rs:1395 — crates/fmt/src/state/sol.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in State::print_expr at line 1395. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/anvil/src/eth/error/mod.rs crates/anvil/src/eth/error/mod.rs:489 — crates/anvil/src/eth/error/mod.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in anvil::eth::error::blockchain_error_to_rpc_result at line 489. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/anvil/src/eth/error/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.
  • + 89 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×86
  • FileTooLong: mem/mod.rs crates/anvil/src/eth/backend/mem/mod.rs — FileTooLong — 7531 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 7031 over it, 15.06× 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 — 4300 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, 1178-5363), declaring 44 free functions. The bar is 500 significant lines; this is 3800 over it, 8.60× 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 — 3496 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: EthApi (7 blocks, 151-5660). The bar is 500 significant lines; this is 2996 over it, 6.99× 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: state/sol.rs crates/fmt/src/state/sol.rs — FileTooLong — 2295 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 1795 over it, 4.59× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: cmd/keychain.rs crates/cast/src/cmd/keychain.rs — FileTooLong — 2252 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 70 free functions. The bar is 500 significant lines; this is 1752 over it, 4.50× 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 — 2226 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 80% of them inside a single declaration: Cheatcodes (6 blocks, 600-3643). The bar is 500 significant lines; this is 1726 over it, 4.45× 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: backend/mod.rs crates/evm/core/src/backend/mod.rs — FileTooLong — 2158 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 67% of them inside a single declaration: Backend (8 blocks, 624-2845). The bar is 500 significant lines; this is 1658 over it, 4.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: executor/cheatcodes.rs crates/evm/symbolic/src/executor/cheatcodes.rs — FileTooLong — 2060 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 100% of them inside a single declaration: SymbolicExecutor (8-2450). The bar is 500 significant lines; this is 1560 over it, 4.12× 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 — 1809 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 1309 over it, 3.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: src/config.rs crates/anvil/src/config.rs — FileTooLong — 1776 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 80% of them inside a single declaration: NodeConfig (5 blocks, 252-2456). The bar is 500 significant lines; this is 1276 over it, 3.55× 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 — 1743 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-3207). The bar is 500 significant lines; this is 1243 over it, 3.49× 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: expr/expr.rs crates/evm/symbolic/src/runtime/expr/expr.rs — FileTooLong — 1649 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, 9-2038). The bar is 500 significant lines; this is 1149 over it, 3.30× 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 — 1609 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 64% of them inside a single declaration: InvariantExecutor (2 blocks, 806-2265). The bar is 500 significant lines; this is 1109 over it, 3.22× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/evm.rs crates/cheatcodes/src/evm.rs — FileTooLong — 1608 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 34 free functions. The bar is 500 significant lines; this is 1108 over it, 3.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1515 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 1015 over it, 3.03× 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 — 1490 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 89% of them inside a single declaration: SymbolicExecutor (3-1681). The bar is 500 significant lines; this is 990 over it, 2.98× 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: high/reentrancy.rs crates/lint/src/sol/high/reentrancy.rs — FileTooLong — 1404 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: Analyzer (2 blocks, 330-1529), declaring 33 free functions. The bar is 500 significant lines; this is 904 over it, 2.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: normalize/mod.rs crates/evm/symbolic/src/runtime/solver/normalize/mod.rs — FileTooLong — 1400 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 900 over it, 2.80× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/broadcast.rs crates/script/src/broadcast.rs — FileTooLong — 1347 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 63% of them inside a single declaration: BundledState (3 blocks, 603-1805). The bar is 500 significant lines; this is 847 over it, 2.69× 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 — 1261 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 761 over it, 2.52× 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: executors/corpus.rs crates/evm/evm/src/executors/corpus.rs — FileTooLong — 1259 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 759 over it, 2.52× 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 — 1259 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 759 over it, 2.52× 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 — 1246 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 746 over it, 2.49× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: executors/mod.rs crates/evm/evm/src/executors/mod.rs — FileTooLong — 1236 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 60% of them inside a single declaration: Executor (3 blocks, 131-1288). The bar is 500 significant lines; this is 736 over it, 2.47× 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: decoder/mod.rs crates/evm/traces/src/decoder/mod.rs — FileTooLong — 1216 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 85% of them inside a single declaration: CallTraceDecoder (2 blocks, 241-1824). The bar is 500 significant lines; this is 716 over it, 2.43× 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.
  • + 61 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×81
  • MethodTooLong: SymbolicExecutor.handle_foundry_cheatcode crates/evm/symbolic/src/executor/cheatcodes.rs:586 — MethodTooLong — handle_foundry_cheatcode runs 1475 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 1375 over it, 14.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FunctionRunner.run_invariant_test crates/forge/src/runner.rs:3802 — MethodTooLong — run_invariant_test runs 886 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 786 over it, 8.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.
  • MethodTooLong: SymbolicExecutor.step crates/evm/symbolic/src/executor/opcodes.rs:448 — MethodTooLong — step runs 754 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 654 over it, 7.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: InvariantExecutor.run_invariant_worker crates/evm/evm/src/executors/invariant/mod.rs:1084 — MethodTooLong — run_invariant_worker runs 456 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 356 over it, 4.56× 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:386 — MethodTooLong — run runs 393 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 293 over it, 3.93× 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:665 — MethodTooLong — broadcast runs 386 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 286 over it, 3.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.
  • MethodTooLong: EthApi.execute crates/anvil/src/eth/api.rs:2154 — MethodTooLong — execute runs 365 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 265 over it, 3.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: VerifyBytecodeArgs.prepare_runtime_verification crates/verify/src/bytecode.rs:330 — MethodTooLong — prepare_runtime_verification runs 365 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 265 over it, 3.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BundledState.broadcast_batch crates/script/src/broadcast.rs:1265 — MethodTooLong — broadcast_batch runs 319 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 219 over it, 3.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SymbolicExecutor.call_concrete_target crates/evm/symbolic/src/executor/calls.rs:677 — MethodTooLong — call_concrete_target runs 315 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 215 over it, 3.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CallArgs.run_with_network_and_opts crates/cast/src/cmd/call.rs:403 — MethodTooLong — run_with_network_and_opts runs 280 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 180 over it, 2.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Cheatcodes.call_with_executor crates/cheatcodes/src/inspector.rs:1238 — MethodTooLong — call_with_executor runs 279 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 179 over it, 2.79× 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:3267 — MethodTooLong — try_seed_invariant_corpus_from_frontiers runs 253 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 153 over it, 2.53× 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:2061 — MethodTooLong — setup_fork_db_config_with_replay 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: FunctionRunner.replay_symbolic_artifact crates/forge/src/runner.rs:2648 — MethodTooLong — replay_symbolic_artifact runs 242 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 142 over it, 2.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CreateArgs.deploy crates/forge/src/cmd/create.rs:445 — MethodTooLong — deploy runs 220 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 120 over it, 2.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ContractRunner.run_tests crates/forge/src/runner.rs:835 — 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: SendTxArgs.run_generic_inner crates/cast/src/cmd/send.rs:193 — MethodTooLong — run_generic_inner runs 205 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 105 over it, 2.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.
  • MethodTooLong: SymbolicExecutor.call crates/evm/symbolic/src/executor/calls.rs:4 — MethodTooLong — call 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.
  • MethodTooLong: FmtArgs.run crates/forge/src/cmd/fmt.rs:60 — MethodTooLong — run runs 182 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 82 over it, 1.82× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: InvariantExecutor.invariant_fuzz crates/evm/evm/src/executors/invariant/mod.rs:874 — MethodTooLong — invariant_fuzz runs 176 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 76 over it, 1.76× 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: Checker.expr_inner crates/lint/src/sol/med/cheatcode_environment.rs:716 — MethodTooLong — expr_inner runs 173 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SymExpr.binop crates/evm/symbolic/src/runtime/expr/expr.rs:425 — MethodTooLong — binop runs 164 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SymbolicExecutor.run_inner crates/evm/symbolic/src/executor/run.rs:356 — MethodTooLong — run_inner runs 158 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 58 over it, 1.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.
  • + 56 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×39
  • TodoComment crates/script-sequence/src/sequence.rs:229 — // 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:41 — // 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:507 — // 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:1117 — // 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/inspector.rs:183 — // TODO: disabled for now since it's flooding the dictionary — 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/lib.rs:24 — // TODO: We should probably remove these, but it's a pretty big breaking change. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:94 — // TODO(celo-execution-owner): Replace this residual with concrete Celo precompile — 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:111 — // 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:1636 — // 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:257 — /// 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:990 — // 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/evm/core/src/fork/database.rs:79 — // TODO need to find a way to update generic provider via url — 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/backend/mod.rs:626 — // TODO(monad-fen-lifecycle): Remove this after complete select/roll/transact slices move Monad — 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/debugger/src/tui/draw.rs:722 — // TODO: technically it's possible for this to conflict with the current op, ie, with — 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:2166 — // 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:14 — // 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:272 — // 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:943 — // 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.
  • + 14 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×38
  • ClassTooLong: EthApi crates/anvil/src/eth/api.rs:151 — ClassTooLong — 3227 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 253 methods, 7 blocks, lines 151-5660. The bar is 400 significant lines; this is 2827 over it, 8.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FunctionRunner crates/forge/src/runner.rs:1178 — ClassTooLong — 3066 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 51 methods, 3 blocks, lines 1178-5363. The bar is 400 significant lines; this is 2666 over it, 7.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: Cheatcodes crates/cheatcodes/src/inspector.rs:600 — ClassTooLong — 1772 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 76 methods, 6 blocks, lines 600-3643. The bar is 400 significant lines; this is 1372 over it, 4.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Backend crates/evm/core/src/backend/mod.rs:624 — ClassTooLong — 1451 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 65 methods, 8 blocks, lines 624-2845. The bar is 400 significant lines; this is 1051 over it, 3.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NodeConfig crates/anvil/src/config.rs:252 — ClassTooLong — 1424 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 117 methods, 5 blocks, lines 252-2456. The bar is 400 significant lines; this is 1024 over it, 3.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: Config crates/config/src/lib.rs:196 — ClassTooLong — 1373 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 109 methods, 4 blocks, lines 196-3207. The bar is 400 significant lines; this is 973 over it, 3.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SymExpr crates/evm/symbolic/src/runtime/expr/expr.rs:297 — ClassTooLong — 1206 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 109 methods, 4 blocks, lines 9-2038. The bar is 400 significant lines; this is 806 over it, 3.02× 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:806 — ClassTooLong — 1031 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 806-2265. The bar is 400 significant lines; this is 631 over it, 2.58× 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:241 — ClassTooLong — 1030 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 51 methods, 2 blocks, lines 241-1824. The bar is 400 significant lines; this is 630 over it, 2.58× 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 — 868 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, 2 blocks, lines 330-1529. The bar is 400 significant lines; this is 468 over it, 2.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.
  • ClassTooLong: BundledState crates/script/src/broadcast.rs:603 — ClassTooLong — 843 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 603-1805. The bar is 400 significant lines; this is 443 over it, 2.11× 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:488 — ClassTooLong — 804 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 59 methods, 3 blocks, lines 488-2119. The bar is 400 significant lines; this is 404 over it, 2.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Linker crates/linking/src/lib.rs:41 — 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 41-1086. 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: Executor crates/evm/evm/src/executors/mod.rs:131 — ClassTooLong — 737 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 131-1288. The bar is 400 significant lines; this is 337 over it, 1.84× 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:7 — ClassTooLong — 717 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 56 methods, 4 blocks, lines 7-1464. The bar is 400 significant lines; this is 317 over it, 1.79× 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:44 — ClassTooLong — 686 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 44-1260. The bar is 400 significant lines; this is 286 over it, 1.72× 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: TUIContext crates/debugger/src/tui/context.rs:108 — ClassTooLong — 653 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 77 methods, 4 blocks, lines 108-1108. The bar is 400 significant lines; this is 253 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: WorkerCorpus crates/evm/evm/src/executors/corpus.rs:647 — ClassTooLong — 623 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 25 methods, 2 blocks, lines 647-1765. The bar is 400 significant lines; this is 223 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: SymMemory crates/evm/symbolic/src/runtime/memory.rs:46 — ClassTooLong — 607 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 46 methods, 2 blocks, lines 46-891. The bar is 400 significant lines; this is 207 over it, 1.52× 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: VerifyBytecodeArgs crates/verify/src/bytecode.rs:76 — ClassTooLong — 535 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 8 methods, 3 blocks, lines 76-881. The bar is 400 significant lines; this is 135 over it, 1.34× 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:1600 — ClassTooLong — 532 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 44 methods, 3 blocks, lines 1600-2330. The bar is 400 significant lines; this is 132 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.
  • ClassTooLong: WalletSubcommands crates/cast/src/cmd/wallet/mod.rs:46 — ClassTooLong — 532 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 46-911. The bar is 400 significant lines; this is 132 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.
  • ClassTooLong: Git crates/cli/src/utils/mod.rs:372 — ClassTooLong — 530 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 64 methods, 2 blocks, lines 372-1153. The bar is 400 significant lines; this is 130 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.
  • ClassTooLong: ClientFork crates/anvil/src/eth/backend/fork.rs:106 — ClassTooLong — 522 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 70 methods, 3 blocks, lines 106-893. The bar is 400 significant lines; this is 122 over it, 1.31× 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.
  • + 13 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Repeated repair · ×35
  • Repeated repair: crates/config/src/lib.rs crates/config/src/lib.rs:1513 — crates/config/src/lib.rs changed 38 times in last 90 days and 20 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 Config::cleanup at line 1513), 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: “Revert "feat(script): use endpoint profiles on forks" (#17774)”; “fix(forge): ignore orphaned artifacts in bind (#17556)”; “fix(config): limit absolute remapping aliases (#17507)”; “fix(config): honor the selected project root (#17469)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/config/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/fees.rs crates/anvil/src/eth/fees.rs:739 — crates/anvil/src/eth/fees.rs changed 19 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 5 (its worst body is FeeDetails::new at line 739), 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/anvil/src/eth/backend/fork.rs crates/anvil/src/eth/backend/fork.rs:995 — 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 995), 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): use source hardfork for fork blob params (#17756)”; “fix(anvil): avoid nested fork storage read locks (#17704)”; “fix(anvil): report unknown trace blocks and transactions (#17306)”; “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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/chisel/src/session.rs crates/chisel/src/session.rs:146 — crates/chisel/src/session.rs changed 12 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), 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/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), 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/forge/src/mutation/mod.rs crates/forge/src/mutation/mod.rs:384 — crates/forge/src/mutation/mod.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 6 (its worst body is MutationHandler::cache_file_path at line 384), 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): make mutant paths project-root-relative (#17457)”; “fix(forge): make mutation results independent of worker count (#17423)”; “fix(mutation): filter non-lvalue increments (#16051)”; “fix(mutation): filter invalid assignments (#16050)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/forge/src/mutation/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/chisel/src/source.rs crates/chisel/src/source.rs:131 — crates/chisel/src/source.rs changed 11 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 9 (its worst body is GeneratedOutputRef::final_pc at line 131), 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): match the exact REPL source path (#17529)”; “fix(chisel): ignore user run overloads (#17468)”; “fix(chisel): keep credentials out of session cache (#17143)”; “fix: revert automatic foundry.lock enforcement (#16863)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/chisel/src/source.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/tempo.rs crates/cast/src/tempo.rs:248 — crates/cast/src/tempo.rs changed 10 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 cast::tempo::resolve_transaction_network_and_signer at line 248), 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): resolve fee tokens on local Tempo nodes (#17327)”; “fix(cast): validate Tempo batch sender (#17258)”; “fix(tempo): align expiring nonce limits with T11 (#17244)”; “fix(tempo): bump dependencies for T14 (#17076)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/cast/src/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/evm/symbolic/src/runtime/memory.rs crates/evm/symbolic/src/runtime/memory.rs:505 — crates/evm/symbolic/src/runtime/memory.rs changed 9 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 14 (its worst body is SymMemory::byte_dynamic_with_delta_and_bounds at line 505), 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(cheatcodes): reset delegated EOA nonces to 0 (#17686)”; “fix(symbolic): prove memory-backed arrays (#16747)”; “fix(symbolic): ignore bool invariant return values, matching concrete runner (#16758)”; “fix(symbolic): find writes beyond materialized_size in dynamic memory reads (#16655)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/forge/src/coverage.rs crates/forge/src/coverage.rs:130 — crates/forge/src/coverage.rs changed 9 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 13 (its worst body is LcovReporter::report at line 130), 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: “chore: fix nightly clippy (#17273)”; “fix(coverage): anchor lines before branch bodies (#16836)”; “fix(coverage): track both Yul branch outcomes (#16835)”; “fix(coverage): report file-level (free) functions (#16098)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/forge/src/coverage.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/wallet/vanity.rs crates/cast/src/cmd/wallet/vanity.rs:169 — crates/cast/src/cmd/wallet/vanity.rs changed 9 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 9 (its worst body is cast::cmd::wallet::vanity::parse_pattern at line 169), 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): reject impossible to match vanity addresses (#16230)”; “fix(cast): secure vanity wallet permissions (#16163)”; “fix(cast): accept 0x-prefixed vanity patterns (#15994)”; “fix(cast): handle odd-length vanity hex (#15997)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/cast/src/cmd/wallet/vanity.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/analysis.rs crates/evm/coverage/src/analysis.rs:322 — crates/evm/coverage/src/analysis.rs changed 8 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 13 (its worst body is SourceVisitor::visit_stmt at line 322), 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): track nested ternary branches (#16828)”; “fix(coverage): anchor lines before branch bodies (#16836)”; “fix(coverage): track both Yul branch outcomes (#16835)”; “fix(coverage): report file-level (free) functions (#16098)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/evm/coverage/src/analysis.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/access_list.rs crates/cast/src/cmd/access_list.rs:86 — crates/cast/src/cmd/access_list.rs changed 8 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 8 (its worst body is AccessListArgs::run_with_network at line 86), 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): use --from without unlocking wallet (#17404)”; “fix(cast): warn on failed access-list execution (#17210)”; “fix(cast,script): resolve transaction networks more consistently (#16790)”; “fix(cast): confirm EIP-7702 auth disclosure (#16111)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/cast/src/cmd/access_list.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/miner.rs crates/anvil/src/eth/miner.rs:289 — crates/anvil/src/eth/miner.rs changed 7 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 8 (its worst body is MiningMode::poll at line 289), 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 immediate automining (#17578)”; “fix(anvil): make tx coalescing configurable (#17448)”; “fix(anvil): retry ready txs left by full blocks (#17266)”; “fix(anvil): make mining finalization atomic (#16027)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/anvil/src/eth/miner.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:249 — crates/anvil/src/eth/pool/mod.rs changed 7 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 6 (its worst body is Pool::on_mined_block at line 249), 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): retry ready txs left by full blocks (#17266)”; “fix(anvil): order Tempo nonce lanes (#17139)”; “fix(anvil): restore txpool on snapshot revert (#17044)”; “fix(anvil): drop queued nonce dependents (#17028)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/common/src/preprocessor/data.rs crates/common/src/preprocessor/data.rs:218 — crates/common/src/preprocessor/data.rs changed 6 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 6 (its worst body is foundry_common::preprocessor::data::solidity_string_content at line 218), 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(common): preserve helper ABI coder v2 (#17591)”; “fix(forge): stabilize test linking helpers (#17576)”; “fix(forge): skip deploy helpers in removed source warning (#17172)”; “fix(forge): invalidate native dependencies (#16908)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/backend/mem/fork_db.rs crates/anvil/src/eth/backend/mem/fork_db.rs:57 — crates/anvil/src/eth/backend/mem/fork_db.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 2 (its worst body is ForkedDatabase::dump_state at line 57), 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 fork fallback in loaded history (#17762)”; “fix(anvil): rewind Monad profile on rollback (#16810)”; “fix(evm): preserve exact fork ancestry (#16131)”; “fix(anvil): canonicalize `eth_simulateV1` state roots (#15934)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/anvil/src/eth/backend/mem/fork_db.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/mutation/visitor.rs crates/forge/src/mutation/visitor.rs:90 — crates/forge/src/mutation/visitor.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 7 (its worst body is MutantVisitor::collect_mutations at line 90), 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(mutation): filter invalid assignments (#16050)”; “fix(mutation): prune invalid comparisons (#15971)”; “fix(mutation): filter unsigned negation (#15962)”; “fix(mutation): prune equivalent bounds (#15942)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/forge/src/mutation/visitor.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/runtime_transport.rs crates/common/src/provider/runtime_transport.rs:205 — crates/common/src/provider/runtime_transport.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 7 (its worst body is RuntimeTransport::reqwest_headers at line 205), 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): isolate fork RPC connections (#17598)”; “fix(provider): preserve WebSocket JWT errors (#17583)”; “fix(anvil): redact fork credentials (#16223)”; “fix(ci): run MPP checks on Moderato (#15974)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/common/src/provider/runtime_transport.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/time.rs crates/anvil/src/eth/backend/time.rs:215 — crates/anvil/src/eth/backend/time.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 TimeManager::compute_next_timestamp at line 215), 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): restore next timestamp on revert (#17065)”; “fix(anvil): restore snapshot time offset (#16540)”; “fix(anvil): make mining finalization atomic (#16027)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/anvil/src/eth/backend/time.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), 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/coverage/src/anchors.rs crates/evm/coverage/src/anchors.rs:43 — crates/evm/coverage/src/anchors.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 7 (its worst body is foundry_evm_coverage::anchors::find_anchors at line 43), 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): track nested ternary branches (#16828)”; “fix(coverage): anchor lines before branch bodies (#16836)”; “fix(coverage): track both Yul branch outcomes (#16835)”; “chore: fix nightly clippy (#16348)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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/cast/src/cmd/estimate.rs crates/cast/src/cmd/estimate.rs:110 — crates/cast/src/cmd/estimate.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 7 (its worst body is EstimateArgs::run_with_network at line 110), 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): use --from without unlocking wallet (#17404)”; “fix(cast,script): resolve transaction networks more consistently (#16790)”; “fix(cast): confirm EIP-7702 auth disclosure (#16111)”; “fix(cast): complete browser wallet restoration (#16015)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01:00' --full-history --no-merges -- crates/cast/src/cmd/estimate.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 4 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), 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)”; “fix(anvil): make mining finalization atomic (#16027)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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.
  • Repeated repair: crates/config/src/providers/ext.rs crates/config/src/providers/ext.rs:86 — crates/config/src/providers/ext.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 13 (its worst body is TomlFileProvider::read at line 86), 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): respect project selection in --fix (#17667)”; “fix(config): honor the selected project root (#17469)”; “fix(config): scope compiler overrides to profiles (#17454)”; “fix(config): preserve custom source defaults (#16141)”. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 00:07:35 +01:00' --until='2026-10-27 00:07:35 +01: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.
  • + 10 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×32
  • Duplicated block (6 lines × 2) crates/anvil/src/eth/api.rs:1148 — crates/anvil/src/eth/api.rs:1148-1153 | crates/anvil/src/eth/api.rs:3043-3048 — both copies are in the same file, so extract the 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/api.rs:2886 — crates/anvil/src/eth/api.rs:2886-2891 | crates/anvil/src/eth/api.rs:2958-2963 — both copies are in the same file, so extract the 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/api.rs:5017 — crates/anvil/src/eth/api.rs:5017-5023 | crates/anvil/src/eth/api.rs:5041-5046 — both copies are in the same file, so extract the 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/fork.rs:396 — crates/anvil/src/eth/backend/fork.rs:396-401 | crates/anvil/src/eth/backend/fork.rs:450-457 — both copies are in the same file, so extract the 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/mod.rs:6152 — crates/anvil/src/eth/backend/mem/mod.rs:6152-6157 | crates/anvil/src/eth/backend/mem/mod.rs:6170-6176 — both copies are in the same file, so extract the 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/mod.rs:6185 — crates/anvil/src/eth/backend/mem/mod.rs:6185-6190 | crates/anvil/src/eth/backend/mem/mod.rs:6196-6201 — both copies are in the same file, so extract the 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/pubsub.rs:171 — crates/anvil/src/pubsub.rs:171-176 | crates/anvil/src/pubsub.rs:186-191 — both copies are in the same file, so extract the 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/cast/src/cmd/mktx.rs:244 — crates/cast/src/cmd/mktx.rs:244-249 | crates/cast/src/cmd/mktx.rs:256-261 — both copies are in the same file, so extract the 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/common/fmt/src/dynamic.rs:192 — crates/common/fmt/src/dynamic.rs:192-197 | crates/common/fmt/src/dynamic.rs:203-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.
  • Duplicated block (6 lines × 2) crates/debugger/src/op.rs:60 — crates/debugger/src/op.rs:60-65 | crates/debugger/src/op.rs:75-80 — both copies are in the same file, so extract the 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/debugger/src/tui/context.rs:1321 — crates/debugger/src/tui/context.rs:1321-1326 | crates/debugger/src/tui/context.rs:1347-1352 — both copies are in the same file, so extract the 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/evm/src/executors/mod.rs:199 — crates/evm/evm/src/executors/mod.rs:199-204 | crates/evm/evm/src/executors/mod.rs:954-959 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/evm/symbolic/src/runtime/expr/expr.rs:451 — crates/evm/symbolic/src/runtime/expr/expr.rs:451-456 | crates/evm/symbolic/src/runtime/expr/expr.rs:458-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.
  • Duplicated block (6 lines × 2) crates/evm/symbolic/src/runtime/expr/expr.rs:538 — crates/evm/symbolic/src/runtime/expr/expr.rs:538-543 | crates/evm/symbolic/src/runtime/expr/expr.rs:568-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.
  • Duplicated block (6 lines × 2) crates/evm/symbolic/src/runtime/expr/expr.rs:837 — crates/evm/symbolic/src/runtime/expr/expr.rs:837-842 | crates/evm/symbolic/src/runtime/expr/expr.rs:844-853 — both copies are in the same file, so extract the 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:1108 — crates/evm/symbolic/src/runtime/expr/expr.rs:1108-1113 | crates/evm/symbolic/src/runtime/expr/expr.rs:1631-1636 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/evm/symbolic/src/runtime/expr/expr.rs:2005 — crates/evm/symbolic/src/runtime/expr/expr.rs:2005-2010 | crates/evm/symbolic/src/runtime/solver/smt/mod.rs:271-276 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/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.
  • Duplicated block (6 lines × 2) crates/evm/symbolic/src/runtime/solver/smt/mod.rs:284 — crates/evm/symbolic/src/runtime/solver/smt/mod.rs:284-289 | crates/evm/symbolic/src/runtime/solver/smt/mod.rs:360-365 — both copies are in the same file, so extract the 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/state.rs:1040 — crates/evm/symbolic/src/runtime/state.rs:1040-1045 | crates/evm/symbolic/src/runtime/state.rs:1052-1057 — both copies are in the same file, so extract the 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/traces/src/decoder/mod.rs:1324 — crates/evm/traces/src/decoder/mod.rs:1324-1329 | crates/evm/traces/src/decoder/mod.rs:1333-1339 — both copies are in the same file, so extract the 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/forge/src/symbolic_minimizer.rs:541 — crates/forge/src/symbolic_minimizer.rs:541-546 | crates/forge/src/symbolic_minimizer.rs:1173-1178 — both copies are in the same file, so extract the 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/linking/src/lib.rs:842 — crates/linking/src/lib.rs:842-847 | crates/linking/src/lib.rs:912-917 — both copies are in the same file, so extract the 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:264 — crates/lint/src/sol/high/arbitrary_send_erc20.rs:264-269 | crates/lint/src/sol/high/arbitrary_send_eth.rs:130-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 113 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: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 113 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.
  • + 7 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×30
  • TooManyMethods: Backend crates/anvil/src/eth/backend/mem/mod.rs:1094 — TooManyMethods — 315 methods, declared across 5 files: mem/mod.rs (280), mem/monad.rs (28), mem/tempo.rs (4), mem/base.rs (2), +1 more file(s). The bar is 30 methods; this is 285 over it, 10.50× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: EthApi crates/anvil/src/eth/api.rs:151 — TooManyMethods — 253 methods, declared across 2 files: eth/api.rs (237), otterscan/api.rs (16). The bar is 30 methods; this is 223 over it, 8.43× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: State crates/fmt/src/state/mod.rs:105 — TooManyMethods — 138 methods, declared across 4 files: state/sol.rs (65), state/mod.rs (51), state/common.rs (13), state/yul.rs (9). The bar is 30 methods; this is 108 over it, 4.60× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NodeConfig crates/anvil/src/config.rs:252 — TooManyMethods — 117 methods. The bar is 30 methods; this is 87 over it, 3.90× 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 — 109 methods. The bar is 30 methods; this is 79 over it, 3.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SymExpr crates/evm/symbolic/src/runtime/expr/expr.rs:297 — TooManyMethods — 109 methods, declared across 4 files: expr/expr.rs (92), runtime/address.rs (9), normalize/mod.rs (7), fallback/mod.rs (1). The bar is 30 methods; this is 79 over it, 3.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: SymbolicExecutor crates/evm/symbolic/src/lib.rs:405 — TooManyMethods — 104 methods, declared across 8 files: executor/calls.rs (29), executor/run.rs (20), executor/opcodes.rs (17), executor/cheatcodes.rs (15), +4 more file(s). The bar is 30 methods; this is 74 over it, 3.47× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TUIContext crates/debugger/src/tui/context.rs:108 — TooManyMethods — 77 methods, declared across 2 files: tui/context.rs (51), tui/draw.rs (26). The bar is 30 methods; this is 47 over it, 2.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: Cheatcodes crates/cheatcodes/src/inspector.rs:600 — TooManyMethods — 76 methods. The bar is 30 methods; this is 46 over it, 2.53× 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:106 — TooManyMethods — 70 methods. The bar is 30 methods; this is 40 over it, 2.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: Backend crates/evm/core/src/backend/mod.rs:624 — TooManyMethods — 65 methods, declared across 2 files: backend/mod.rs (62), backend/bal.rs (3). The bar is 30 methods; this is 35 over it, 2.17× 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: Git crates/cli/src/utils/mod.rs:372 — 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: Executor crates/evm/evm/src/executors/mod.rs:131 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ConstraintContext crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:488 — TooManyMethods — 59 methods, declared across 2 files: normalize/mod.rs (53), normalize/rounding.rs (6). The bar is 30 methods; this is 29 over it, 1.97× 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: PathState crates/evm/symbolic/src/runtime/state.rs:7 — TooManyMethods — 56 methods. The bar is 30 methods; this is 26 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.
  • TooManyMethods: CallTraceDecoder crates/evm/traces/src/decoder/mod.rs:241 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FunctionRunner crates/forge/src/runner.rs:1178 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: 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:10 — TooManyMethods — 48 methods, declared across 3 files: expr/bool.rs (38), normalize/mod.rs (8), fallback/mod.rs (2). The bar is 30 methods; this is 18 over it, 1.60× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SymMemory crates/evm/symbolic/src/runtime/memory.rs:46 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× 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:1600 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× 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:44 — 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: Analyzer crates/lint/src/sol/high/reentrancy.rs:330 — 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: NetworkConfigs crates/evm/networks/src/lib.rs:387 — TooManyMethods — 38 methods, declared across 2 files: src/lib.rs (36), src/optimism.rs (2). The bar is 30 methods; this is 8 over it, 1.27× 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: Linker crates/linking/src/lib.rs:41 — 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.
  • + 5 more in this group — see findings.md.
D2 · Cognitive Complexity · State · ×28
  • State::print_comment (cognitive 160) crates/fmt/src/state/mod.rs:960 — State::print_comment has cognitive complexity 160 (threshold 15). Drivers by points: if/else 46 (129 pts), loops 6 (18 pts), boolean chains 7, 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:561 — 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 67) crates/fmt/src/state/sol.rs:890 — State::print_assign_rhs has cognitive complexity 67 (threshold 15). Drivers by points: if/else 28 (52 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:322 — 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:2437 — 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:1182 — 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:692 — 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:1395 — 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 28) crates/fmt/src/state/mod.rs:574 — State::estimate_size_inner has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (7 pts), boolean chains 5, loops 2 (5 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.
  • State::print_wrapped_line (cognitive 28) crates/fmt/src/state/mod.rs:811 — 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:759 — 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:459 — 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:1616 — 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::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:1695 — 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:904 — 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:1872 — 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:2317 — State::print_if_stmt has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 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.
  • 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.
  • State::handle_comment (cognitive 18) crates/fmt/src/state/mod.rs:653 — State::handle_comment has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 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.
  • + 3 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×24
  • Duplicated block (8 lines × 2) crates/anvil/src/eth/api.rs:3496 — crates/anvil/src/eth/api.rs:3496-3503 | crates/anvil/src/eth/api.rs:3726-3733 — both copies are in the same file, so extract the 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:4874 — crates/anvil/src/eth/api.rs:4874-4881 | crates/anvil/src/eth/api.rs:4883-4890 — both copies are in the same file, so extract the 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/batch_mktx.rs:139 — crates/cast/src/cmd/batch_mktx.rs:139-146 | crates/cast/src/cmd/mktx.rs:306-313 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) crates/cheatcodes/src/evm.rs:1682 — crates/cheatcodes/src/evm.rs:1682-1689 | crates/cheatcodes/src/evm.rs:1726-1733 — both copies are in the same file, so extract the 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/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) crates/doc/src/hir_ext.rs:913 — crates/doc/src/hir_ext.rs:913-920 | crates/doc/src/hir_ext.rs:935-942 — both copies are in the same file, so extract the 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/core/src/backend/cow.rs:120 — crates/evm/core/src/backend/cow.rs:120-128 | crates/evm/core/src/backend/mod.rs:1122-1129 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) crates/evm/symbolic/src/executor/opcodes.rs:873 — crates/evm/symbolic/src/executor/opcodes.rs:873-880 | crates/evm/symbolic/src/executor/opcodes.rs:885-892 — both copies are in the same file, so extract the 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:629 — crates/evm/symbolic/src/runtime/expr/bool.rs:629-636 | crates/evm/symbolic/src/runtime/expr/expr.rs:1241-1248 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) crates/evm/symbolic/src/runtime/expr/expr.rs:445 — crates/evm/symbolic/src/runtime/expr/expr.rs:445-452 | crates/evm/symbolic/src/runtime/expr/expr.rs:489-496 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/evm/symbolic/src/runtime/expr/expr.rs:1700 — crates/evm/symbolic/src/runtime/expr/expr.rs:1700-1707 | crates/evm/symbolic/src/runtime/expr/expr.rs:1716-1723 — both copies are in the same file, so extract the 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/solver/normalize/mod.rs:1805 — crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1805-1812 | crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1813-1820 — both copies are in the same file, so extract the 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/state.rs:502 — crates/evm/symbolic/src/runtime/state.rs:502-509 | crates/evm/symbolic/src/runtime/state.rs:510-517 — both copies are in the same file, so extract the 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:2121 — crates/forge/src/runner.rs:2121-2128 | crates/forge/src/runner.rs:2274-2281 — both copies are in the same file, so extract the 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/symbolic_minimizer.rs:392 — crates/forge/src/symbolic_minimizer.rs:392-399 | crates/forge/src/symbolic_minimizer.rs:1198-1205 — both copies are in the same file, so extract the 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/lint/src/sol/high/reentrancy.rs:1296 — crates/lint/src/sol/high/reentrancy.rs:1296-1303 | crates/lint/src/sol/high/reentrancy.rs:1365-1372 — both copies are in the same file, so extract the 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/runner.rs:140 — crates/script/src/runner.rs:140-147 | crates/script/src/runner.rs:185-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (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.
  • Duplicated block (8 lines × 2) crates/anvil/src/eth/api.rs:3144 — crates/anvil/src/eth/api.rs:3144-3151 | crates/anvil/src/eth/api.rs:3192-3200 — both copies are in the same file, so extract the 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:1899 — crates/anvil/src/eth/api.rs:1899-1906 | crates/anvil/src/eth/api.rs:4547-4554 — both copies are in the same file, so extract the 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/doc/src/hir_ext.rs:921 — crates/doc/src/hir_ext.rs:921-928 | crates/doc/src/hir_ext.rs:943-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.
  • Duplicated block (8 lines × 2) crates/anvil/src/eth/api.rs:4429 — crates/anvil/src/eth/api.rs:4429-4436 | crates/anvil/src/eth/api.rs:4477-4484 — both copies are in the same file, so extract the 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/solver/mod.rs:344 — crates/evm/symbolic/src/runtime/solver/mod.rs:344-351 | crates/evm/symbolic/src/runtime/solver/mod.rs:356-363 — both copies are in the same file, so extract the 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/erc4626.rs:1325 — crates/cast/src/cmd/erc4626.rs:1325-1332 | crates/cast/src/cmd/erc4626.rs:1355-1362 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D3 · God Classes · FunctionTooLong · ×21
  • FunctionTooLong: cast::args::run_command crates/cast/src/args.rs:132 — FunctionTooLong — cast::args::run_command runs 964 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 864 over it, 9.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: foundry_debugger::op::map_opcode crates/debugger/src/op.rs:29 — FunctionTooLong — foundry_debugger::op::map_opcode runs 267 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 167 over it, 2.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: 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 259 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 159 over it, 2.59× 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:1075 — 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: foundry_cheatcodes::evm::get_recorded_state_diffs crates/cheatcodes/src/evm.rs:2261 — FunctionTooLong — foundry_cheatcodes::evm::get_recorded_state_diffs runs 148 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • 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: anvil::eth::error::blockchain_error_to_rpc_result crates/anvil/src/eth/error/mod.rs:489 — FunctionTooLong — anvil::eth::error::blockchain_error_to_rpc_result runs 130 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 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: forge::symbolic_regression::plan_symbolic_regression crates/forge/src/symbolic_regression.rs:191 — FunctionTooLong — forge::symbolic_regression::plan_symbolic_regression runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: forge::workspace::copy_project crates/forge/src/workspace.rs:249 — 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:615 — 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: foundry_evm::executors::invariant::result::can_continue crates/evm/evm/src/executors/invariant/result.rs:271 — 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: forge_script::verify::verify_contracts crates/script/src/verify.rs:420 — FunctionTooLong — forge_script::verify::verify_contracts 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:864 — 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: anvil::try_spawn crates/anvil/src/lib.rs:142 — FunctionTooLong — anvil::try_spawn runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • 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_symbolic::runtime::precompiles::execute_symbolic_precompile crates/evm/symbolic/src/runtime/precompiles.rs:53 — FunctionTooLong — foundry_evm_symbolic::runtime::precompiles::execute_symbolic_precompile runs 103 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 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: 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.
D35 · Change Coupling · Change coupling · ×21
  • 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 73% of the time (16 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 16 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: eth.rs ↔ tempo.rs crates/evm/core/src/evm/eth.rs:1 — `crates/evm/core/src/evm/eth.rs` and `crates/evm/core/src/evm/tempo.rs` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency 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 8 shared commits counted here, the most recent 3 are `f85c35c9` refactor(evm): narrow inspector network config (#16593); `d57828e8` chore: bump revm (#14925); `82557ee1` refactor(evm): remove useless Eth/Tempo EVM wrapper structs (#14350) — run `git show` on any of them.
  • Change coupling: eth.rs ↔ op.rs crates/evm/core/src/evm/eth.rs:1 — `crates/evm/core/src/evm/eth.rs` and `crates/evm/core/src/evm/op.rs` change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency 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 8 shared commits counted here, the most recent 3 are `f85c35c9` refactor(evm): narrow inspector network config (#16593); `d57828e8` chore: bump revm (#14925); `82557ee1` refactor(evm): remove useless Eth/Tempo EVM wrapper structs (#14350) — run `git show` on any of them.
  • Change coupling: fork_db.rs ↔ in_memory_db.rs crates/anvil/src/eth/backend/mem/fork_db.rs:1 — `crates/anvil/src/eth/backend/mem/fork_db.rs` and `crates/anvil/src/eth/backend/mem/in_memory_db.rs` change together 70% of the time (21 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 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 21 shared commits counted here, the most recent 3 are `32c6410b` fix(anvil): keep fork fallback in loaded history (#17762); `02fe3ae5` feat(anvil): support 200ms Base blocks (#17128); `b2258a82` fix(anvil): canonicalize `eth_simulateV1` state roots (#15934) — 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 63% of the time (19 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 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 19 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: builder.rs ↔ draw.rs crates/debugger/src/builder.rs:1 — `crates/debugger/src/builder.rs` and `crates/debugger/src/tui/draw.rs` change together 62% of the time (10 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 10 shared commits counted here, the most recent 3 are `0b89138a` refactor(traces): re-export all used trace types (#17289); `db9561b0` feat(debugger): label storage slots (#16246); `dfe94028` feat(debugger): add layout selection (#15171) — run `git show` on any of them.
  • Change coupling: builder.rs ↔ context.rs crates/debugger/src/builder.rs:1 — `crates/debugger/src/builder.rs` and `crates/debugger/src/tui/context.rs` change together 62% of the time (10 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 10 shared commits counted here, the most recent 3 are `0b89138a` refactor(traces): re-export all used trace types (#17289); `bab28fc6` fix(debugger): identify etched frames by executed code (#17275); `db9561b0` feat(debugger): label storage slots (#16246) — 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: 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: 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 56% of the time (19 of the 34 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 19 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: access_list.rs ↔ estimate.rs crates/cast/src/cmd/access_list.rs:1 — `crates/cast/src/cmd/access_list.rs` and `crates/cast/src/cmd/estimate.rs` change together 55% of the time (12 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 12 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: batch_mktx.rs ↔ keychain.rs crates/cast/src/cmd/batch_mktx.rs:1 — `crates/cast/src/cmd/batch_mktx.rs` and `crates/cast/src/cmd/keychain.rs` change together 53% of the time (8 of the 15 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 8 shared commits counted here, the most recent 3 are `d3c0e59f` fix(tempo): resolve fee tokens on local Tempo nodes (#17327); `10e906c0` feat(common): resolve fee token on chain (#15161); `97d95fc7` feat(common): resolve tempo fee token symbols on-chain (#15158) — 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 53% of the time (9 of the 17 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: 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: 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: 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: batch_send.rs ↔ keychain.rs crates/cast/src/cmd/batch_send.rs:1 — `crates/cast/src/cmd/batch_send.rs` and `crates/cast/src/cmd/keychain.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 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 8 shared commits counted here, the most recent 3 are `d3c0e59f` fix(tempo): resolve fee tokens on local Tempo nodes (#17327); `10e906c0` feat(common): resolve fee token on chain (#15161); `97d95fc7` feat(common): resolve tempo fee token symbols on-chain (#15158) — run `git show` on any of them.
  • Change coupling: standard_json.rs ↔ sourcify.rs crates/verify/src/etherscan/standard_json.rs:1 — `crates/verify/src/etherscan/standard_json.rs` and `crates/verify/src/sourcify.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 `2515cb27` refactor(verify): dedupe Vyper standard JSON input logic (#13743); `eae8d0dd` fix / refactor(verify): dedupe standard JSON input logic + avoid unne…; `3e9385b6` feat: smarter verification (#7937) — 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.
  • Change coupling: campaign.rs ↔ result.rs crates/evm/evm/src/executors/invariant/campaign.rs:1 — `crates/evm/evm/src/executors/invariant/campaign.rs` and `crates/forge/src/result.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 `5834367d` fix(forge): report interrupted campaigns as skipped (#17461); `b3ccaf9f` feat(forge): show fork block on failures (#16179); `9f891f26` perf(fuzz): reduce invariant campaign memory retention (#15070) — run `git show` on any of them.
D1 · Cyclomatic Complexity · State · ×19
  • State::print_comment (cyclomatic 62) crates/fmt/src/state/mod.rs:960 — State::print_comment has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent 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:561 — 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:1395 — 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 37) crates/fmt/src/state/sol.rs:890 — State::print_assign_rhs 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.
  • 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:322 — 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:692 — 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:1182 — 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:2057 — 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::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:2437 — 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 20) crates/fmt/src/state/mod.rs:574 — State::estimate_size_inner 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.
  • 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:1616 — 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:811 — 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:459 — 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.
  • State::is_single_line_block (cyclomatic 16) crates/fmt/src/state/sol.rs:2698 — State::is_single_line_block 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.
D2 · Cognitive Complexity · forge · ×18
  • 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:249 — 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:580 — 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:615 — 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:350 — 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::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::symbolic_minimizer::minimize_value_pairs (cognitive 20) crates/forge/src/symbolic_minimizer.rs:532 — 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:134 — 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::cmd::watch::watch_doc (cognitive 17) crates/forge/src/cmd/watch.rs:470 — 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:126 — 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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×17
  • Duplicated block (9 lines × 2) crates/anvil/src/eth/api.rs:1822 — crates/anvil/src/eth/api.rs:1822-1830 | crates/anvil/src/eth/api.rs:3313-3321 — both copies are in the same file, so extract the 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/anvil/src/eth/backend/mem/mod.rs:3135 — crates/anvil/src/eth/backend/mem/mod.rs:3135-3143 | crates/anvil/src/eth/backend/mem/mod.rs:6143-6151 — both copies are in the same file, so extract the 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/anvil/src/eth/backend/mem/mod.rs:3162 — crates/anvil/src/eth/backend/mem/mod.rs:3162-3170 | crates/anvil/src/eth/backend/mem/mod.rs:6177-6185 — both copies are in the same file, so extract the 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/anvil/src/eth/error/mod.rs:191 — crates/anvil/src/eth/error/mod.rs:191-199 | crates/anvil/src/eth/error/mod.rs:214-222 — both copies are in the same file, so extract the 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/debugger/src/tui/draw.rs:146 — crates/debugger/src/tui/draw.rs:146-154 | crates/debugger/src/tui/draw.rs:245-253 — both copies are in the same file, so extract the 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/backend/mod.rs:2019 — crates/evm/core/src/backend/mod.rs:2019-2027 | crates/evm/core/src/backend/mod.rs:2224-2232 — both copies are in the same file, so extract the 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:286 — crates/evm/core/src/opts.rs:286-294 | crates/evm/core/src/opts.rs:298-306 — both copies are in the same file, so extract the 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/executor/calls.rs:1849 — crates/evm/symbolic/src/executor/calls.rs:1849-1857 | crates/evm/symbolic/src/executor/calls.rs:1869-1877 — both copies are in the same file, so extract the 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:1331 — crates/evm/symbolic/src/runtime/expr/expr.rs:1331-1339 | crates/evm/symbolic/src/runtime/expr/expr.rs:1351-1359 — both copies are in the same file, so extract the 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/forge/src/cmd/eip712.rs:81 — crates/forge/src/cmd/eip712.rs:81-89 | crates/forge/src/cmd/inspect.rs:549-557 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) crates/script/src/simulate.rs:234 — crates/script/src/simulate.rs:234-243 | crates/script/src/simulate/monad.rs:201-209 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) crates/evm/symbolic/src/runtime/solver/mod.rs:308 — crates/evm/symbolic/src/runtime/solver/mod.rs:308-316 | crates/evm/symbolic/src/runtime/solver/mod.rs:440-448 — both copies are in the same file, so extract the 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/networks/src/celo/transfer.rs:77 — crates/evm/networks/src/celo/transfer.rs:77-85 | crates/evm/networks/src/celo/transfer.rs:95-103 — both copies are in the same file, so extract the 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/config/src/providers/ext.rs:308 — crates/config/src/providers/ext.rs:308-316 | crates/config/src/providers/ext.rs:348-356 — both copies are in the same file, so extract the 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/forge/src/cmd/selectors.rs:420 — crates/forge/src/cmd/selectors.rs:420-428 | crates/forge/src/cmd/selectors.rs:431-439 — both copies are in the same file, so extract the 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.
  • 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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×17
  • Duplicated block (5 lines × 2) crates/anvil/src/eth/api.rs:3100 — crates/anvil/src/eth/api.rs:3100-3104 | crates/anvil/src/eth/api.rs:3122-3126 — both copies are in the same file, so extract the 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/cast/src/cmd/access_list.rs:92 — crates/cast/src/cmd/access_list.rs:92-96 | crates/cast/src/cmd/estimate.rs:126-132 — 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/cast/src/cmd/batch_mktx.rs:94 — crates/cast/src/cmd/batch_mktx.rs:94-98 | crates/cast/src/cmd/batch_send.rs:81-85 — 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/cast/src/cmd/mktx.rs:175 — crates/cast/src/cmd/mktx.rs:175-181 | 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/serde_helpers.rs:33 — crates/common/src/serde_helpers.rs:33-37 | crates/config/src/utils.rs:320-324 — 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/debugger/src/tui/draw.rs:141 — crates/debugger/src/tui/draw.rs:141-145 | crates/debugger/src/tui/draw.rs:218-222 — both copies are in the same file, so extract the 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/executor/calls.rs:828 — crates/evm/symbolic/src/executor/calls.rs:828-832 | crates/evm/symbolic/src/executor/calls.rs:935-939 — both copies are in the same file, so extract the 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/bool.rs:205 — crates/evm/symbolic/src/runtime/expr/bool.rs:205-209 | crates/evm/symbolic/src/runtime/expr/bool.rs:220-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.
  • Duplicated block (5 lines × 2) crates/evm/symbolic/src/runtime/expr/expr.rs:876 — crates/evm/symbolic/src/runtime/expr/expr.rs:876-880 | crates/evm/symbolic/src/runtime/expr/expr.rs:883-887 — both copies are in the same file, so extract the 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/solver/normalize/mod.rs:442 — crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:442-448 | crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:449-453 — both copies are in the same file, so extract the 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/forge/src/symbolic_minimizer.rs:514 — crates/forge/src/symbolic_minimizer.rs:514-518 | crates/forge/src/symbolic_minimizer.rs:1135-1139 — both copies are in the same file, so extract the 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/lint/src/sol/info/unused_error.rs:30 — crates/lint/src/sol/info/unused_error.rs:30-34 | crates/lint/src/sol/low/inconsistent_type_names.rs:26-30 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (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.
  • Duplicated block (5 lines × 2) crates/config/src/providers/ext.rs:303 — crates/config/src/providers/ext.rs:303-307 | crates/config/src/providers/ext.rs:343-347 — both copies are in the same file, so extract the 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/cheatcodes/src/crypto.rs:406 — crates/cheatcodes/src/crypto.rs:406-410 | crates/cheatcodes/src/crypto.rs:414-418 — both copies are in the same file, so extract the 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/config/src/providers/ext.rs:106 — crates/config/src/providers/ext.rs:106-110 | crates/config/src/providers/ext.rs:158-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×16
  • Duplicated block (10 lines × 2) crates/anvil/src/eth/backend/mem/mod.rs:4406 — crates/anvil/src/eth/backend/mem/mod.rs:4406-4415 | crates/anvil/src/eth/backend/mem/mod.rs:7577-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.
  • Duplicated block (10 lines × 2) crates/anvil/src/eth/backend/mem/mod.rs:7536 — crates/anvil/src/eth/backend/mem/mod.rs:7536-7545 | crates/anvil/src/eth/backend/mem/mod.rs:7697-7706 — both copies are in the same file, so extract the 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/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.
  • Duplicated block (10 lines × 2) crates/debugger/src/tui/context.rs:1420 — crates/debugger/src/tui/context.rs:1420-1429 | crates/debugger/src/tui/context.rs:1457-1466 — both copies are in the same file, so extract the 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/core/src/opts.rs:361 — crates/evm/core/src/opts.rs:361-370 | crates/evm/core/src/opts.rs:654-663 — both copies are in the same file, so extract the 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/opcodes.rs:1044 — crates/evm/symbolic/src/executor/opcodes.rs:1044-1053 | crates/evm/symbolic/src/executor/opcodes.rs:1064-1073 — both copies are in the same file, so extract the 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:504 — crates/evm/symbolic/src/runtime/expr/expr.rs:504-513 | crates/evm/symbolic/src/runtime/expr/expr.rs:586-595 — both copies are in the same file, so extract the 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/solver/fallback/mod.rs:88 — crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:88-97 | crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:1015-1024 — both copies are in the same file, so extract the 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/linking/src/lib.rs:721 — crates/linking/src/lib.rs:721-730 | crates/linking/src/lib.rs:816-825 — both copies are in the same file, so extract the 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:543 — crates/lint/src/sol/high/arbitrary_send_erc20.rs:543-552 | crates/lint/src/sol/high/arbitrary_send_eth.rs:268-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 113 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 (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 113 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 (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 113 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 (10 lines × 2) crates/cast/src/cmd/batch_mktx.rs:104 — crates/cast/src/cmd/batch_mktx.rs:104-113 | crates/cast/src/cmd/mktx.rs:237-247 — 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 (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.
  • Duplicated block (10 lines × 2) crates/evm/fuzz/src/lib.rs:210 — crates/evm/fuzz/src/lib.rs:210-219 | crates/evm/fuzz/src/lib.rs:234-243 — both copies are in the same file, so extract the 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.
D1 · Cyclomatic Complexity · Analyzer · ×14
  • Analyzer::analyze_expr (cyclomatic 34) crates/lint/src/sol/high/reentrancy.rs:619 — 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:475 — 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:1011 — 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:1333 — 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.
D2 · Cognitive Complexity · SymbolicExecutor · ×14
  • SymbolicExecutor::handle_foundry_cheatcode (cognitive 175) crates/evm/symbolic/src/executor/cheatcodes.rs:586 — SymbolicExecutor::handle_foundry_cheatcode has cognitive complexity 175 (threshold 15). Drivers by points: if/else 74 (128 pts), match/switch 12 (24 pts), loops 6 (12 pts), boolean chains 11 (nesting depth added 72). To reduce it, split the body into named stages: move each independent 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 150) crates/evm/symbolic/src/executor/opcodes.rs:448 — SymbolicExecutor::step has cognitive complexity 150 (threshold 15). Drivers by points: if/else 50 (110 pts), match/switch 16 (33 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 78). To reduce it, split the body into named stages: move each independent 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:91 — 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 83) crates/evm/symbolic/src/executor/mod.rs:209 — SymbolicExecutor::execute_call_path_batch has cognitive complexity 83 (threshold 15). Drivers by points: if/else 18 (57 pts), match/switch 6 (19 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SymbolicExecutor::run_invariant_inner (cognitive 81) crates/evm/symbolic/src/executor/run.rs:593 — SymbolicExecutor::run_invariant_inner has cognitive complexity 81 (threshold 15). Drivers by points: if/else 13 (43 pts), loops 8 (31 pts), match/switch 1 (7 pts) (nesting depth added 59). To reduce it, split the body into named stages: move each independent 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 73) crates/evm/symbolic/src/executor/calls.rs:677 — SymbolicExecutor::call_concrete_target has cognitive complexity 73 (threshold 15). Drivers by points: if/else 35 (56 pts), boolean chains 8, match/switch 4 (8 pts), loops 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.
  • SymbolicExecutor::mapping_storage_provenance (cognitive 46) crates/evm/symbolic/src/executor/opcodes.rs:54 — 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 40) crates/evm/symbolic/src/executor/calls.rs:4 — SymbolicExecutor::call has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (26 pts), match/switch 5 (8 pts), boolean chains 6 (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 35) crates/evm/symbolic/src/executor/run.rs:356 — SymbolicExecutor::run_inner has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 3 (11 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SymbolicExecutor::create (cognitive 28) crates/evm/symbolic/src/executor/create.rs:4 — SymbolicExecutor::create has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (22 pts), match/switch 4 (5 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SymbolicExecutor::call_symbolic_target (cognitive 26) crates/evm/symbolic/src/executor/calls.rs:1355 — SymbolicExecutor::call_symbolic_target has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SymbolicExecutor::pop_next_feasible_path (cognitive 21) crates/evm/symbolic/src/executor/mod.rs:87 — 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::handle_bound (cognitive 20) crates/evm/symbolic/src/executor/constraints.rs:178 — SymbolicExecutor::handle_bound has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 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.
  • SymbolicExecutor::split_symbolic_target_candidate (cognitive 18) crates/evm/symbolic/src/executor/calls.rs:1488 — SymbolicExecutor::split_symbolic_target_candidate has cognitive complexity 18 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 4 (8 pts) (nesting depth added 9). 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.
D2 · Cognitive Complexity · Backend · ×14
  • Backend::simulate_raw (cognitive 169) crates/anvil/src/eth/backend/mem/mod.rs:9021 — Backend::simulate_raw has cognitive complexity 169 (threshold 15). Drivers by points: if/else 59 (134 pts), match/switch 6 (15 pts), boolean chains 11, loops 5 (9 pts) (nesting depth added 88). To reduce it, split the body into named stages: move each independent 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 68) crates/anvil/src/eth/backend/mem/mod.rs:10185 — Backend::validate_pool_transaction_for has cognitive complexity 68 (threshold 15). Drivers by points: if/else 28 (53 pts), boolean chains 11, match/switch 2 (4 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Backend::load_state (cognitive 56) crates/anvil/src/eth/backend/mem/mod.rs:8501 — Backend::load_state has cognitive complexity 56 (threshold 15). Drivers by points: if/else 29 (42 pts), boolean chains 7, loops 3 (6 pts), match/switch 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.
  • Backend::replay_until (cognitive 36) crates/evm/core/src/backend/mod.rs:1784 — Backend::replay_until has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 4 (11 pts), boolean chains 2 (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.
  • Backend::validate_pool_transaction (cognitive 35) crates/anvil/src/eth/backend/mem/mod.rs:10038 — Backend::validate_pool_transaction has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (30 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.
  • Backend::select_fork (cognitive 31) crates/evm/core/src/backend/mod.rs:2096 — Backend::select_fork has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (26 pts), loops 2 (5 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Backend::stage_fork_reset (cognitive 24) crates/anvil/src/eth/backend/mem/mod.rs:5124 — Backend::stage_fork_reset has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (13 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.
  • Backend::do_mine_block_locked (cognitive 24) crates/anvil/src/eth/backend/mem/mod.rs:6272 — Backend::do_mine_block_locked has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 1, loops 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • Backend::parse_transaction_request (cognitive 21) crates/anvil/src/eth/backend/mem/mod.rs:3484 — 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::with_genesis (cognitive 21) crates/anvil/src/eth/backend/mem/mod.rs:4589 — Backend::with_genesis has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19 (21 pts) (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::debug_execution_witness (cognitive 17) crates/anvil/src/eth/backend/mem/mod.rs:7631 — 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:4564 — 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:5702 — 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::transact (cognitive 16) crates/evm/core/src/backend/mod.rs:2287 — Backend::transact has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 1 (2 pts), boolean chains 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.
D2 · Cognitive Complexity · Analyzer · ×14
  • Analyzer::analyze_expr (cognitive 51) crates/lint/src/sol/high/reentrancy.rs:619 — 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:475 — 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:1333 — 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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×13
  • Duplicated block (7 lines × 2) crates/anvil/src/eth/backend/mem/in_memory_db.rs:91 — crates/anvil/src/eth/backend/mem/in_memory_db.rs:91-97 | crates/anvil/src/eth/backend/mem/state.rs:41-47 — 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/config/src/providers/remappings.rs:367 — crates/config/src/providers/remappings.rs:367-373 | crates/config/src/providers/remappings.rs:385-391 — both copies are in the same file, so extract the 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/evm/symbolic/src/executor/opcodes.rs:805 — crates/evm/symbolic/src/executor/opcodes.rs:805-811 | crates/evm/symbolic/src/executor/opcodes.rs:1164-1170 — both copies are in the same file, so extract the 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/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 113 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/lint/src/sol/high/arbitrary_send_erc20.rs:593 — crates/lint/src/sol/high/arbitrary_send_erc20.rs:593-599 | crates/lint/src/sol/high/arbitrary_send_eth.rs:302-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 113 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:465 — crates/primitives/src/transaction/envelope.rs:465-471 | crates/primitives/src/transaction/envelope.rs:487-493 — both copies are in the same file, so extract the 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/cast/src/cmd/call.rs:236 — crates/cast/src/cmd/call.rs:236-242 | crates/cast/src/cmd/run.rs:220-226 — 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:294 — crates/evm/symbolic/src/runtime/expr/bool.rs:294-302 | crates/evm/symbolic/src/runtime/expr/expr.rs:417-423 — 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:1311 — crates/evm/traces/src/decoder/mod.rs:1311-1319 | crates/evm/traces/src/decoder/mod.rs:1323-1329 — both copies are in the same file, so extract the 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/anvil/src/eth/backend/mem/mod.rs:5384 — crates/anvil/src/eth/backend/mem/mod.rs:5384-5391 | crates/anvil/src/eth/backend/mem/mod.rs:5576-5582 — both copies are in the same file, so extract the 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/anvil/src/eth/pool/mod.rs:385 — crates/anvil/src/eth/pool/mod.rs:385-391 | crates/anvil/src/eth/pool/mod.rs:403-410 — both copies are in the same file, so extract the 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/debugger/src/tui/context.rs:1314 — crates/debugger/src/tui/context.rs:1314-1320 | crates/debugger/src/tui/context.rs:1340-1346 — both copies are in the same file, so extract the 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:307 — crates/test-utils/src/rpc.rs:307-313 | crates/test-utils/src/rpc.rs:537-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.
D1 · Cyclomatic Complexity · SymbolicExecutor · ×12
  • SymbolicExecutor::handle_foundry_cheatcode (cyclomatic 225) crates/evm/symbolic/src/executor/cheatcodes.rs:586 — SymbolicExecutor::handle_foundry_cheatcode has cyclomatic complexity 225 (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 155) crates/evm/symbolic/src/executor/opcodes.rs:448 — SymbolicExecutor::step has cyclomatic complexity 155 (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 53) crates/evm/symbolic/src/executor/calls.rs:677 — SymbolicExecutor::call_concrete_target 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.
  • SymbolicExecutor::execute_call_path_batch (cyclomatic 36) crates/evm/symbolic/src/executor/mod.rs:209 — SymbolicExecutor::execute_call_path_batch 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::call (cyclomatic 33) crates/evm/symbolic/src/executor/calls.rs:4 — SymbolicExecutor::call has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • SymbolicExecutor::search_invariant_candidates_inner (cyclomatic 30) crates/evm/symbolic/src/executor/invariant.rs:91 — 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::create (cyclomatic 23) crates/evm/symbolic/src/executor/create.rs:4 — SymbolicExecutor::create 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.
  • SymbolicExecutor::mapping_storage_provenance (cyclomatic 22) crates/evm/symbolic/src/executor/opcodes.rs:54 — 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_invariant_inner (cyclomatic 22) crates/evm/symbolic/src/executor/run.rs:593 — SymbolicExecutor::run_invariant_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::handle_symbolic_vm_cheatcode (cyclomatic 20) crates/evm/symbolic/src/executor/cheatcodes.rs:2309 — SymbolicExecutor::handle_symbolic_vm_cheatcode 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.
  • SymbolicExecutor::run_inner (cyclomatic 20) crates/evm/symbolic/src/executor/run.rs:356 — SymbolicExecutor::run_inner 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::call_symbolic_target (cyclomatic 16) crates/evm/symbolic/src/executor/calls.rs:1355 — SymbolicExecutor::call_symbolic_target 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.
D2 · Cognitive Complexity · forge_doc · ×12
  • 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::hir_ext::parse_inline_link (cognitive 16) crates/doc/src/hir_ext.rs:1055 — forge_doc::hir_ext::parse_inline_link has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • 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.
D1 · Cyclomatic Complexity · forge · ×11
  • forge::args::run_command (cyclomatic 51) crates/forge/src/args.rs:36 — forge::args::run_command has cyclomatic complexity 51 (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:249 — 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:615 — 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.
D1 · Cyclomatic Complexity · Backend · ×10
  • Backend::simulate_raw (cyclomatic 68) crates/anvil/src/eth/backend/mem/mod.rs:9021 — Backend::simulate_raw has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Backend::validate_pool_transaction_for (cyclomatic 44) crates/anvil/src/eth/backend/mem/mod.rs:10185 — Backend::validate_pool_transaction_for 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.
  • Backend::load_state (cyclomatic 37) crates/anvil/src/eth/backend/mem/mod.rs:8501 — Backend::load_state 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.
  • Backend::stage_fork_reset (cyclomatic 24) crates/anvil/src/eth/backend/mem/mod.rs:5124 — Backend::stage_fork_reset 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.
  • Backend::do_mine_block_locked (cyclomatic 21) crates/anvil/src/eth/backend/mem/mod.rs:6272 — Backend::do_mine_block_locked 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.
  • Backend::validate_pool_transaction (cyclomatic 20) crates/anvil/src/eth/backend/mem/mod.rs:10038 — 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.
  • Backend::parse_transaction_request (cyclomatic 19) crates/anvil/src/eth/backend/mem/mod.rs:3484 — 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.
  • Backend::replay_until (cyclomatic 17) crates/evm/core/src/backend/mod.rs:1784 — Backend::replay_until 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.
  • Backend::apply_fork_transaction_replay (cyclomatic 16) crates/anvil/src/eth/backend/mem/mod.rs:5874 — Backend::apply_fork_transaction_replay 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.
  • Backend::select_fork (cyclomatic 16) crates/evm/core/src/backend/mod.rs:2096 — Backend::select_fork 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.
D2 · Cognitive Complexity · FunctionRunner · ×10
  • FunctionRunner::run_invariant_test (cognitive 199) crates/forge/src/runner.rs:3802 — FunctionRunner::run_invariant_test has cognitive complexity 199 (threshold 15). Drivers by points: if/else 65 (127 pts), match/switch 16 (43 pts), boolean chains 19, loops 6 (10 pts) (nesting depth added 93). To reduce it, split the body into named stages: move each independent 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:3267 — 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 71) crates/forge/src/runner.rs:2648 — FunctionRunner::replay_symbolic_artifact has cognitive complexity 71 (threshold 15). Drivers by points: if/else 24 (47 pts), match/switch 8 (16 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • FunctionRunner::replay_persisted_handler_failures (cognitive 45) crates/forge/src/runner.rs:1679 — FunctionRunner::replay_persisted_handler_failures has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (31 pts), match/switch 4 (7 pts), boolean chains 5, loops 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • FunctionRunner::replay_invariant_checkpoints (cognitive 35) crates/forge/src/runner.rs:3084 — 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:2072 — 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 25) crates/forge/src/runner.rs:5002 — FunctionRunner::run_fuzz_test has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 3, 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:2225 — 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:3703 — 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::run (cognitive 16) crates/forge/src/runner.rs:1841 — 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.
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D2 · Cognitive Complexity · foundry_evm_symbolic · ×9
  • 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::run_solver_commands (cognitive 36) crates/evm/symbolic/src/runtime/solver/mod.rs:1075 — 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::parse_model_values (cognitive 33) crates/evm/symbolic/src/runtime/solver/mod.rs:1677 — foundry_evm_symbolic::runtime::solver::parse_model_values has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (27 pts), loops 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::precompiles::execute_symbolic_precompile (cognitive 28) crates/evm/symbolic/src/runtime/precompiles.rs:53 — foundry_evm_symbolic::runtime::precompiles::execute_symbolic_precompile has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 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.
  • foundry_evm_symbolic::runtime::solver::fallback::seed_bounded_support_vars (cognitive 26) crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:559 — 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::solver::fallback::checked_mul_guard_operands (cognitive 19) crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:346 — foundry_evm_symbolic::runtime::solver::fallback::checked_mul_guard_operands has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, 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.
  • foundry_evm_symbolic::runtime::solver::normalize::normalize_cmp_for_solver (cognitive 18) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:422 — foundry_evm_symbolic::runtime::solver::normalize::normalize_cmp_for_solver has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, 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.
  • foundry_evm_symbolic::runtime::solver::fallback::complete_fallback_support_model (cognitive 16) crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:615 — 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:912 — 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.
D2 · Cognitive Complexity · foundry_cheatcodes · ×9
  • foundry_cheatcodes::evm::get_recorded_state_diffs (cognitive 85) crates/cheatcodes/src/evm.rs:2261 — foundry_cheatcodes::evm::get_recorded_state_diffs has cognitive complexity 85 (threshold 15). Drivers by points: if/else 23 (58 pts), loops 7 (13 pts), boolean chains 11, match/switch 1 (3 pts) (nesting depth added 43). 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::_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:672 — 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 41) crates/cheatcodes/src/fs.rs:509 — foundry_cheatcodes::fs::deploy_code has cognitive complexity 41 (threshold 15). Drivers by points: if/else 24 (35 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:281 — 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::fs::parse_artifact_path (cognitive 30) crates/cheatcodes/src/fs.rs:57 — 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.
D2 · Cognitive Complexity · EthApi · ×9
  • EthApi::do_estimate_gas_with_state (cognitive 40) crates/anvil/src/eth/api.rs:1916 — EthApi::do_estimate_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::anvil_reorg (cognitive 40) crates/anvil/src/eth/api.rs:4524 — EthApi::anvil_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:1333 — 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:3897 — 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:4725 — 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:5181 — 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::execute (cognitive 18) crates/anvil/src/eth/api.rs:2154 — EthApi::execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • EthApi::transaction_receipts_subscription (cognitive 17) crates/anvil/src/eth/api.rs:5058 — 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::eip8130_nonce_markers (cognitive 16) crates/anvil/src/eth/api.rs:5370 — 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.
D3 · God Classes · TooManyFields · ×9
  • TooManyFields: Config crates/config/src/lib.rs:196 — TooManyFields — 139 stored fields beside 109 methods. The bar is 30 stored fields; this is 109 over it, 4.63× 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:252 — TooManyFields — 68 stored fields beside 117 methods. The bar is 30 stored fields; this is 38 over it, 2.27× 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:600 — TooManyFields — 56 stored fields beside 76 methods. The bar is 30 stored fields; this is 26 over it, 1.87× 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:109 — TooManyFields — 39 stored fields beside 17 methods. The bar is 30 stored fields; this is 9 over it, 1.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: InspectorStackInner REDACTED:441 — TooManyFields — 39 stored fields beside 6 methods. The bar is 30 stored fields; this is 9 over it, 1.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:7 — TooManyFields — 37 stored fields beside 56 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: 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:44 — TooManyFields — 33 stored fields beside 39 methods. The bar is 30 stored fields; this is 3 over it, 1.10× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: AnvilEvmArgs crates/anvil/src/cmd.rs:528 — 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×9
  • Low cohesion: NodeConfig (LCOM4 18) crates/anvil/src/config.rs:252 — NodeConfig's methods fall into 18 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 18 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 11) REDACTED:401 — InspectorStack's methods fall into 11 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 11 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 10) crates/evm/symbolic/src/runtime/state.rs:7 — PathState'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: ScriptArgs (LCOM4 6) crates/script/src/lib.rs:109 — 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: ContractsByArtifact (LCOM4 5) crates/common/src/contracts.rs:197 — ContractsByArtifact'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: SymExpr (LCOM4 5) crates/evm/symbolic/src/runtime/expr/expr.rs:297 — SymExpr'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: InspectorStackInner (LCOM4 4) REDACTED:441 — InspectorStackInner'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:1293 — 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.
D1 · Cyclomatic Complexity · FunctionRunner · ×8
  • FunctionRunner::run_invariant_test (cyclomatic 101) crates/forge/src/runner.rs:3802 — FunctionRunner::run_invariant_test has cyclomatic complexity 101 (threshold 15). To reduce it, separate the cases: extract each independent 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:3267 — 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 39) crates/forge/src/runner.rs:2648 — FunctionRunner::replay_symbolic_artifact 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.
  • FunctionRunner::replay_persisted_handler_failures (cyclomatic 24) crates/forge/src/runner.rs:1679 — FunctionRunner::replay_persisted_handler_failures 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.
  • FunctionRunner::import_symbolic_invariant_frontiers (cyclomatic 23) crates/forge/src/runner.rs:2225 — 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::import_symbolic_fuzz_frontiers (cyclomatic 20) crates/forge/src/runner.rs:2072 — 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::run_fuzz_test (cyclomatic 20) crates/forge/src/runner.rs:5002 — FunctionRunner::run_fuzz_test 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.
  • FunctionRunner::replay_invariant_checkpoints (cyclomatic 18) crates/forge/src/runner.rs:3084 — 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.
D2 · Cognitive Complexity · foundry_evm · ×8
  • 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:271 — 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:401 — 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:1797 — 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:774 — 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::invariant::shrink::check_sequence_value (cognitive 18) crates/evm/evm/src/executors/invariant/shrink.rs:1150 — foundry_evm::executors::invariant::shrink::check_sequence_value has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, 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.
D17 · Explicit Debt · FixmeComment · ×7
  • 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:2113 — // 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.
D2 · Cognitive Complexity · cast · ×7
  • cast::args::run_command (cognitive 208) crates/cast/src/args.rs:132 — cast::args::run_command has cognitive complexity 208 (threshold 15). Drivers by points: if/else 80 (147 pts), match/switch 18 (37 pts), loops 6 (17 pts), boolean chains 7 (nesting depth added 97). 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 30) crates/cast/src/cmd/wallet/mod.rs:917 — cast::cmd::wallet::new_keystores has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 3 (6 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.
  • cast::cmd::keychain::check_expiring_nonce_window (cognitive 24) crates/cast/src/cmd/keychain.rs:2263 — 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::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::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::debug::handle_traces (cognitive 19) crates/cast/src/debug.rs:59 — cast::debug::handle_traces has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 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.
  • 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.
D2 · Cognitive Complexity · Cheatcodes · ×7
  • Cheatcodes::check_mem_opcodes (cognitive 115) crates/cheatcodes/src/inspector.rs:3456 — Cheatcodes::check_mem_opcodes has cognitive complexity 115 (threshold 15). Drivers by points: if/else 26 (58 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:1238 — Cheatcodes::call_with_executor has cognitive complexity 108 (threshold 15). Drivers by points: if/else 38 (91 pts), match/switch 5 (12 pts), boolean chains 5 (nesting depth added 60). 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 (cognitive 93) crates/cheatcodes/src/inspector.rs:2225 — Cheatcodes::call_end has cognitive complexity 93 (threshold 15). Drivers by points: if/else 34 (74 pts), boolean chains 11, match/switch 2 (8 pts) (nesting depth added 46). 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 (cognitive 39) crates/cheatcodes/src/inspector.rs:2650 — Cheatcodes::create_end has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 7, 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::step (cognitive 29) crates/cheatcodes/src/inspector.rs:1976 — Cheatcodes::step has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 4, match/switch 1 (3 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, 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 (cognitive 23) crates/cheatcodes/src/inspector.rs:2108 — Cheatcodes::step_end has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (21 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.
  • Cheatcodes::create (cognitive 21) crates/cheatcodes/src/inspector.rs:2517 — Cheatcodes::create has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TUIContext · ×7
  • TUIContext::horizontal_layout (cognitive 40) crates/debugger/src/tui/draw.rs:173 — TUIContext::horizontal_layout has cognitive complexity 40 (threshold 15). Drivers by points: if/else 25 (37 pts), boolean chains 2, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • TUIContext::draw_buffer (cognitive 39) crates/debugger/src/tui/draw.rs:686 — TUIContext::draw_buffer has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 3, loops 1 (2 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.
  • TUIContext::src_text (cognitive 30) crates/debugger/src/tui/draw.rs:378 — TUIContext::src_text has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (19 pts), loops 6 (9 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.
  • TUIContext::run_command_from_input (cognitive 27) crates/debugger/src/tui/context.rs:714 — TUIContext::run_command_from_input has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21 (26 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.
  • TUIContext::handle_key_event (cognitive 25) crates/debugger/src/tui/context.rs:319 — TUIContext::handle_key_event has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 1, 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.
  • TUIContext::vertical_layout (cognitive 25) crates/debugger/src/tui/draw.rs:99 — TUIContext::vertical_layout has cognitive complexity 25 (threshold 15). Drivers by points: if/else 24 (25 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.
  • TUIContext::find_active_internal_call (cognitive 17) crates/debugger/src/tui/draw.rs:998 — TUIContext::find_active_internal_call has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×7
  • Duplicated block (12 lines × 2) crates/anvil/src/eth/backend/mem/mod.rs:7183 — crates/anvil/src/eth/backend/mem/mod.rs:7183-7194 | crates/anvil/src/eth/backend/mem/mod.rs:7262-7273 — both copies are in the same file, so extract the 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/cheatcodes/src/inspector.rs:1266 — crates/cheatcodes/src/inspector.rs:1266-1277 | crates/cheatcodes/src/inspector.rs:1568-1579 — both copies are in the same file, so extract the 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/evm/symbolic/src/executor/calls.rs:445 — crates/evm/symbolic/src/executor/calls.rs:445-456 | crates/evm/symbolic/src/executor/calls.rs:459-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.
  • Duplicated block (12 lines × 2) crates/evm/symbolic/src/runtime/memory.rs:708 — crates/evm/symbolic/src/runtime/memory.rs:708-719 | crates/evm/symbolic/src/runtime/memory.rs:733-744 — both copies are in the same file, so extract the 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/lint/src/sol/high/arbitrary_send_erc20.rs:558 — crates/lint/src/sol/high/arbitrary_send_erc20.rs:558-569 | crates/lint/src/sol/high/arbitrary_send_eth.rs:283-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 113 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 (12 lines × 2) crates/verify/src/bytecode.rs:614 — crates/verify/src/bytecode.rs:614-625 | crates/verify/src/bytecode.rs:955-969 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/debugger/src/op.rs:154 — crates/debugger/src/op.rs:154-165 | crates/debugger/src/op.rs:276-287 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D1 · Cyclomatic Complexity · forge_doc · ×6
  • 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.
D1 · Cyclomatic Complexity · foundry_cheatcodes · ×6
  • foundry_cheatcodes::evm::get_recorded_state_diffs (cyclomatic 39) crates/cheatcodes/src/evm.rs:2261 — foundry_cheatcodes::evm::get_recorded_state_diffs 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_cheatcodes::fs::get_artifact_source (cyclomatic 34) crates/cheatcodes/src/fs.rs:672 — 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:509 — 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.
D1 · Cyclomatic Complexity · TUIContext · ×6
  • TUIContext::handle_key_event (cyclomatic 38) crates/debugger/src/tui/context.rs:319 — TUIContext::handle_key_event 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.
  • TUIContext::horizontal_layout (cyclomatic 26) crates/debugger/src/tui/draw.rs:173 — TUIContext::horizontal_layout 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.
  • TUIContext::draw_buffer (cyclomatic 23) crates/debugger/src/tui/draw.rs:686 — TUIContext::draw_buffer 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.
  • TUIContext::run_command_from_input (cyclomatic 21) crates/debugger/src/tui/context.rs:714 — TUIContext::run_command_from_input 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.
  • TUIContext::vertical_layout (cyclomatic 19) crates/debugger/src/tui/draw.rs:99 — TUIContext::vertical_layout 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.
  • TUIContext::src_text (cyclomatic 19) crates/debugger/src/tui/draw.rs:378 — TUIContext::src_text has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · forge_lint · ×6
  • 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.
D2 · Cognitive Complexity · forge_lint · ×6
  • 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.
D5 · Coupling · Off the main sequence · ×6
  • 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.
D1 · Cyclomatic Complexity · Cheatcodes · ×5
  • Cheatcodes::check_mem_opcodes (cyclomatic 104) crates/cheatcodes/src/inspector.rs:3456 — Cheatcodes::check_mem_opcodes has cyclomatic complexity 104 (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 48) crates/cheatcodes/src/inspector.rs:1238 — Cheatcodes::call_with_executor has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Cheatcodes::call_end (cyclomatic 48) crates/cheatcodes/src/inspector.rs:2225 — Cheatcodes::call_end has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Cheatcodes::step (cyclomatic 24) crates/cheatcodes/src/inspector.rs:1976 — Cheatcodes::step 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.
  • Cheatcodes::create_end (cyclomatic 24) crates/cheatcodes/src/inspector.rs:2650 — Cheatcodes::create_end has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · foundry_evm · ×5
  • 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:401 — 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:271 — 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.
D1 · Cyclomatic Complexity · foundry_evm_symbolic · ×5
  • 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::precompiles::execute_symbolic_precompile (cyclomatic 28) crates/evm/symbolic/src/runtime/precompiles.rs:53 — foundry_evm_symbolic::runtime::precompiles::execute_symbolic_precompile 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::run_solver_commands (cyclomatic 28) crates/evm/symbolic/src/runtime/solver/mod.rs:1075 — 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::fallback::seed_bounded_support_vars (cyclomatic 21) crates/evm/symbolic/src/runtime/solver/fallback/mod.rs:559 — 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::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.
D2 · Cognitive Complexity · CallTraceDecoder · ×5
  • CallTraceDecoder::decode_cheatcode_inputs (cognitive 47) crates/evm/traces/src/decoder/mod.rs:1254 — CallTraceDecoder::decode_cheatcode_inputs has cognitive complexity 47 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 8, match/switch 3 (5 pts) (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.
  • CallTraceDecoder::decode_function (cognitive 41) crates/evm/traces/src/decoder/mod.rs:1061 — 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 38) crates/evm/traces/src/decoder/mod.rs:978 — CallTraceDecoder::populate_traces has cognitive complexity 38 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 4 (10 pts), match/switch 1 (6 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.
  • CallTraceDecoder::collect_abi (cognitive 19) crates/evm/traces/src/decoder/mod.rs:933 — 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:1564 — 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.
D2 · Cognitive Complexity · WorkerCorpus · ×5
  • WorkerCorpus::export_to_workers (cognitive 33) crates/evm/evm/src/executors/corpus.rs:1540 — 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:1405 — 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:1193 — 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:1328 — 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:997 — 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 · Duplicated block (13 lines × 2) · ×5
  • Duplicated block (13 lines × 2) crates/anvil/src/eth/backend/mem/mod.rs:3147 — crates/anvil/src/eth/backend/mem/mod.rs:3147-3159 | crates/anvil/src/eth/backend/mem/mod.rs:6158-6170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/evm/symbolic/src/executor/calls.rs:1275 — crates/evm/symbolic/src/executor/calls.rs:1275-1287 | crates/evm/symbolic/src/executor/calls.rs:1332-1344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1785 — crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1785-1797 | crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1820-1832 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/linking/src/lib.rs:883 — crates/linking/src/lib.rs:883-895 | crates/linking/src/lib.rs:980-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 (13 lines × 2) crates/script/src/execute.rs:399 — crates/script/src/execute.rs:399-411 | crates/script/src/execute.rs:552-564 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×5
  • Duplicated block (11 lines × 2) crates/anvil/src/eth/api.rs:3482 — crates/anvil/src/eth/api.rs:3482-3492 | crates/anvil/src/eth/api.rs:4953-4963 — both copies are in the same file, so extract the 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/cast/src/cmd/access_list.rs:74 — crates/cast/src/cmd/access_list.rs:74-84 | crates/cast/src/cmd/estimate.rs:98-108 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) crates/cheatcodes/src/inspector.rs:3350 — crates/cheatcodes/src/inspector.rs:3350-3360 | crates/cheatcodes/src/inspector.rs:3376-3386 — both copies are in the same file, so extract the 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/evm/src/executors/mod.rs:861 — crates/evm/evm/src/executors/mod.rs:861-871 | crates/evm/evm/src/executors/mod.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/symbolic/src/executor/opcodes.rs:676 — crates/evm/symbolic/src/executor/opcodes.rs:676-686 | crates/evm/symbolic/src/executor/opcodes.rs:778-788 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D1 · Cyclomatic Complexity · SymExpr · ×4
  • SymExpr::binop (cyclomatic 78) crates/evm/symbolic/src/runtime/expr/expr.rs:425 — SymExpr::binop has cyclomatic complexity 78 (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 21) crates/evm/symbolic/src/runtime/expr/expr.rs:1539 — SymExpr::unsigned_bits_cached 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.
  • SymExpr::known_byte (cyclomatic 19) crates/evm/symbolic/src/runtime/expr/expr.rs:1466 — 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:1651 — 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.
D1 · Cyclomatic Complexity · InspectorStackRefMut · ×4
  • InspectorStackRefMut::call (cyclomatic 30) REDACTED:1761 — InspectorStackRefMut::call 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.
  • InspectorStackRefMut::transact_inner (cyclomatic 21) REDACTED:1051 — InspectorStackRefMut::transact_inner 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.
  • InspectorStackRefMut::step_inlined (cyclomatic 17) REDACTED:1377 — InspectorStackRefMut::step_inlined 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.
  • InspectorStackRefMut::create (cyclomatic 16) REDACTED:1990 — InspectorStackRefMut::create has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ConstraintContext · ×4
  • ConstraintContext::upper_bound_constraint (cyclomatic 21) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:1119 — 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_bool (cyclomatic 20) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:623 — ConstraintContext::normalize_bool 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.
  • ConstraintContext::normalize_word (cyclomatic 19) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:755 — ConstraintContext::normalize_word 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.
  • ConstraintContext::normalize_signed_add_comparison (cyclomatic 18) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:846 — 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.
D2 · Cognitive Complexity · Checker · ×4
  • 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.
D2 · Cognitive Complexity · SymExpr · ×4
  • SymExpr::binop (cognitive 50) crates/evm/symbolic/src/runtime/expr/expr.rs:425 — SymExpr::binop has cognitive complexity 50 (threshold 15). Drivers by points: match/switch 12 (23 pts), if/else 15 (22 pts), boolean chains 5 (nesting depth added 18). 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:1466 — 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::byte_term (cognitive 23) crates/evm/symbolic/src/runtime/expr/expr.rs:1651 — 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.
  • SymExpr::unsigned_bits_cached (cognitive 18) crates/evm/symbolic/src/runtime/expr/expr.rs:1539 — SymExpr::unsigned_bits_cached has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · forge_script · ×4
  • forge_script::verify::verify_contracts (cognitive 49) crates/script/src/verify.rs:420 — forge_script::verify::verify_contracts has cognitive complexity 49 (threshold 15). Drivers by points: if/else 8 (22 pts), match/switch 4 (16 pts), loops 3 (7 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_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:1900 — 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::verify::external_job (cognitive 20) crates/script/src/verify.rs:275 — 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.
D2 · Cognitive Complexity · InspectorStackRefMut · ×4
  • InspectorStackRefMut::call (cognitive 46) REDACTED:1761 — InspectorStackRefMut::call has cognitive complexity 46 (threshold 15). Drivers by points: if/else 19 (30 pts), loops 2 (7 pts), boolean chains 5, 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.
  • InspectorStackRefMut::transact_inner (cognitive 23) REDACTED:1051 — InspectorStackRefMut::transact_inner has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17 (18 pts), match/switch 2 (3 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.
  • InspectorStackRefMut::step_inlined (cognitive 21) REDACTED:1377 — InspectorStackRefMut::step_inlined has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, 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.
  • InspectorStackRefMut::create (cognitive 19) REDACTED:1990 — InspectorStackRefMut::create has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (16 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.
D2 · Cognitive Complexity · PreSimulationState · ×4
  • PreSimulationState::show_traces (cognitive 35) crates/script/src/execute.rs:509 — 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::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.
  • PreSimulationState::collect_simulation_results (cognitive 24) crates/script/src/simulate.rs:256 — PreSimulationState::collect_simulation_results has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · foundry_evm_traces · ×4
  • foundry_evm_traces::trace_arena_at_depth (cognitive 25) crates/evm/traces/src/lib.rs:325 — 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::debug::sources::collect_stmt_locals (cognitive 24) crates/evm/traces/src/debug/sources.rs:236 — foundry_evm_traces::debug::sources::collect_stmt_locals has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (7 pts), 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.
  • foundry_evm_traces::render_trace_arena_inner (cognitive 21) crates/evm/traces/src/lib.rs:386 — 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.
D2 · Cognitive Complexity · ConstraintContext · ×4
  • ConstraintContext::normalize_word (cognitive 23) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:755 — ConstraintContext::normalize_word has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 7 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ConstraintContext::bounded_bool_value (cognitive 21) crates/evm/symbolic/src/runtime/solver/normalize/mod.rs:805 — 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:846 — 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:1119 — 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.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×4
  • Duplicated block (6 lines × 3) crates/evm/symbolic/src/runtime/expr/bool.rs:402 — crates/evm/symbolic/src/runtime/expr/bool.rs:402-407 | 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.
  • Duplicated block (6 lines × 3) crates/config/src/endpoints.rs:129 — crates/config/src/endpoints.rs:129-134 | crates/config/src/endpoints.rs:201-206 | crates/config/src/etherscan.rs:409-414 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (6 lines × 3) crates/config/src/endpoints.rs:167 — crates/config/src/endpoints.rs:167-172 | crates/config/src/endpoints.rs:231-236 | crates/config/src/etherscan.rs:430-435 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (6 lines × 3) crates/evm/symbolic/src/runtime/expr/bool.rs:754 — crates/evm/symbolic/src/runtime/expr/bool.rs:754-759 | crates/evm/symbolic/src/runtime/expr/bool.rs:761-766 | crates/evm/symbolic/src/runtime/expr/expr.rs:1459-1464 — 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.
D1 · Cyclomatic Complexity · cast · ×3
  • cast::args::run_command (cyclomatic 210) crates/cast/src/args.rs:132 — cast::args::run_command has cyclomatic complexity 210 (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:2263 — 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::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.
D1 · Cyclomatic Complexity · EthApi · ×3
  • EthApi::execute (cyclomatic 191) crates/anvil/src/eth/api.rs:2154 — 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::do_estimate_gas_with_state (cyclomatic 30) crates/anvil/src/eth/api.rs:1916 — EthApi::do_estimate_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:1333 — 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.
D1 · Cyclomatic Complexity · Checker · ×3
  • 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.
D1 · Cyclomatic Complexity · EntryAnalyzer · ×3
  • EntryAnalyzer::analyze_expr (cyclomatic 32) crates/lint/src/sol/high/protected_vars.rs:741 — 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 28) crates/lint/src/sol/high/protected_vars.rs:567 — EntryAnalyzer::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.
  • EntryAnalyzer::collect_slot_roots (cyclomatic 21) crates/lint/src/sol/high/protected_vars.rs:1116 — 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.
D1 · Cyclomatic Complexity · PreSimulationState · ×3
  • 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:509 — 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.
D17 · Explicit Debt · HackComment · ×3
  • HackComment crates/script/src/runner.rs:221 — // 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:831 — // 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:355 — // 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.
D2 · Cognitive Complexity · CallArgs · ×3
  • CallArgs::run_with_network_and_opts (cognitive 110) crates/cast/src/cmd/call.rs:403 — CallArgs::run_with_network_and_opts has cognitive complexity 110 (threshold 15). Drivers by points: if/else 46 (84 pts), match/switch 8 (14 pts), boolean chains 9, loops 1 (3 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent 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 16) crates/cast/src/cmd/call.rs:244 — CallArgs::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 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:814 — 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.
D2 · Cognitive Complexity · WarningsProvider · ×3
  • WarningsProvider::collect_nested_section_warnings (cognitive 49) crates/config/src/providers/warnings.rs:305 — WarningsProvider::collect_nested_section_warnings has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (35 pts), loops 4 (12 pts), boolean chains 2 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • WarningsProvider::collect_warnings (cognitive 23) crates/config/src/providers/warnings.rs:154 — 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 21) crates/config/src/providers/warnings.rs:248 — WarningsProvider::collect_standalone_section_warnings has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 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.
D2 · Cognitive Complexity · anvil · ×3
  • anvil::eth::backend::executor::execute_pool_transactions (cognitive 40) crates/anvil/src/eth/backend/executor.rs:609 — anvil::eth::backend::executor::execute_pool_transactions has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 5 (12 pts), boolean chains 3, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • anvil::try_spawn (cognitive 20) crates/anvil/src/lib.rs:142 — anvil::try_spawn has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (18 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::mem::commit_cache (cognitive 16) crates/anvil/src/eth/backend/mem/mod.rs:10667 — anvil::eth::backend::mem::commit_cache has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · foundry_common · ×3
  • foundry_common::preprocessor::deps::remove_bytecode_dependencies (cognitive 36) crates/common/src/preprocessor/deps.rs:864 — 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::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.
D2 · Cognitive Complexity · CoverageArgs · ×3
  • CoverageArgs::collect (cognitive 35) crates/forge/src/cmd/coverage.rs:544 — 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:255 — 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:447 — 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.
D2 · Cognitive Complexity · NodeConfig · ×3
  • NodeConfig::setup_fork_db_config_with_replay (cognitive 33) crates/anvil/src/config.rs:2061 — NodeConfig::setup_fork_db_config_with_replay has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (27 pts), boolean chains 5, loops 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.
  • NodeConfig::setup (cognitive 21) crates/anvil/src/config.rs:1535 — 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:401 — 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.
D2 · Cognitive Complexity · SymBytes · ×3
  • SymBytes::append_concrete_range (cognitive 33) crates/evm/symbolic/src/runtime/bytes.rs:528 — 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 27) crates/evm/symbolic/src/runtime/bytes.rs:201 — SymBytes::slice_concrete has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 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:127 — 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.
D2 · Cognitive Complexity · EntryAnalyzer · ×3
  • EntryAnalyzer::analyze_expr (cognitive 32) crates/lint/src/sol/high/protected_vars.rs:741 — 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 27) crates/lint/src/sol/high/protected_vars.rs:567 — EntryAnalyzer::analyze_stmt has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • EntryAnalyzer::collect_slot_roots (cognitive 18) crates/lint/src/sol/high/protected_vars.rs:1116 — 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.
D2 · Cognitive Complexity · DelegateTargetCollector · ×3
  • 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.
D2 · Cognitive Complexity · ScriptArgs · ×3
  • ScriptArgs::run_script (cognitive 23) crates/script/src/lib.rs:425 — ScriptArgs::run_script has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ScriptArgs::check_contract_sizes (cognitive 23) crates/script/src/lib.rs:770 — ScriptArgs::check_contract_sizes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3, 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.
  • ScriptArgs::prepare_script (cognitive 20) crates/script/src/lib.rs:559 — 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×3
  • Change-coupling hub: send.rs → access_list.rs, batch_mktx.rs, estimate.rs, mktx.rs, tests.rs crates/cast/src/cmd/send.rs — `crates/cast/src/cmd/send.rs` changes together with 5 other files — `crates/cast/src/cmd/access_list.rs`, `crates/cast/src/cmd/batch_mktx.rs`, `crates/cast/src/cmd/estimate.rs`, `crates/cast/src/cmd/mktx.rs`, `crates/common/src/tempo/tests.rs` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 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 5.
  • Change-coupling hub: mod.rs → executor.rs, trace.rs, lib.rs crates/evm/core/src/fork/mod.rs — `crates/evm/core/src/fork/mod.rs` changes together with 3 other files — `crates/chisel/src/executor.rs`, `crates/evm/evm/src/executors/trace.rs`, `crates/script/src/lib.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 → erc20.rs, keychain.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/erc20.rs`, `crates/cast/src/cmd/keychain.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 · Duplicated block (17 lines × 2) · ×3
  • Duplicated block (17 lines × 2) crates/evm/symbolic/src/abi.rs:444 — crates/evm/symbolic/src/abi.rs:444-460 | crates/evm/symbolic/src/abi.rs:472-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.
  • Duplicated block (17 lines × 2) crates/evm/symbolic/src/executor/calls.rs:1257 — crates/evm/symbolic/src/executor/calls.rs:1257-1273 | crates/evm/symbolic/src/executor/calls.rs:1315-1331 — both copies are in the same file, so extract the 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/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 113 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.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×3
  • Duplicated block (14–15 lines × 2) crates/config/src/providers/warnings.rs:327 — crates/config/src/providers/warnings.rs:327-340 | crates/config/src/providers/warnings.rs:363-377 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14–15 lines × 2) crates/evm/symbolic/src/executor/calls.rs:252 — crates/evm/symbolic/src/executor/calls.rs:252-265 | crates/evm/symbolic/src/executor/calls.rs:408-422 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14–15 lines × 2) crates/evm/symbolic/src/executor/invariant.rs:146 — crates/evm/symbolic/src/executor/invariant.rs:146-159 | crates/evm/symbolic/src/executor/invariant.rs:182-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×3
  • Duplicated block (14 lines × 2) crates/anvil/src/eth/backend/mem/mod.rs:4792 — crates/anvil/src/eth/backend/mem/mod.rs:4792-4805 | crates/anvil/src/eth/backend/mem/mod.rs:5019-5032 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/config/src/providers/warnings.rs:281 — crates/config/src/providers/warnings.rs:281-294 | crates/config/src/providers/warnings.rs:357-370 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) 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 113 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.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×3
  • Duplicated block (11–12 lines × 2) crates/anvil/src/eth/backend/mem/mod.rs:6036 — crates/anvil/src/eth/backend/mem/mod.rs:6036-6046 | crates/anvil/src/eth/backend/mem/mod.rs:6575-6586 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11–12 lines × 2) crates/evm/symbolic/src/executor/calls.rs:25 — crates/evm/symbolic/src/executor/calls.rs:25-36 | crates/evm/symbolic/src/executor/opcodes.rs:1165-1175 — 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/evm/fuzz/src/sequence.rs:372 — crates/evm/fuzz/src/sequence.rs:372-382 | crates/evm/fuzz/src/sequence.rs:404-415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×3
  • Duplicated block (8 lines × 3) crates/evm/symbolic/src/runtime/expr/expr.rs:428 — crates/evm/symbolic/src/runtime/expr/expr.rs:428-435 | crates/evm/symbolic/src/runtime/expr/expr.rs:607-614 | crates/evm/symbolic/src/runtime/expr/expr.rs:626-633 — 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 113 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) crates/debugger/src/tui/draw.rs:280 — crates/debugger/src/tui/draw.rs:280-287 | crates/debugger/src/tui/draw.rs:293-300 | crates/debugger/src/tui/draw.rs:306-313 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×3
  • Duplicated block (5 lines × 3) crates/evm/symbolic/src/executor/opcodes.rs:804 — crates/evm/symbolic/src/executor/opcodes.rs:804-808 | crates/evm/symbolic/src/executor/opcodes.rs:1163-1167 | crates/evm/symbolic/src/executor/opcodes.rs:1333-1337 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/evm/symbolic/src/runtime/expr/bool.rs:175 — crates/evm/symbolic/src/runtime/expr/bool.rs:175-179 | crates/evm/symbolic/src/runtime/expr/bool.rs:190-194 | crates/evm/symbolic/src/runtime/expr/bool.rs:235-239 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/fmt/src/state/sol.rs:733 — crates/fmt/src/state/sol.rs:733-737 | crates/fmt/src/state/sol.rs:2488-2492 | crates/fmt/src/state/sol.rs:2549-2553 — 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.
D1 · Cyclomatic Complexity · BundledState · ×2
  • BundledState::broadcast (cyclomatic 66) crates/script/src/broadcast.rs:665 — BundledState::broadcast has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • BundledState::broadcast_batch (cyclomatic 53) crates/script/src/broadcast.rs:1265 — BundledState::broadcast_batch 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.
D1 · Cyclomatic Complexity · CallArgs · ×2
  • CallArgs::run_with_network_and_opts (cyclomatic 59) crates/cast/src/cmd/call.rs:403 — CallArgs::run_with_network_and_opts has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • CallArgs::run (cyclomatic 19) crates/cast/src/cmd/call.rs:244 — CallArgs::run has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · anvil · ×2
  • anvil::eth::error::blockchain_error_to_rpc_result (cyclomatic 57) crates/anvil/src/eth/error/mod.rs:489 — anvil::eth::error::blockchain_error_to_rpc_result has cyclomatic complexity 57 (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::eth::backend::executor::execute_pool_transactions (cyclomatic 25) crates/anvil/src/eth/backend/executor.rs:609 — anvil::eth::backend::executor::execute_pool_transactions has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SymBoolExpr · ×2
  • SymBoolExpr::cmp (cyclomatic 45) crates/evm/symbolic/src/runtime/expr/bool.rs:73 — SymBoolExpr::cmp has cyclomatic complexity 45 (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:507 — 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.
D1 · Cyclomatic Complexity · ContractRunner · ×2
  • ContractRunner::run_tests (cyclomatic 39) crates/forge/src/runner.rs:835 — ContractRunner::run_tests has cyclomatic complexity 39 (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 24) crates/forge/src/runner.rs:540 — ContractRunner::_setup has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CallTraceDecoder · ×2
  • CallTraceDecoder::decode_cheatcode_inputs (cyclomatic 36) crates/evm/traces/src/decoder/mod.rs:1254 — CallTraceDecoder::decode_cheatcode_inputs 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.
  • CallTraceDecoder::decode_function (cyclomatic 23) crates/evm/traces/src/decoder/mod.rs:1061 — 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.
D1 · Cyclomatic Complexity · NodeConfig · ×2
  • NodeConfig::setup_fork_db_config_with_replay (cyclomatic 25) crates/anvil/src/config.rs:2061 — NodeConfig::setup_fork_db_config_with_replay 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.
  • NodeConfig::setup (cyclomatic 16) crates/anvil/src/config.rs:1535 — 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.
D1 · Cyclomatic Complexity · SmtLibSubprocessSolver · ×2
  • SmtLibSubprocessSolver::is_sat_inner (cyclomatic 25) crates/evm/symbolic/src/runtime/solver/mod.rs:397 — SmtLibSubprocessSolver::is_sat_inner 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.
  • SmtLibSubprocessSolver::model (cyclomatic 21) crates/evm/symbolic/src/runtime/solver/mod.rs:267 — SmtLibSubprocessSolver::model has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · VerifyArgs · ×2
  • 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 19) crates/verify/src/verify.rs:810 — VerifyArgs::resolve_context has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · foundry_cli_markdown · ×2
  • 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.
D1 · Cyclomatic Complexity · SymBytes · ×2
  • SymBytes::slice_concrete (cyclomatic 19) crates/evm/symbolic/src/runtime/bytes.rs:201 — SymBytes::slice_concrete 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.
  • SymBytes::append_concrete_range (cyclomatic 19) crates/evm/symbolic/src/runtime/bytes.rs:528 — 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.
D1 · Cyclomatic Complexity · foundry_common · ×2
  • 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.
D1 · Cyclomatic Complexity · foundry_evm_traces · ×2
  • foundry_evm_traces::debug::sources::collect_stmt_locals (cyclomatic 17) crates/evm/traces/src/debug/sources.rs:236 — foundry_evm_traces::debug::sources::collect_stmt_locals 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.
  • 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.
D2 · Cognitive Complexity · InvariantExecutor · ×2
  • InvariantExecutor::run_invariant_worker (cognitive 192) crates/evm/evm/src/executors/invariant/mod.rs:1084 — InvariantExecutor::run_invariant_worker has cognitive complexity 192 (threshold 15). Drivers by points: if/else 63 (163 pts), boolean chains 17, match/switch 2 (7 pts), loops 3 (5 pts) (nesting depth added 107). 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:874 — 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.
D2 · Cognitive Complexity · BundledState · ×2
  • BundledState::broadcast (cognitive 173) crates/script/src/broadcast.rs:665 — BundledState::broadcast has cognitive complexity 173 (threshold 15). Drivers by points: if/else 46 (129 pts), loops 7 (21 pts), boolean chains 14, match/switch 3 (9 pts) (nesting depth added 103). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • BundledState::broadcast_batch (cognitive 70) crates/script/src/broadcast.rs:1265 — BundledState::broadcast_batch has cognitive complexity 70 (threshold 15). Drivers by points: if/else 39 (52 pts), match/switch 6 (9 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DependencyInstallOpts · ×2
  • 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.
D2 · Cognitive Complexity · ContractRunner · ×2
  • ContractRunner::run_tests (cognitive 53) crates/forge/src/runner.rs:835 — ContractRunner::run_tests has cognitive complexity 53 (threshold 15). Drivers by points: if/else 31 (41 pts), boolean chains 8, loops 2, match/switch 1 (2 pts) (nesting depth added 11). 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.
  • ContractRunner::_setup (cognitive 48) crates/forge/src/runner.rs:540 — ContractRunner::_setup has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (39 pts), loops 3 (5 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · RemappingsProvider · ×2
  • RemappingsProvider::get_remappings (cognitive 51) crates/config/src/providers/remappings.rs:206 — RemappingsProvider::get_remappings has cognitive complexity 51 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 8 (15 pts), boolean chains 6, match/switch 1 (nesting depth added 24). Of this number, 48 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • RemappingsProvider::find_nested_foundry_remappings (cognitive 27) crates/config/src/providers/remappings.rs:431 — RemappingsProvider::find_nested_foundry_remappings has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (4 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · VerifyArgs · ×2
  • VerifyArgs::resolve_context (cognitive 36) crates/verify/src/verify.rs:810 — VerifyArgs::resolve_context has cognitive complexity 36 (threshold 15). Drivers by points: if/else 22 (35 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.
  • 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.
D2 · Cognitive Complexity · CommentGatherer · ×2
  • CommentGatherer::split_block_comment_into_lines (cognitive 33) crates/common/src/comments/mod.rs:308 — CommentGatherer::split_block_comment_into_lines has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (29 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 29) crates/common/src/comments/mod.rs:210 — CommentGatherer::process_token has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 1 (3 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · foundry_cli_markdown · ×2
  • 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.
D2 · Cognitive Complexity · SymBoolExpr · ×2
  • SymBoolExpr::cmp (cognitive 32) crates/evm/symbolic/src/runtime/expr/bool.rs:73 — SymBoolExpr::cmp has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 8 (15 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.
  • SymBoolExpr::upper_bound_usize (cognitive 21) crates/evm/symbolic/src/runtime/expr/bool.rs:569 — SymBoolExpr::upper_bound_usize has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 5 (9 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Cx · ×2
  • 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:753 — 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.
D2 · Cognitive Complexity · FilledTransactionsState · ×2
  • FilledTransactionsState::bundle (cognitive 29) crates/script/src/simulate.rs:641 — FilledTransactionsState::bundle has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (22 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:836 — 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.
D2 · Cognitive Complexity · ReadyTransactions · ×2
  • ReadyTransactions::prune_tags (cognitive 28) crates/anvil/src/eth/pool/transactions.rs:564 — 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:633 — 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.
D2 · Cognitive Complexity · SlotIdentifier · ×2
  • SlotIdentifier::handle_struct (cognitive 28) crates/common/src/slot_identifier.rs:591 — 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::identify (cognitive 23) crates/common/src/slot_identifier.rs:399 — SlotIdentifier::identify has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (19 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.
D2 · Cognitive Complexity · SmtLibSubprocessSolver · ×2
  • SmtLibSubprocessSolver::is_sat_inner (cognitive 28) crates/evm/symbolic/src/runtime/solver/mod.rs:397 — SmtLibSubprocessSolver::is_sat_inner has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 4, match/switch 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.
  • SmtLibSubprocessSolver::model (cognitive 21) crates/evm/symbolic/src/runtime/solver/mod.rs:267 — SmtLibSubprocessSolver::model has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 3, match/switch 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ExternalIdentifier · ×2
  • ExternalIdentifier::get_abis (cognitive 24) crates/evm/traces/src/identifier/external.rs:324 — 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:426 — 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.
D2 · Cognitive Complexity · BindJsonArgs · ×2
  • 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.
D2 · Cognitive Complexity · WriteAnalyzer · ×2
  • 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.
D2 · Cognitive Complexity · Git · ×2
  • Git::submodules_in_worktree (cognitive 21) crates/cli/src/utils/mod.rs:848 — 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:955 — 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.
D2 · Cognitive Complexity · SymMemory · ×2
  • SymMemory::byte_dynamic_with_delta_and_bounds (cognitive 20) crates/evm/symbolic/src/runtime/memory.rs:505 — 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:367 — 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.
D2 · Cognitive Complexity · Config · ×2
  • Config::restrictions (cognitive 18) crates/config/src/lib.rs:1352 — 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:2630 — 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.
D2 · Cognitive Complexity · RawCallResult · ×2
  • RawCallResult::merge_sancov_coverage (cognitive 18) crates/evm/evm/src/executors/mod.rs:1626 — 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.
  • RawCallResult::merge_edge_coverage (cognitive 16) crates/evm/evm/src/executors/mod.rs:1546 — RawCallResult::merge_edge_coverage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (6 pts), 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.
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×2
  • Duplicated block (19 lines × 2) crates/cheatcodes/src/inspector.rs:2260 — crates/cheatcodes/src/inspector.rs:2260-2278 | crates/cheatcodes/src/inspector.rs:2670-2688 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (19 lines × 2) crates/fmt/src/state/mod.rs:1030 — crates/fmt/src/state/mod.rs:1030-1048 | crates/fmt/src/state/mod.rs:1064-1082 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×2
  • Duplicated block (15 lines × 2) crates/evm/symbolic/src/executor/calls.rs:57 — crates/evm/symbolic/src/executor/calls.rs:57-71 | crates/evm/symbolic/src/executor/calls.rs:77-91 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/cheatcodes/src/crypto.rs:687 — crates/cheatcodes/src/crypto.rs:687-701 | 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.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×2
  • Duplicated block (6 lines × 4) crates/evm/symbolic/src/executor/opcodes.rs:717 — crates/evm/symbolic/src/executor/opcodes.rs:717-722 | crates/evm/symbolic/src/executor/opcodes.rs:770-775 | crates/evm/symbolic/src/executor/opcodes.rs:814-819 | crates/evm/symbolic/src/executor/opcodes.rs:1173-1178 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 4) crates/evm/symbolic/src/runtime/expr/expr.rs:476 — crates/evm/symbolic/src/runtime/expr/expr.rs:476-481 | crates/evm/symbolic/src/runtime/expr/expr.rs:659-664 | crates/evm/symbolic/src/runtime/expr/expr.rs:672-677 | crates/evm/symbolic/src/runtime/expr/expr.rs:684-689 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×2
  • Duplicated block (5 lines × 5) crates/evm/symbolic/src/executor/opcodes.rs:560 — crates/evm/symbolic/src/executor/opcodes.rs:560-564 | crates/evm/symbolic/src/executor/opcodes.rs:656-660 | crates/evm/symbolic/src/executor/opcodes.rs:712-716 | crates/evm/symbolic/src/executor/opcodes.rs:765-769 | crates/evm/symbolic/src/executor/opcodes.rs:1206-1210 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 5) crates/evm/symbolic/src/executor/opcodes.rs:664 — crates/evm/symbolic/src/executor/opcodes.rs:664-668 | crates/evm/symbolic/src/executor/opcodes.rs:719-723 | crates/evm/symbolic/src/executor/opcodes.rs:772-776 | crates/evm/symbolic/src/executor/opcodes.rs:816-820 | crates/evm/symbolic/src/executor/opcodes.rs:1175-1179 — 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.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×2
  • Outbound HTTP without resilience crates/cast/src/cmd/safe/service.rs:277 — `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.
D1 · Cyclomatic Complexity · WalletSubcommands · ×1
  • WalletSubcommands::run (cyclomatic 81) crates/cast/src/cmd/wallet/mod.rs:386 — WalletSubcommands::run has cyclomatic complexity 81 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InvariantExecutor · ×1
  • InvariantExecutor::run_invariant_worker (cyclomatic 81) crates/evm/evm/src/executors/invariant/mod.rs:1084 — InvariantExecutor::run_invariant_worker has cyclomatic complexity 81 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VerifyBytecodeArgs · ×1
  • VerifyBytecodeArgs::prepare_runtime_verification (cyclomatic 58) crates/verify/src/bytecode.rs:330 — 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.
D1 · Cyclomatic Complexity · FmtArgs · ×1
  • FmtArgs::run (cyclomatic 53) crates/forge/src/cmd/fmt.rs:60 — FmtArgs::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.
D1 · Cyclomatic Complexity · SelectorsSubcommands · ×1
  • 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.
D1 · Cyclomatic Complexity · benchmark_clickhouse.build_rows (cyclomatic 47) · ×1
  • 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.
D1 · Cyclomatic Complexity · ListArgs · ×1
  • ListArgs::run (cyclomatic 38) crates/cast/src/cmd/wallet/list.rs:56 — 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.
D1 · Cyclomatic Complexity · CreateArgs · ×1
  • CreateArgs::deploy (cyclomatic 37) crates/forge/src/cmd/create.rs:445 — CreateArgs::deploy 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.
D1 · Cyclomatic Complexity · UpdateArgs · ×1
  • 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.
D1 · Cyclomatic Complexity · SendTxArgs · ×1
  • SendTxArgs::run_generic_inner (cyclomatic 36) crates/cast/src/cmd/send.rs:193 — SendTxArgs::run_generic_inner has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContractsByArtifact · ×1
  • ContractsByArtifact::find_by_deployed_code_exact_inner (cyclomatic 36) crates/common/src/contracts.rs:312 — ContractsByArtifact::find_by_deployed_code_exact_inner has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · InspectArgs · ×1
  • InspectArgs::run (cyclomatic 36) crates/forge/src/cmd/inspect.rs:60 — InspectArgs::run has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PathState · ×1
  • PathState::expr_upper_bound_usize_cached (cyclomatic 31) crates/evm/symbolic/src/runtime/state.rs:348 — 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.
D1 · Cyclomatic Complexity · GuardWalker · ×1
  • GuardWalker::walk (cyclomatic 31) crates/lint/src/sol/med/unsafe_oz_erc721_mint.rs:1017 — 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.
D1 · Cyclomatic Complexity · ReturnDataObserver · ×1
  • ReturnDataObserver::visit_expr (cyclomatic 30) crates/common/src/preprocessor/deps.rs:1206 — 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.
D1 · Cyclomatic Complexity · RemappingsProvider · ×1
  • RemappingsProvider::get_remappings (cyclomatic 28) crates/config/src/providers/remappings.rs:206 — RemappingsProvider::get_remappings has cyclomatic complexity 28 (threshold 15). 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Cx · ×1
  • 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.
D1 · Cyclomatic Complexity · RecoveryPlan · ×1
  • RecoveryPlan::validate_signed_payloads (cyclomatic 27) crates/script/src/recovery.rs:769 — 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.
D1 · Cyclomatic Complexity · TestResult · ×1
  • TestResult::render (cyclomatic 26) crates/forge/src/result.rs:1404 — 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.
D1 · Cyclomatic Complexity · SessionSource · ×1
  • SessionSource::inspect (cyclomatic 25) crates/chisel/src/executor.rs:134 — SessionSource::inspect has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CoverageArgs · ×1
  • CoverageArgs::build (cyclomatic 25) crates/forge/src/cmd/coverage.rs:255 — 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.
D1 · Cyclomatic Complexity · SolidityLinter · ×1
  • 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.
D1 · Cyclomatic Complexity · PubSubConnection · ×1
  • PubSubConnection::poll (cyclomatic 24) crates/anvil/server/src/pubsub.rs:188 — PubSubConnection::poll has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · MakeTxArgs · ×1
  • MakeTxArgs::run_generic (cyclomatic 24) crates/cast/src/cmd/mktx.rs:128 — MakeTxArgs::run_generic has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DependencyInstallOpts · ×1
  • 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.
D1 · Cyclomatic Complexity · PreprocessorDependencies · ×1
  • 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.
D1 · Cyclomatic Complexity · TxBuilderInner · ×1
  • TxBuilderInner::build (cyclomatic 23) crates/cast/src/tx.rs:651 — 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.
D1 · Cyclomatic Complexity · forge_script · ×1
  • forge_script::verify::verify_contracts (cyclomatic 23) crates/script/src/verify.rs:420 — forge_script::verify::verify_contracts has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ProjectCompiler · ×1
  • ProjectCompiler::handle_output (cyclomatic 22) crates/common/src/compile.rs:416 — 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.
D1 · Cyclomatic Complexity · BytecodeDependencyCollector · ×1
  • BytecodeDependencyCollector::visit_expr (cyclomatic 22) crates/common/src/preprocessor/deps.rs:687 — 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.
D1 · Cyclomatic Complexity · MultiForkHandler · ×1
  • MultiForkHandler::poll (cyclomatic 22) crates/evm/core/src/fork/multi.rs:585 — 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.
D1 · Cyclomatic Complexity · InitArgs · ×1
  • 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.
D1 · Cyclomatic Complexity · BuildOpts · ×1
  • BuildOpts::data (cyclomatic 21) crates/cli/src/opts/build/core.rs:234 — 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.
D1 · Cyclomatic Complexity · WatchArgs · ×1
  • WatchArgs::watchexec_config_inner (cyclomatic 21) crates/forge/src/cmd/watch.rs:160 — WatchArgs::watchexec_config_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.
D1 · Cyclomatic Complexity · MissingInheritance · ×1
  • 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.
D1 · Cyclomatic Complexity · StorageArgs · ×1
  • 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.
D1 · Cyclomatic Complexity · Executor · ×1
  • Executor::transact_with_monad_block_replay (cyclomatic 20) crates/evm/evm/src/executors/mod.rs:191 — Executor::transact_with_monad_block_replay has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ResolveArgs · ×1
  • 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.
D1 · Cyclomatic Complexity · DelegateTargetCollector · ×1
  • 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.
D1 · Cyclomatic Complexity · foundry_common_fmt · ×1
  • 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.
D1 · Cyclomatic Complexity · WarningsProvider · ×1
  • WarningsProvider::collect_nested_section_warnings (cyclomatic 19) crates/config/src/providers/warnings.rs:305 — WarningsProvider::collect_nested_section_warnings has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WorkerCorpus · ×1
  • WorkerCorpus::export_to_workers (cyclomatic 19) crates/evm/evm/src/executors/corpus.rs:1540 — 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.
D1 · Cyclomatic Complexity · LocalTraceIdentifier · ×1
  • LocalTraceIdentifier::identify_code (cyclomatic 19) crates/evm/traces/src/identifier/local.rs:44 — LocalTraceIdentifier::identify_code has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ScriptProgress · ×1
  • ScriptProgress::wait_for_pending (cyclomatic 19) crates/script/src/progress.rs:203 — 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.
D1 · Cyclomatic Complexity · finalize-release.finalize_nightly (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · JsonRpcCodec · ×1
  • JsonRpcCodec::decode (cyclomatic 18) crates/anvil/server/src/ipc.rs:128 — JsonRpcCodec::decode has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LogsArgs · ×1
  • LogsArgs::run (cyclomatic 18) crates/cast/src/cmd/logs.rs:81 — LogsArgs::run has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DynValueFormatter · ×1
  • 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.
D1 · Cyclomatic Complexity · SymbolicCalldata · ×1
  • SymbolicCalldata::variants_with_prefix (cyclomatic 18) crates/evm/symbolic/src/abi.rs:36 — 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.
D1 · Cyclomatic Complexity · SymBinOp · ×1
  • SymBinOp::eval (cyclomatic 18) crates/evm/symbolic/src/runtime/expr/expr.rs:2224 — SymBinOp::eval has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExpressionDigests · ×1
  • 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.
D1 · Cyclomatic Complexity · FuzzCminArgs · ×1
  • 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.
D1 · Cyclomatic Complexity · WriteAnalyzer · ×1
  • 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.
D1 · Cyclomatic Complexity · FoundryTransactionRequest · ×1
  • FoundryTransactionRequest::try_from (cyclomatic 18) crates/primitives/src/transaction/request.rs:363 — 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.
D1 · Cyclomatic Complexity · ScriptArgs · ×1
  • ScriptArgs::run_script (cyclomatic 18) crates/script/src/lib.rs:425 — ScriptArgs::run_script has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ScriptRunner · ×1
  • ScriptRunner::setup (cyclomatic 18) crates/script/src/runner.rs:91 — 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.
D1 · Cyclomatic Complexity · VerificationProviderType · ×1
  • 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.
D1 · Cyclomatic Complexity · CommentGatherer · ×1
  • CommentGatherer::process_token (cyclomatic 17) crates/common/src/comments/mod.rs:210 — CommentGatherer::process_token has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnchangedStateVariables · ×1
  • 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.
D1 · Cyclomatic Complexity · BatchMakeTxArgs · ×1
  • BatchMakeTxArgs::run (cyclomatic 16) crates/cast/src/cmd/batch_mktx.rs:65 — BatchMakeTxArgs::run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Create2Args · ×1
  • 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.
D1 · Cyclomatic Complexity · Lockfile · ×1
  • 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.
D1 · Cyclomatic Complexity · EvmArgs · ×1
  • EvmArgs::data (cyclomatic 16) crates/cli/src/opts/evm.rs:169 — 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.
D1 · Cyclomatic Complexity · ExternalFetcher · ×1
  • ExternalFetcher::poll_next (cyclomatic 16) crates/evm/traces/src/identifier/external.rs:575 — 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.
D1 · Cyclomatic Complexity · LintArgs · ×1
  • 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.
D1 · Cyclomatic Complexity · ScriptSequenceKind · ×1
  • ScriptSequenceKind::restore_delegated_pending (cyclomatic 16) crates/script/src/sequence.rs:396 — ScriptSequenceKind::restore_delegated_pending has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FilledTransactionsState · ×1
  • FilledTransactionsState::bundle (cyclomatic 16) crates/script/src/simulate.rs:641 — FilledTransactionsState::bundle 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.
D2 · Cognitive Complexity · WalletSubcommands · ×1
  • WalletSubcommands::run (cognitive 148) crates/cast/src/cmd/wallet/mod.rs:386 — 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.
D2 · Cognitive Complexity · SelectorsSubcommands · ×1
  • 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.
D2 · Cognitive Complexity · VerifyBytecodeArgs · ×1
  • VerifyBytecodeArgs::prepare_runtime_verification (cognitive 110) crates/verify/src/bytecode.rs:330 — 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.
D2 · Cognitive Complexity · FmtArgs · ×1
  • FmtArgs::run (cognitive 93) crates/forge/src/cmd/fmt.rs:60 — FmtArgs::run has cognitive complexity 93 (threshold 15). Drivers by points: if/else 32 (53 pts), boolean chains 15, loops 5 (13 pts), match/switch 6 (12 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.
D2 · Cognitive Complexity · ReturnDataObserver · ×1
  • ReturnDataObserver::visit_expr (cognitive 79) crates/common/src/preprocessor/deps.rs:1206 — 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.
D2 · Cognitive Complexity · ContractsByArtifact · ×1
  • ContractsByArtifact::find_by_deployed_code_exact_inner (cognitive 76) crates/common/src/contracts.rs:312 — ContractsByArtifact::find_by_deployed_code_exact_inner has cognitive complexity 76 (threshold 15). Drivers by points: if/else 29 (55 pts), match/switch 5 (11 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ListArgs · ×1
  • ListArgs::run (cognitive 67) crates/cast/src/cmd/wallet/list.rs:56 — 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.
D2 · Cognitive Complexity · benchmark_clickhouse.build_rows (cognitive 65) · ×1
  • 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.
D2 · Cognitive Complexity · SendTxArgs · ×1
  • SendTxArgs::run_generic_inner (cognitive 63) crates/cast/src/cmd/send.rs:193 — SendTxArgs::run_generic_inner has cognitive complexity 63 (threshold 15). Drivers by points: if/else 36 (56 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecoveryPlan · ×1
  • RecoveryPlan::validate_signed_payloads (cognitive 61) crates/script/src/recovery.rs:769 — 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.
D2 · Cognitive Complexity · GuardWalker · ×1
  • GuardWalker::walk (cognitive 59) crates/lint/src/sol/med/unsafe_oz_erc721_mint.rs:1017 — 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.
D2 · Cognitive Complexity · CreateArgs · ×1
  • CreateArgs::deploy (cognitive 57) crates/forge/src/cmd/create.rs:445 — CreateArgs::deploy has cognitive complexity 57 (threshold 15). Drivers by points: if/else 38 (51 pts), boolean chains 5, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SymbolicCalldata · ×1
  • SymbolicCalldata::variants_with_prefix (cognitive 56) crates/evm/symbolic/src/abi.rs:36 — 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.
D2 · Cognitive Complexity · PubSubConnection · ×1
  • PubSubConnection::poll (cognitive 52) crates/anvil/server/src/pubsub.rs:188 — PubSubConnection::poll has cognitive complexity 52 (threshold 15). Drivers by points: if/else 7 (21 pts), match/switch 5 (19 pts), loops 6 (12 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.
D2 · Cognitive Complexity · MultiForkHandler · ×1
  • MultiForkHandler::poll (cognitive 51) crates/evm/core/src/fork/multi.rs:585 — 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.
D2 · Cognitive Complexity · InitArgs · ×1
  • 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.
D2 · Cognitive Complexity · TestResult · ×1
  • TestResult::render (cognitive 49) crates/forge/src/result.rs:1404 — 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.
D2 · Cognitive Complexity · ResolveArgs · ×1
  • 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.
D2 · Cognitive Complexity · UpdateArgs · ×1
  • 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.
D2 · Cognitive Complexity · MakeTxArgs · ×1
  • MakeTxArgs::run_generic (cognitive 43) crates/cast/src/cmd/mktx.rs:128 — MakeTxArgs::run_generic has cognitive complexity 43 (threshold 15). Drivers by points: if/else 24 (37 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · BytecodeDependencyCollector · ×1
  • BytecodeDependencyCollector::visit_expr (cognitive 42) crates/common/src/preprocessor/deps.rs:687 — 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.
D2 · Cognitive Complexity · SessionSource · ×1
  • SessionSource::inspect (cognitive 41) crates/chisel/src/executor.rs:134 — SessionSource::inspect has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (33 pts), match/switch 3 (4 pts), loops 1 (3 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.
D2 · Cognitive Complexity · ProjectCompiler · ×1
  • ProjectCompiler::handle_output (cognitive 41) crates/common/src/compile.rs:416 — 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.
D2 · Cognitive Complexity · PreprocessorDependencies · ×1
  • 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.
D2 · Cognitive Complexity · LocalTraceIdentifier · ×1
  • LocalTraceIdentifier::identify_code (cognitive 39) crates/evm/traces/src/identifier/local.rs:44 — LocalTraceIdentifier::identify_code has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (32 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScriptProgress · ×1
  • ScriptProgress::wait_for_pending (cognitive 36) crates/script/src/progress.rs:203 — ScriptProgress::wait_for_pending has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 2, match/switch 1 (2 pts), 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.
D2 · Cognitive Complexity · LogsArgs · ×1
  • LogsArgs::run (cognitive 31) crates/cast/src/cmd/logs.rs:81 — LogsArgs::run has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (21 pts), match/switch 4 (7 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · ExternalCompilation · ×1
  • 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.
D2 · Cognitive Complexity · AnvilEvmArgs · ×1
  • AnvilEvmArgs::resolve_rpc_alias (cognitive 30) crates/anvil/src/cmd.rs:777 — 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.
D2 · Cognitive Complexity · PathState · ×1
  • PathState::expr_upper_bound_usize_cached (cognitive 30) crates/evm/symbolic/src/runtime/state.rs:348 — 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.
D2 · Cognitive Complexity · MissingInheritance · ×1
  • 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.
D2 · Cognitive Complexity · Executor · ×1
  • Executor::transact_with_monad_block_replay (cognitive 29) crates/evm/evm/src/executors/mod.rs:191 — Executor::transact_with_monad_block_replay has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 6, match/switch 2 (4 pts), 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.
D2 · Cognitive Complexity · FuzzCminArgs · ×1
  • 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.
D2 · Cognitive Complexity · ScriptRunner · ×1
  • ScriptRunner::setup (cognitive 29) crates/script/src/runner.rs:91 — 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.
D2 · Cognitive Complexity · TxBuilderInner · ×1
  • TxBuilderInner::build (cognitive 28) crates/cast/src/tx.rs:651 — 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.
D2 · Cognitive Complexity · WatchArgs · ×1
  • WatchArgs::watchexec_config_inner (cognitive 28) crates/forge/src/cmd/watch.rs:160 — WatchArgs::watchexec_config_inner has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 6, loops 3 (6 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.
D2 · Cognitive Complexity · LcovReporter · ×1
  • 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.
D2 · Cognitive Complexity · FindBlockArgs · ×1
  • 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.
D2 · Cognitive Complexity · JsonRpcCodec · ×1
  • JsonRpcCodec::decode (cognitive 26) crates/anvil/server/src/ipc.rs:128 — JsonRpcCodec::decode has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 8, match/switch 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TomlFileProvider · ×1
  • TomlFileProvider::read (cognitive 26) crates/config/src/providers/ext.rs:86 — TomlFileProvider::read has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SolidityLinter · ×1
  • 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.
D2 · Cognitive Complexity · Dependency · ×1
  • 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.
D2 · Cognitive Complexity · FuzzCampaign · ×1
  • FuzzCampaign::run_sequence (cognitive 25) crates/evm/evm/src/executors/campaign.rs:62 — 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.
D2 · Cognitive Complexity · VerificationProviderType · ×1
  • 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.
D2 · Cognitive Complexity · InterfaceArgs · ×1
  • 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.
D2 · Cognitive Complexity · ProtectedVars · ×1
  • 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.
D2 · Cognitive Complexity · DynamicTestLinkingPreprocessor · ×1
  • DynamicTestLinkingPreprocessor::preprocess_with_dependencies (cognitive 23) crates/common/src/preprocessor/mod.rs:79 — DynamicTestLinkingPreprocessor::preprocess_with_dependencies has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · SparsedTraceArena · ×1
  • SparsedTraceArena::resolve_arena::clear_node (cognitive 23) crates/evm/traces/src/lib.rs:202 — 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.
D2 · Cognitive Complexity · InspectArgs · ×1
  • InspectArgs::run (cognitive 23) crates/forge/src/cmd/inspect.rs:60 — InspectArgs::run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, match/switch 2 (3 pts), loops 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.
D2 · Cognitive Complexity · TodoComment · ×1
  • 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.
D2 · Cognitive Complexity · PreExecutionState · ×1
  • PreExecutionState::maybe_new_sender (cognitive 23) crates/script/src/execute.rs:207 — 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.
D2 · Cognitive Complexity · ScriptSequenceKind · ×1
  • ScriptSequenceKind::restore_delegated_pending (cognitive 23) crates/script/src/sequence.rs:396 — ScriptSequenceKind::restore_delegated_pending has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, loops 2, match/switch 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.
D2 · Cognitive Complexity · BatchMakeTxArgs · ×1
  • BatchMakeTxArgs::run (cognitive 22) crates/cast/src/cmd/batch_mktx.rs:65 — BatchMakeTxArgs::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (19 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.
D2 · Cognitive Complexity · DynValueFormatter · ×1
  • 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.
D2 · Cognitive Complexity · ContractSources · ×1
  • ContractSources::insert (cognitive 22) crates/evm/traces/src/debug/sources.rs:387 — 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.
D2 · Cognitive Complexity · ExternalFetcher · ×1
  • ExternalFetcher::poll_next (cognitive 22) crates/evm/traces/src/identifier/external.rs:575 — 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.
D2 · Cognitive Complexity · LintArgs · ×1
  • 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.
D2 · Cognitive Complexity · FunctionSelectorCollision · ×1
  • 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.
D2 · Cognitive Complexity · ScriptTransactionBuilder · ×1
  • ScriptTransactionBuilder::set_call (cognitive 22) crates/script/src/transaction.rs:29 — 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.
D2 · Cognitive Complexity · compare-benchmark-thresholds.compare (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · StorageArgs · ×1
  • 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.
D2 · Cognitive Complexity · DocBuilder · ×1
  • 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.
D2 · Cognitive Complexity · MultiContractRunnerBuilder · ×1
  • MultiContractRunnerBuilder::build (cognitive 21) crates/forge/src/multi_runner.rs:736 — MultiContractRunnerBuilder::build has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 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.
D2 · Cognitive Complexity · UnchangedStateVariables · ×1
  • 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.
D2 · Cognitive Complexity · benchmark_clickhouse.build_manifest (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · finalize-release.finalize_nightly (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · HistoricalStateCache · ×1
  • HistoricalStateCache::snapshot (cognitive 20) crates/anvil/src/eth/backend/mem/in_memory_db.rs:143 — 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.
D2 · Cognitive Complexity · InMemoryBlockStates · ×1
  • InMemoryBlockStates::enforce_limits (cognitive 20) crates/anvil/src/eth/backend/mem/storage.rs:143 — 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.
D2 · Cognitive Complexity · Create2Args · ×1
  • 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.
D2 · Cognitive Complexity · BuildOpts · ×1
  • BuildOpts::data (cognitive 20) crates/cli/src/opts/build/core.rs:234 — 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.
D2 · Cognitive Complexity · foundry_evm_core · ×1
  • foundry_evm_core::fork::prefetch::spawn (cognitive 20) crates/evm/core/src/fork/prefetch.rs:47 — 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.
D2 · Cognitive Complexity · Linker · ×1
  • Linker::link_bytecode_inner (cognitive 20) crates/linking/src/lib.rs:174 — 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.
D2 · Cognitive Complexity · FoundryTransactionRequest · ×1
  • FoundryTransactionRequest::try_from (cognitive 20) crates/primitives/src/transaction/request.rs:363 — 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.
D2 · Cognitive Complexity · TrieNode · ×1
  • TrieNode::insert (cognitive 19) crates/anvil/src/eth/backend/mem/state.rs:262 — 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.
D2 · Cognitive Complexity · LogsSubscription · ×1
  • LogsSubscription::poll (cognitive 19) crates/anvil/src/pubsub.rs:46 — LogsSubscription::poll has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BlockProducer · ×1
  • BlockProducer::poll_next (cognitive 19) crates/anvil/src/service.rs:181 — BlockProducer::poll_next has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PermitArgs · ×1
  • 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.
D2 · Cognitive Complexity · RunArgs · ×1
  • RunArgs::prepare (cognitive 19) crates/cast/src/cmd/run.rs:486 — RunArgs::prepare has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, 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.
D2 · Cognitive Complexity · foundry_debugger · ×1
  • foundry_debugger::node::flatten_call_trace_with_precompiles (cognitive 19) crates/debugger/src/node.rs:81 — foundry_debugger::node::flatten_call_trace_with_precompiles has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to one function item inside it that branches (inner). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · LocalMembers · ×1
  • 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.
D2 · Cognitive Complexity · MutationExclusionCollector · ×1
  • 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.
D2 · Cognitive Complexity · TestOutcome · ×1
  • TestOutcome::ensure_ok (cognitive 19) crates/forge/src/result.rs:180 — 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.
D2 · Cognitive Complexity · SendTransactionKind · ×1
  • SendTransactionKind::prepare (cognitive 19) crates/script/src/broadcast.rs:97 — 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.
D2 · Cognitive Complexity · matrices.main (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · PendingTransactions · ×1
  • PendingTransactions::remove_with_dependents (cognitive 18) crates/anvil/src/eth/pool/transactions.rs:275 — 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.
D2 · Cognitive Complexity · foundry_cli · ×1
  • foundry_cli::opts::build::utils::get_solar_sources_from_compile_output (cognitive 18) crates/cli/src/opts/build/utils.rs:159 — foundry_cli::opts::build::utils::get_solar_sources_from_compile_output has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 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.
D2 · Cognitive Complexity · SlotInfo · ×1
  • SlotInfo::decode (cognitive 18) crates/common/src/slot_identifier.rs:79 — 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.
D2 · Cognitive Complexity · SolarParser · ×1
  • 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.
D2 · Cognitive Complexity · SourceVisitor · ×1
  • 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.
D2 · Cognitive Complexity · InconsistentTypeNames · ×1
  • 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.
D2 · Cognitive Complexity · VerifierArgs · ×1
  • 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.
D2 · Cognitive Complexity · AccountStateDiffs · ×1
  • AccountStateDiffs::fmt (cognitive 17) crates/cheatcodes/src/evm.rs:202 — AccountStateDiffs::fmt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 1 (3 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.
D2 · Cognitive Complexity · foundry_common_fmt · ×1
  • 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.
D2 · Cognitive Complexity · SourceAnalysis · ×1
  • 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.
D2 · Cognitive Complexity · ExpressionDigests · ×1
  • 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.
D2 · Cognitive Complexity · BindArgs · ×1
  • 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.
D2 · Cognitive Complexity · FuzzShowArgs · ×1
  • 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.
D2 · Cognitive Complexity · ExternalFunction · ×1
  • 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.
D2 · Cognitive Complexity · Imports · ×1
  • 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.
D2 · Cognitive Complexity · LockedEther · ×1
  • 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.
D2 · Cognitive Complexity · NodeArgs · ×1
  • NodeArgs::into_node_config (cognitive 16) crates/anvil/src/cmd.rs:266 — 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.
D2 · Cognitive Complexity · Installer · ×1
  • 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.
D2 · Cognitive Complexity · Lockfile · ×1
  • 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.
D2 · Cognitive Complexity · TempoOpts · ×1
  • TempoOpts::apply (cognitive 16) crates/cli/src/opts/tempo.rs:258 — TempoOpts::apply has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · SelectorImportRequest · ×1
  • 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.
D2 · Cognitive Complexity · WorkerCorpusSeed · ×1
  • WorkerCorpusSeed::load_from_disk (cognitive 16) crates/evm/evm/src/executors/corpus.rs:446 — WorkerCorpusSeed::load_from_disk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SymBinOp · ×1
  • SymBinOp::eval (cognitive 16) crates/evm/symbolic/src/runtime/expr/expr.rs:2224 — SymBinOp::eval has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SymbolicWorld · ×1
  • SymbolicWorld::replay_storage_assignments (cognitive 16) crates/evm/symbolic/src/runtime/state.rs:1683 — 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.
D2 · Cognitive Complexity · MutationReporter · ×1
  • 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.
D2 · Cognitive Complexity · InternalFunctionUsedOnce · ×1
  • 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.
D2 · Cognitive Complexity · FoundryTxEnvelope · ×1
  • FoundryTxEnvelope::try_from (cognitive 16) crates/primitives/src/transaction/envelope.rs:421 — 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · TooManyFunctions · ×1
  • 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.
D31 · IaC & Container Security · Medium IaC · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (49 shared lines) · ×1
  • Near-duplicate member pair (49 shared lines) crates/evm/evm/src/executors/mod.rs:198 — crates/evm/evm/src/executors/mod.rs:198-296 | crates/evm/evm/src/executors/mod.rs:941-1022 — 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 · Near-duplicate member pair (45 shared lines) · ×1
  • Near-duplicate member pair (45 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: 45 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 · Near-duplicate member pair (31 shared lines) · ×1
  • Near-duplicate member pair (31 shared lines) crates/anvil/src/eth/backend/mem/mod.rs:3078 — crates/anvil/src/eth/backend/mem/mod.rs:3078-3181 | crates/anvil/src/eth/backend/mem/mod.rs:6096-6203 — These two members are variants of one another: 31 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 (15 corresponding lines) · ×1
  • Edited copy of a member (15 corresponding lines) crates/evm/symbolic/src/executor/calls.rs:244 — crates/evm/symbolic/src/executor/calls.rs:244-280 | crates/evm/symbolic/src/executor/calls.rs:405-435 — 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.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/anvil/src/eth/backend/mem/mod.rs:4438 — crates/anvil/src/eth/backend/mem/mod.rs:4438-4484 | crates/anvil/src/eth/backend/mem/mod.rs:6923-6964 | crates/anvil/src/eth/backend/mem/mod.rs:7719-7753 | crates/anvil/src/eth/backend/mem/mod.rs:8019-8082 — 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 · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) crates/cast/src/cmd/call.rs:486 — crates/cast/src/cmd/call.rs:486-508 | crates/cast/src/cmd/estimate.rs:136-158 — 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.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) crates/evm/symbolic/src/executor/calls.rs:513 — crates/evm/symbolic/src/executor/calls.rs:513-533 | crates/evm/symbolic/src/executor/calls.rs:655-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.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) crates/evm/symbolic/src/executor/run.rs:197 — crates/evm/symbolic/src/executor/run.rs:197-217 | crates/evm/symbolic/src/executor/run.rs:230-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.
D4 · Code Duplication · Duplicated block (19–20 lines × 3) · ×1
  • Duplicated block (19–20 lines × 3) crates/evm/evm/src/executors/mod.rs:275 — crates/evm/evm/src/executors/mod.rs:275-294 | crates/evm/evm/src/executors/mod.rs:912-930 | crates/evm/evm/src/executors/mod.rs:1001-1020 — 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.
D4 · Code Duplication · Duplicated block (17–19 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) crates/evm/traces/src/folded_stack_trace.rs:34 — crates/evm/traces/src/folded_stack_trace.rs:34-50 | crates/evm/traces/src/speedscope/builder.rs:141-158 — 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.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) 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 — 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.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×1
  • Duplicated block (14–16 lines × 2) crates/evm/evm/src/executors/mod.rs:236 — crates/evm/evm/src/executors/mod.rs:236-251 | crates/evm/evm/src/executors/mod.rs:980-993 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×1
  • Duplicated block (16 lines × 2) crates/linking/src/lib.rs:675 — crates/linking/src/lib.rs:675-690 | crates/linking/src/lib.rs:752-767 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13–14 lines × 4) · ×1
  • Duplicated block (13–14 lines × 4) crates/anvil/src/eth/backend/mem/mod.rs:4472 — crates/anvil/src/eth/backend/mem/mod.rs:4472-4484 | crates/anvil/src/eth/backend/mem/mod.rs:6951-6964 | crates/anvil/src/eth/backend/mem/mod.rs:7741-7753 | crates/anvil/src/eth/backend/mem/mod.rs:8070-8082 — 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.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) crates/cast/src/cmd/mktx.rs:115 — crates/cast/src/cmd/mktx.rs:115-126 | crates/cast/src/cmd/send.rs:150-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.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) crates/evm/symbolic/src/executor/calls.rs:517 — crates/evm/symbolic/src/executor/calls.rs:517-529 | crates/evm/symbolic/src/executor/calls.rs:555-567 | crates/evm/symbolic/src/executor/calls.rs:658-670 — 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.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) crates/forge/src/runner.rs:2086 — crates/forge/src/runner.rs:2086-2098 | crates/forge/src/runner.rs:2239-2250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) crates/cheatcodes/src/inspector.rs:1480 — crates/cheatcodes/src/inspector.rs:1480-1491 | crates/cheatcodes/src/inspector.rs:1545-1556 | crates/cheatcodes/src/inspector.rs:1606-1617 — 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.
D4 · Code Duplication · Duplicated block (10–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) crates/cheatcodes/src/fs.rs:83 — crates/cheatcodes/src/fs.rs:83-94 | crates/cheatcodes/src/fs.rs:96-105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8–10 lines × 3) · ×1
  • Duplicated block (8–10 lines × 3) crates/evm/symbolic/src/runtime/precompiles.rs:116 — crates/evm/symbolic/src/runtime/precompiles.rs:116-123 | crates/evm/symbolic/src/runtime/precompiles.rs:128-135 | crates/evm/symbolic/src/runtime/precompiles.rs:143-152 — 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) crates/anvil/src/eth/backend/mem/mod.rs:7161 — crates/anvil/src/eth/backend/mem/mod.rs:7161-7170 | crates/anvil/src/eth/backend/mem/mod.rs:7234-7242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) crates/chisel/src/executor.rs:434 — crates/chisel/src/executor.rs:434-443 | crates/chisel/src/executor.rs:452-459 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7–10 lines × 2) · ×1
  • Duplicated block (7–10 lines × 2) REDACTED:1802 — REDACTED:1802-1811 | REDACTED:2009-2015 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) crates/debugger/src/tui/context.rs:663 — crates/debugger/src/tui/context.rs:663-671 | crates/debugger/src/tui/context.rs:876-883 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) crates/evm/evm/src/executors/mod.rs:207 — crates/evm/evm/src/executors/mod.rs:207-213 | crates/evm/evm/src/executors/mod.rs:962-970 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7–8 lines × 5) · ×1
  • 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:658-665 | crates/evm/symbolic/src/executor/opcodes.rs:714-721 | crates/evm/symbolic/src/executor/opcodes.rs:767-774 | crates/evm/symbolic/src/executor/opcodes.rs:1170-1177 — 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.
D4 · Code Duplication · Duplicated block (6–8 lines × 3) · ×1
  • Duplicated block (6–8 lines × 3) crates/evm/symbolic/src/executor/calls.rs:110 — crates/evm/symbolic/src/executor/calls.rs:110-117 | crates/evm/symbolic/src/executor/calls.rs:251-256 | crates/evm/symbolic/src/executor/calls.rs:406-413 — 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.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) crates/evm/symbolic/src/executor/opcodes.rs:861 — crates/evm/symbolic/src/executor/opcodes.rs:861-867 | crates/evm/symbolic/src/executor/opcodes.rs:872-878 | crates/evm/symbolic/src/executor/opcodes.rs:884-890 — 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.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×1
  • 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:562-568 | crates/evm/symbolic/src/executor/opcodes.rs:658-664 | crates/evm/symbolic/src/executor/opcodes.rs:714-720 | crates/evm/symbolic/src/executor/opcodes.rs:767-773 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×1
  • 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:562-567 | crates/evm/symbolic/src/executor/opcodes.rs:658-663 | crates/evm/symbolic/src/executor/opcodes.rs:714-719 | crates/evm/symbolic/src/executor/opcodes.rs:767-772 | crates/evm/symbolic/src/executor/opcodes.rs:1335-1340 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×1
  • Duplicated block (10 lines × 5) crates/config/src/lib.rs:2529 — crates/config/src/lib.rs:2529-2538 | crates/config/src/lib.rs:2550-2559 | crates/config/src/lib.rs:2571-2580 | crates/config/src/lib.rs:2592-2601 | crates/config/src/lib.rs:2613-2622 — 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.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • 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.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (7 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:438-477 | crates/test-utils/src/rpc.rs:487-526 | crates/test-utils/src/rpc.rs:534-567 | crates/test-utils/src/rpc.rs:573-609 | crates/test-utils/src/rpc.rs:617-660 | crates/test-utils/src/rpc.rs:750-796 — These 7 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 7 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 7 times.
D4 · Code Duplication · Duplicated block (4–18 lines × 7) · ×1
  • Duplicated block (4–18 lines × 7) crates/test-utils/src/rpc.rs:328 — crates/test-utils/src/rpc.rs:328-331 | crates/test-utils/src/rpc.rs:471-474 | crates/test-utils/src/rpc.rs:520-523 | crates/test-utils/src/rpc.rs:561-564 | crates/test-utils/src/rpc.rs:603-606 | crates/test-utils/src/rpc.rs:640-657 | crates/test-utils/src/rpc.rs:776-793 — all 7 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.
D4 · Code Duplication · Duplicated block (8–14 lines × 2) · ×1
  • Duplicated block (8–14 lines × 2) crates/evm/evm/src/executors/fuzz/mod.rs:364 — crates/evm/evm/src/executors/fuzz/mod.rs:364-371 | crates/evm/evm/src/executors/fuzz/mod.rs:498-511 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D5 · Coupling · Unstable project forge-script · ×1
  • Unstable project forge-script — forge-script has instability 0.91 with 1 dependents.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×1
  • Sync-over-async blocking crates/anvil/src/config.rs:2061 — `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.
Minor — 77 finding(s)
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging crates/verify/src/bytecode.rs:707 — `trace!` at line 707 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:998 — `trace!` at line 998 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:1039 — `trace!` at line 1039 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:199 — `warn!` at line 199 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:135 — `warn!` at line 135 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:309 — `debug!` at line 309 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:314 — `debug!` at line 314 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:223 — `trace!` at line 223 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:708 — `trace!` at line 708 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:196 — `warn!` at line 196 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:425 — `trace!` at line 425 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:553 — `trace!` at line 553 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:234 — `debug!` at line 234 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:956 — `debug!` at line 956 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:976 — `debug!` at line 976 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:166 — `warn!` at line 166 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:431 — `trace!` at line 431 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:460 — `trace!` at line 460 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:470 — `trace!` at line 470 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:775 — `trace!` 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: `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`.
  • + 15 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×12
  • 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/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/anvil/src/eth/backend/mem/in_memory_db.rs:97 — `account.is_created() || account.is_selfdestructed()` 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/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/cast/src/cmd/call.rs:575 — `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/cast/src/cmd/run.rs:954 — `is_known_system_sender(tx.from()) || tx.transaction_type() == Some(SYSTEM_TRANSACTION_TYPE)` appears character-identically in 2 files — crates/cast/src/cmd/run.rs, crates/verify/src/bytecode.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:1244 — `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:308 — `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:319 — `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/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.
X7 · Silent fallback defaults · Silent fallback default on Err · ×12
  • 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:507 — `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:514 — `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/debugger/src/tui/draw.rs:865 — `scope_variables` 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/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/opcodes.rs:307 — `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.
D34 · Knowledge Freshness · Orphaned file · ×5
  • Orphaned file crates/evm/traces/src/backtrace/mod.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/cheatcodes/src/inspector/analysis.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/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.
  • Orphaned file crates/forge/src/mutation/mutators/require_mutator.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.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 6 significant file(s) lose their only recent owner: crates/evm/core/src/evm/monad.rs, crates/common/src/provider/fee.rs, 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) — 5 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 (12 single-owned of 550 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; 550 of the 722 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (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/lint/src/sol/analysis/stmts.rs, crates/evm/symbolic/src/runtime/solver/normalize/rounding.rs, crates/anvil/core/src/eth/serde_helpers.rs, crates/cast/src/cmd/safe/contracts.rs.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 5 of 36 project(s) overshoot their size bounds, lowering Project Cohesion to 7.2/10. The most over is `crates/anvil` (38416 LoC, 162 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.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 5 of 550 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; 550 of the 722 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/evm/traces/src/backtrace/mod.rs, crates/cheatcodes/src/inspector/analysis.rs, crates/forge/src/brutalizer/assembly.rs, crates/forge/src/mutation/mutators/require_mutator.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.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 · Observability · Logging is not universal · ×1
  • 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: `.`.
Minor — 20 finding(s)
D12 · Dependency Hygiene · Outdated · ×18
  • Outdated: alloy-hardforks — `alloy-hardforks` is locked at 0.4.9 but 0.4.11 is the current stable release on crates.io, and it already satisfies the `"0.4.8"` requirement declared in crates/anvil/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p alloy-hardforks` 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: interprocess — `interprocess` is locked at 2.4.4 but 2.4.7 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: libc — `libc` is locked at 0.2.190 but 0.2.191 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in benches/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p libc` 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: revm-inspectors — `revm-inspectors` is locked at 0.44.1 but 0.44.3 is the current stable release on crates.io, and it already satisfies the `"0.44.1"` requirement declared in crates/anvil/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p revm-inspectors` and commit the updated REDACTED.
  • Outdated: ruint — `ruint` is locked at 1.20.1 but 1.21.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ruint` and commit the updated REDACTED.
  • Outdated: rustix — `rustix` is locked at 1.1.5 but 1.1.6 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rustix` and commit the updated REDACTED.
  • Outdated: schemars — `schemars` is locked at 1.2.2 but 1.2.3 is the current stable release on crates.io, and it already satisfies the `"1.1"` requirement declared in crates/cheatcodes/spec/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p schemars` and commit the updated REDACTED.
  • Outdated: serde_json — `serde_json` is locked at 1.0.151 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1.0"` requirement declared in benches/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` 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: syn — `syn` is locked at 3.0.6 but 3.0.9 is the current stable release on crates.io, and it already satisfies the `"3"` requirement declared in crates/common/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p syn` and commit the updated REDACTED.
  • Outdated: time — `time` is locked at 0.3.47 but 0.3.55 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in crates/chisel/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p time` 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: tokio-util — `tokio-util` is locked at 0.7.19 but 0.7.20 is the current stable release on crates.io, and it already satisfies the `"0.7"` requirement declared in crates/anvil/server/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio-util` and commit the updated REDACTED.
  • Outdated: toml — `toml` is locked at 1.1.6+spec-1.1.0 but 1.1.8+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.15+spec-1.1.0 but 0.25.17+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.27.0 but 1.29.0 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.
D5 · Coupling · Off the main sequence · ×2
  • 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.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-b3a2027eb6f646b19c23ef59d536c844/history.json --exit-code 0 --source .30artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-b3a2027eb6f646b19c23ef59d536c844/tree.json --exit-code 0 --source .13artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude crates/cheatcodes/assets --exclude crates/forge/tests/fixtures/bind --exclude crates/forge/tests/fixtures/bind-with-serde-with --exclude editors/vscode .5artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update20artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .1artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a17bbd-9ee3-731c-afe4-9fe00ccf57cf · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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