Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 1.58 KB

gas-increment-by-one.md

File metadata and controls

40 lines (32 loc) · 1.58 KB
warning layout title
This is a dynamically generated file. Do not edit manually.
default
gas-increment-by-one | Solhint

gas-increment-by-one

Category Badge Default Severity Badge warn

Description

Suggest increments by one, like this ++i instead of other type

Options

This rule accepts a string option of rule severity. Must be one of "error", "warn", "off". Defaults to warn.

Example Config

{
  "rules": {
    "gas-increment-by-one": "warn"
  }
}

Notes

  • This rule only works for expressions like this: [ j = j + 1 ] but will fail if the code is written like this: [ j = 1 + j ]
  • source 1 of the rule initiative (Incrementing/Decrementing By 1)
  • source 2 of the rule initiative

Examples

This rule does not have examples.

Version

This rule was introduced in Solhint 4.5.0

Resources