slither icon indicating copy to clipboard operation
slither copied to clipboard

Allow underscore in variable naming convention

Open 0xalpharush opened this issue 3 years ago • 2 comments

It's pretty common to include underscores to prefix internal variables or to distinguish between arguments and state variables. We should not include these in the camel case naming convention detector

0xalpharush avatar Feb 04 '22 00:02 0xalpharush

They claim to support the underscore rule but I also hit this issue.

stephenctw avatar Sep 02 '22 11:09 stephenctw

This is affecting us, too. The use of _name or name_ to prevent collision is very common, and necessary. Using _name should not trigger an error, as it is a standard convention.

smallbatch-apps avatar Sep 20 '22 08:09 smallbatch-apps

This lines need to be update to include internal state variables: https://github.com/crytic/slither/blob/0ec487460690482c72cacdea6705e2c51bb3981e/slither/detectors/naming_convention/naming_convention.py#L165

0xalpharush avatar Mar 25 '23 03:03 0xalpharush

bump

devtooligan avatar Jun 28 '23 00:06 devtooligan