You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| testfiles |`--testfiles "test/registry/*.ts"`| Test file(s) to run. (Globs must be enclosed by quotes and use [globby matching patterns][38])|
47
68
| sources |`--sources myFolder` or `--sources myFile.sol`| Path to *single* folder or file to target for coverage. Path is relative to Hardhat's `paths.sources` (usually `contracts/`) |
48
69
| solcoverjs |`--solcoverjs ./../.solcover.js`| Relative path from working directory to config. Useful for monorepo packages that share settings. (Path must be "./" prefixed) |
49
-
| temp[<sup>*</sup>][14]|`--temp build`|:warning:**Caution**:warning: Path to a *disposable* folder to store compilation artifacts in. Useful when your test setup scripts include hard-coded paths to a build directory. [More...][14]|
50
70
| matrix |`--matrix`| Generate a JSON object that maps which mocha tests hit which lines of code. (Useful as an input for some fuzzing, mutation testing and fault-localization algorithms.) [More...][39]|
| skipFiles |*Array*|`['Migrations.sol']`| Array of contracts or folders (with paths expressed relative to the `contracts` directory) that should be skipped when doing instrumentation. |
89
+
| skipFiles |*Array*|`[]`| Array of contracts or folders (with paths expressed relative to the `contracts` directory) that should be skipped when doing instrumentation.(Example: `[ "Routers", "Networks/Polygon.sol"]`:bulb:**RUN THE HARDHAT CLEAN COMMAND AFTER UPDATING THIS** )|
70
90
| measureStatementCoverage |*boolean*|`true`| Computes statement (in addition to line) coverage. [More...][34]|
71
91
| measureFunctionCoverage |*boolean*|`true`| Computes function coverage. [More...][34]|
72
92
| measureModifierCoverage |*boolean*|`true`| Computes each modifier invocation as a code branch. [More...][34]|
@@ -79,12 +99,12 @@ module.exports = {
79
99
| mocha |*Object*|`{ }`|[Mocha options][3] to merge into existing mocha config. `grep` and `invert` are useful for skipping certain tests under coverage using tags in the test descriptions.|
80
100
| coverageContractsTemp |*String*|`.coverage_contracts`| Temporary folder location for instrumented contracts - Note that this directory will automatically be deleted when coverage completes. |
81
101
| onServerReady[<sup>*</sup>][14]|*Function*|| Hook run *after* server is launched, *before* the tests execute. Useful if you need to use the Oraclize bridge or have setup scripts which rely on the server's availability. [More...][23]|
82
-
| onPreCompile[<sup>*</sup>][14]|*Function*|| Hook run *after*filesystem and compiler configuration is applied, *before* the compiler is run. Can be used with the other hooks to be able to generate coverage reports on non-standard / customized directory structures, as well as contracts with absolute import paths. [More...][23]|
102
+
| onPreCompile[<sup>*</sup>][14]|*Function*|| Hook run *after*instrumentation is performed, *before* the compiler is run. Can be used with the other hooks to be able to generate coverage reports on non-standard / customized directory structures, as well as contracts with absolute import paths. [More...][23]|
83
103
| onCompileComplete[<sup>*</sup>][14]|*Function*|| Hook run *after* compilation completes, *before* tests are run. Useful if you have secondary compilation steps or need to modify built artifacts. [More...][23]|
84
104
| onTestsComplete[<sup>*</sup>][14]|*Function*|| Hook run *after* the tests complete, *before* Istanbul reports are generated. [More...][23]|
85
105
| onIstanbulComplete[<sup>*</sup>][14]|*Function*|| Hook run *after* the Istanbul reports are generated, *before* the coverage task completes. Useful if you need to clean resources up. [More...][23]|
86
-
| configureYulOptimizer |*Boolean*| false |(Experimental) Setting to `true` should resolve "stack too deep" compiler errors in large projects using ABIEncoderV2 |
87
-
| solcOptimizerDetails |*Object*|`undefined`|(Experimental) Must be used in combination with `configureYulOptimizer`. Allows you configure solc's [optimizer details][1001]. Useful if the default remedy for stack-too-deep errors doesn't work in your case (See FAQ below). |
106
+
| configureYulOptimizer |*Boolean*| false |**(Deprecated since 0.8.7)** Setting to `true` should resolve "stack too deep" compiler errors in large projects using ABIEncoderV2 |
107
+
| solcOptimizerDetails |*Object*|`undefined`|**(Deprecated since 0.8.7))** Must be used in combination with `configureYulOptimizer`. Allows you configure solc's [optimizer details][1001]. Useful if the default remedy for stack-too-deep errors doesn't work in your case (See FAQ below). |
88
108
89
109
90
110
[<sup>*</sup> Advanced use][14]
@@ -111,21 +131,12 @@ The coverage plugin sets a boolean variable on the globally injected hardhat env
111
131
hre.__SOLIDITY_COVERAGE_RUNNING === true
112
132
```
113
133
114
-
## FAQ
115
-
116
-
Common problems & questions:
134
+
## Example reports
135
+
+[openzeppelin-solidity][10](Codecov)
117
136
118
-
+[Running in CI][7]
119
-
+[Running out of gas][13]
120
-
+[Running out of time][6]
121
-
+[Running out of stack][1002] (Stack too deep)
122
-
+[Running out of memory][5]
123
-
+[Running in parallel (in CI)][1003]
124
-
+[Running coverage threshold checks][1004]
137
+
## Funding
125
138
126
-
## Example reports
127
-
+[metacoin][9] (Istanbul HTML)
128
-
+[openzeppelin-solidity][10](Coveralls)
139
+
You can help fund solidity-coverage development through [DRIPS][1008]. It's a public goods protocol which helps distribute money to packages in your dependency tree. (It's great, check it out.)
0 commit comments