Solhint

Solhint

Community Analyzer

Enforce naming convention on functions for Foundry test cases SOLHINT-W1021

Style
Minor

Enforce naming convention on functions for Foundry test cases

Bad Practice

  1. Foundry test case with incorrect Function declaration
function numberIs42() public {}

Recommended

  1. Foundry test case with correct Function declaration
function test_NumberIs42() public {}
  1. Foundry test case with correct Function declaration
function testFail_Subtract43() public {}
  1. Foundry test case with correct Function declaration
function testFuzz_FuzzyTest() public {}

Learn more

foundry-test-functions on Solhint's documentation.