feat(forge test
): add --skip
flag for forge test to skip compilation of specific files or folders
#9164
Labels
forge test
): add --skip
flag for forge test to skip compilation of specific files or folders
#9164
Component
Forge
Describe the feature you would like
There is a skip flag for
forge build
but no skip flag for forge test when it builds the project. I want to be able to skip compilation of non essential files when I'm only testing one specific file or function. In addition to a general skip flag when I use the--match-contract
and--match-test
flags there should be a flag to only compile the files that are used by the contract or test.Desired behavior
forge test --skip /script
Skips the compilation of all files in the script folder
forge test --match-contract Test1 --skip
Only compiles files imported and used within the Test1 contract.
Additional context
For context why I am asking for this feature is because I am building a tool called Solidings which is a version of Rustlings but for solidity. I'm trying to use foundry tests to check for completion of files but I can't run forge test because it compiles all of the files in the project every time it runs even when I'm running
--match-contract
or--match-test
. This means that for forge test to be able to run the user must complete all of the files in the entire project. This doesn't work because just like Rustlings I would like for the user to be able to check each file as the complete them.The text was updated successfully, but these errors were encountered: