Solhint

Solhint

Community Analyzer

Non-external functions and state variables should start with a single underscore. Others, shouldn't SOLHINT-W1029

Style
Minor

Non-external functions and state variables should start with a single underscore. Others, shouldn't

Bad Practice

  1. Internal function with incorrect naming
function thisIsInternal() internal {}
  1. Private function with incorrect naming
function thisIsPrivate() private {}
  1. Internal state variable with incorrect naming
uint256 internal thisIsInternalVariable;
  1. Internal state variable with incorrect naming (no visibility is considered internal)
uint256 thisIsInternalVariable;

Recommended

  1. Internal function with correct naming
function _thisIsInternal() internal {}
  1. Private function with correct naming
function _thisIsPrivate() private {}
  1. Internal state variable with correct naming
uint256 internal _thisIsInternalVariable;
  1. Internal state variable with correct naming (no visibility is considered internal)
uint256 _thisIsInternalVariable;

Learn more

private-vars-leading-underscore on Solhint's documentation.