Closed a-t-0 closed 5 months ago
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
this feature would help: https://github.com/protofire/solhint/issues/359
@dbale-altoros Thank you for your solution-oriented suggestion! @cruzdanilo thank you, I agree that would be a valuable feature.
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"?