naming convention detector: Fix is_mixed_case with _

pull/238/head
Josselin 6 years ago
parent 2ac8827e99
commit cb375eeb80
  1. 2
      slither/detectors/naming_convention/naming_convention.py

@ -41,7 +41,7 @@ Solidity defines a [naming convention](https://solidity.readthedocs.io/en/v0.4.2
def is_mixed_case_with_underscore(name):
# Allow _ at the beginning to represent private variable
# or unused parameters
return re.search('^[a-z_]([A-Za-z0-9]+)?_?$', name) is not None
return re.search('^[_]?[a-z]([A-Za-z0-9]+)?_?$', name) is not None
@staticmethod
def is_upper_case_with_underscores(name):

Loading…
Cancel
Save