You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your awesome work on creating and sharing this linter, and for implementing the auto-fix with no-prompt functionality!
Context
While running solhint.json with content:
{
"extends": [
"solhint:all"
],
"plugins": []
}
and .pre-commit-config.yaml configuration:
- id: solhintname: Solidity style guide compliance.entry: solhintlanguage: nodeverbose: truefiles: ^(contracts/|interfaces/|libraries/|src/|script/|test/)args:
["--fix", # Automatically fix those issues that can be auto-fixed."--noPrompt", # Do not ask for backup before fix.]
I notice that the foundry-test-functions rule is triggered on non-test files:
src/Helper.sol
8:3 warning Function computeCumRemainingInvestorReturn() must match Foundry test naming convention foundry-test-functions
Question
Would you perhaps be able to enlighten me on the following matter:
How could I tell solhint to only apply the foundry-test-functions rule to all .sol files in designated test folder(s)? Is it for example possible to override that rule to only apply to test/* in the solhint.json file? Or is there a CLI arg that allows for specification of the test files, such that solhint automatically applies that rule "intelligently"?
The text was updated successfully, but these errors were encountered:
hello @a-t-0 thanks a lot for posting!
sorry the delay... team is quite busy
you're right... right now you cannot do what you ask
I mean... i can think of a work around which I don't like much... but maybe it solves your issue
As you can see in the rules explanation, this rule should be executed in a separate folder
So you can make a json file for all the other rules using the recommended setting instead if the all and add manually all the others you need without this foundry one...
And then execute it again only for this rule in a separate folder...
This is not the best solution... we need to do a better one for this rule like specifying the folder like you said... but for now, I cannot think right now a better approach that the one I mentioned
Thank you for your awesome work on creating and sharing this linter, and for implementing the auto-fix with no-prompt functionality!
Context
While running
solhint.json
with content:and
.pre-commit-config.yaml
configuration:I notice that the
foundry-test-functions
rule is triggered on non-test files:Question
Would you perhaps be able to enlighten me on the following matter:
How could I tell solhint to only apply the
foundry-test-functions
rule to all.sol
files in designated test folder(s)? Is it for example possible to override that rule to only apply totest/*
in thesolhint.json
file? Or is there a CLI arg that allows for specification of the test files, such that solhint automatically applies that rule "intelligently"?The text was updated successfully, but these errors were encountered: