solhint icon indicating copy to clipboard operation
solhint copied to clipboard

Ignore "free functions" when checking for visibility.

Open kaspergff opened this issue 2 years ago • 1 comments

When creating a free function (a function outside of a contract) I get the following error: Linter: Explicitly mark visibility in function [func-visibility

But as explained here

"Free functions are always internal functions and are meant to replace internal library functions and their very special behaviour."

. Therefore they don't need a visibility keyword.

kaspergff avatar Apr 21 '22 10:04 kaspergff

Can confirm that this is still occurring on the latest version (v3.3.7).

It's a shame because I would like not to disable the func-visibility rule.

PaulRBerg avatar Jul 08 '22 10:07 PaulRBerg