Enforce naming convention on functions for Foundry test cases
This rule accepts an array of options:
Index | Description | Default Value |
---|---|---|
0 | Rule severity. Must be one of “error”, “warn”, “off”. | warn |
{
"rules": {
"foundry-test-functions": ["warn",["setUp"]]
}
}
setUp
function will be skippedtest(Fork)?(Fuzz)?(Fail)?_(Revert(If_|When_){1})?\w{1,}
solhint --config .solhint.json testFolder/**/*.sol
external
and public
functionssetUp()
function by defaultfunction test_NumberIs42() public {}
function testFail_Subtract43() public {}
function testFuzz_FuzzyTest() public {}
function numberIs42() public {}
This rule was introduced in Solhint 3.6.1