Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Rule: foundry test function names and other fixes #476

Merged
merged 3 commits into from Aug 11, 2023

Conversation

dbale-altoros
Copy link
Collaborator

Added rule described here:
#402

Also updated doc generator to write Notes on each rule if needed

@dbale-altoros dbale-altoros force-pushed the i402-foundry-test-function-names branch 7 times, most recently from 2ce9515 to 1ea6d35 Compare August 9, 2023 20:25
@dbale-altoros dbale-altoros merged commit 02bb01d into develop Aug 11, 2023
10 checks passed
@pcaversaccio
Copy link

pcaversaccio commented Aug 12, 2023

I always use the naming scheme testFunctionName (without the _), which leads to the following warnings:

test/CreateX.t.sol
   50:5  warning  Function testDeployCreatePayable() must match Foundry test naming convention              foundry-test-functions
   78:5  warning  Function testDeployCreateZeroBytesNonPayable() must match Foundry test naming convention  foundry-test-functions
   83:5  warning  Function testDeployCreateZeroBytesPayable() must match Foundry test naming convention     foundry-test-functions
   88:5  warning  Function testDeployCreateRevertNonPayable() must match Foundry test naming convention     foundry-test-functions
   93:5  warning  Function testDeployCreateRevertPayable() must match Foundry test naming convention        foundry-test-functions
   98:5  warning  Function testFuzzDeployCreateNonPayable() must match Foundry test naming convention       foundry-test-functions
  128:5  warning  Function testFuzzDeployCreatePayable() must match Foundry test naming convention          foundry-test-functions

I don't think this should issue a warning tbh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants