Skip to content

Latest commit

 

History

History
73 lines (47 loc) · 1.7 KB

func-order.md

File metadata and controls

73 lines (47 loc) · 1.7 KB
warning layout title
This is a dynamically generated file. Do not edit manually.
default
func-order | Solhint

func-order

Deprecated Badge Category Badge Default Severity Badge warn

This rule is deprecated

Description

Function order is incorrect.

Options

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

Example Config

{
  "rules": {
    "func-order": "warn"
  }
}

Examples

👍 Examples of correct code for this rule

Constructor is placed before other functions

      pragma solidity 0.4.4;
        
        
      contract A {
        
                constructor() public {}
                function () public payable {}
            
      }
    

👎 Examples of incorrect code for this rule

Constructor is placed after other functions

      pragma solidity 0.4.4;
        
        
      contract A {
        
                function () public payable {}
                constructor() public {}
            
      }
    

Version

This rule was introduced in Solhint 2.0.0-alpha.0

Resources