foundry icon indicating copy to clipboard operation
foundry copied to clipboard

`forge coverage` is also generating reports on contracts inside node_modules

Open HrikB opened this issue 2 years ago • 5 comments

Component

Forge

Have you ensured that all of these are up to date?

  • [X] Foundry
  • [X] Foundryup

What version of Foundry are you on?

forge 0.2.0 (9b0575e 2022-08-04T00:04:01.463358166Z)

What command(s) is the bug in?

forge coverage

Operating System

Linux

Describe the bug

forge coverage is also generating reports on contracts inside node_modules. Is there any way to exclude certain directories from being inside the coverage report?

image

HrikB avatar Aug 10 '22 08:08 HrikB

These should be excluded if node_modules is part of libs in foundry.toml. Please ensure that is the case, otherwise please provide a minimal reproducible example.

onbjerg avatar Aug 10 '22 20:08 onbjerg

image My node_modules is in a different directory as it is inside a monorepo. Perhaps using a route like this is causing the error?

HrikB avatar Aug 10 '22 20:08 HrikB

Can you try updating Forge as well? It is 6 days out of date

onbjerg avatar Aug 10 '22 20:08 onbjerg

Done: forge 0.2.0 (49558db 2022-08-10T00:11:55.304734589Z)

The issue still persists though

HrikB avatar Aug 10 '22 20:08 HrikB

same issue here, we are using a monorepo and node_modules is in another directory

kkx avatar Aug 26 '22 09:08 kkx