Skip to content

explicit-types

🔧 Problems reported by this rule can be automatically fixed by using the --fix flag

Enforces or forbids the use of aliases like uint instead of uint256.

Examples of correct code for this rule:

contract Example {
uint256 public value;
}

Examples of incorrect code for this rule:

contract Example {
uint public value;
}

This rule has a string option:

  • "always" (default) enforces the use of explicit types.
  • "never" forbids the use of explicit types.