Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 1.33 KB

gas-length-in-loops.md

File metadata and controls

38 lines (30 loc) · 1.33 KB
warning layout title
This is a dynamically generated file. Do not edit manually.
default
gas-length-in-loops | Solhint

gas-length-in-loops

Category Badge Default Severity Badge warn

Description

Suggest replacing object.length in a loop condition to avoid calculation on each lap

Options

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

Example Config

{
  "rules": {
    "gas-length-in-loops": "warn"
  }
}

Notes

  • source 1 of the rule initiative (see Array Length Caching)

Examples

This rule does not have examples.

Version

This rule was introduced in Solhint 4.5.0

Resources