Skip to content

Commit

Permalink
Fix coverage analysis (#4648)
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio authored Oct 3, 2023
1 parent 5d43060 commit 2c6b859
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ require('hardhat-exposed');
require('solidity-docgen');
argv.foundry && require('@nomicfoundation/hardhat-foundry');

if (argv.foundry && argv.coverage) {
throw Error('Coverage analysis is incompatible with Foundry. Disable with `FOUNDRY=false` in the environment');
}

for (const f of fs.readdirSync(path.join(__dirname, 'hardhat'))) {
require(path.join(__dirname, 'hardhat', f));
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"scripts": {
"compile": "hardhat compile",
"coverage": "env COVERAGE=true hardhat coverage",
"coverage": "env COVERAGE=true FOUNDRY=false hardhat coverage",
"docs": "npm run prepare-docs && oz-docs",
"docs:watch": "oz-docs watch contracts docs/templates docs/config.js",
"prepare-docs": "scripts/prepare-docs.sh",
Expand Down

0 comments on commit 2c6b859

Please sign in to comment.