// solidity-coverage config. Only `npx hardhat coverage` reads this file. // Production `hardhat test` / `compile` / deploy never do. // // skipFiles is EMPTY ON PURPOSE. Every contract in this repository is // instrumented. Nothing is excluded from the denominator to make a percentage // look better. If you ever add an entry here, say so in the coverage report, // because a skipFiles entry silently shrinks the denominator. // // Neither `irMinimum` nor `configureYulOptimizer` is set, deliberately. Either // one makes the plugin force a GLOBAL optimizer setting that clobbers the // per-file overrides in hardhat.config.coverage.js. See the long comment in // that file for the plugin source line that causes this. // // KNOWN LIMIT, stated rather than hidden: a single-process whole-repo coverage // run needs more memory than a standard 16 GB CI runner has. Instrumentation // keeps a per-statement hit map for every instrumented contract, and the // on-chain crypto suites execute enormous statement counts (one Falcon verify // runs tens of millions of statements). The run therefore OOMs during the TEST // phase, not the compile phase. The compile phase is solved and does complete. // // The supported way to get a number in CI is to SHARD: run coverage over a // subset of test files with --testfiles, then merge the per-shard istanbul // JSONs. Merging is arithmetically valid because instrumentation is // deterministic over identical sources, so every shard emits identical // statement/branch/function maps and the per-counter arrays sum. Keeping // skipFiles empty in every shard is what guarantees those maps match. module.exports = { istanbulFolder: "./coverage", skipFiles: [], };