Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.5 KB

gas-named-return-values.md

File metadata and controls

50 lines (37 loc) · 1.5 KB
warning layout title
This is a dynamically generated file. Do not edit manually.
default
gas-named-return-values | Solhint

gas-named-return-values

Category Badge Default Severity Badge warn

Description

Enforce the return values of a function to be named

Options

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

Example Config

{
  "rules": {
    "gas-named-return-values": "warn"
  }
}

Examples

👍 Examples of correct code for this rule

Function definition with named return values

function checkBalance(address wallet) external view returns(uint256 retBalance) {}

👎 Examples of incorrect code for this rule

Function definition with UNNAMED return values

function checkBalance(address wallet) external view returns(uint256) {}

Version

This rule was introduced in Solhint 4.5.0

Resources