This repository has been archived by the owner on Jul 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(solidity/linter/core): now run foundry naming rule on public and …
…external functions only
- Loading branch information
1 parent
5f5bbb8
commit 70fa9b5
Showing
3 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
toolchains/solidity/linter/core/solidhunter-lib/testdata/FoundryFunctionName/file.t.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
pragma solidity 0.8.0; | ||
|
||
contract Test { | ||
function testFail_Add42() external {} // should pass | ||
|
||
function test_NumberIs42() public {} // should pass | ||
|
||
function testFail_Subtract43() public {} // should pass | ||
|
||
function testFuzz_FuzzyTest() public {} // should pass | ||
|
||
function numberIs42() public {} // should fail | ||
|
||
function YoloNamingBecauseSkipped() internal {} // should pass | ||
|
||
function YoloNamingBacausePrivate() private {} // should pass | ||
} |
2 changes: 1 addition & 1 deletion
2
toolchains/solidity/linter/core/solidhunter-lib/testdata/FoundryFunctionName/findings.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
foundry-func-name:10:13:10:23 | ||
foundry-func-name:12:13:12:23 |