scopelint icon indicating copy to clipboard operation
scopelint copied to clipboard

`scopelint check`: make SRC path configurable in foundry.toml

Open re1ro opened this issue 2 years ago • 1 comments

Default foundry setup places contacts under the contacts/ folder and not src/. Current implementation of check has src/ path hardcoded. This makes scopelint check unusable for preexisting foundry projects as it always throws the following error:

> scopelint check
IO error for operation on ./src: No such file or directory (os error 2)

Please make src/test/scripts folder paths configurable in foundry.toml something like:

[check]
  src_path = "./contracts"
  script_path = "./script"
  test_path = "./test"

cc: @mds1 🙏

re1ro avatar Sep 20 '23 08:09 re1ro

I agree that extending foundry.toml is the way to add config file support. Currently, doing so results in a forge warning, so I've created https://github.com/foundry-rs/foundry/issues/5866 to unblock config file support

Though for this particular feature request we should just parse the existing foundry config and not require it to be re-defined

mds1 avatar Sep 20 '23 14:09 mds1