forked from protofire/solhint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
668 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
warning: "This is a dynamically generated file. Do not edit manually." | ||
layout: "default" | ||
title: "Rule Index of Solhint" | ||
date: "Sat, 24 Aug 2019 10:42:48 GMT" | ||
date: "Sun, 25 Aug 2019 22:09:23 GMT" | ||
author: "Peter Chung <[email protected]>" | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
warning: "This is a dynamically generated file. Do not edit manually." | ||
layout: "default" | ||
title: "array-declaration-spaces | Solhint" | ||
date: "Sat, 24 Aug 2019 03:06:48 GMT" | ||
date: "Sun, 25 Aug 2019 22:09:14 GMT" | ||
author: "Peter Chung <[email protected]>" | ||
--- | ||
|
||
|
@@ -17,7 +17,17 @@ author: "Peter Chung <[email protected]>" | |
Array declaration must not contains spaces. | ||
|
||
## Options | ||
This rule does not have options. | ||
This rule accepts a string option of rule severity. Must be one of "error", "warn", "off". Default to warn. | ||
|
||
### Example Config | ||
```json | ||
{ | ||
"rules": { | ||
"array-declaration-spaces": "warn" | ||
} | ||
} | ||
``` | ||
|
||
|
||
## Examples | ||
### 👍 Examples of **correct** code for this rule | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
warning: "This is a dynamically generated file. Do not edit manually." | ||
layout: "default" | ||
title: "bracket-align | Solhint" | ||
date: "Sat, 24 Aug 2019 03:06:48 GMT" | ||
date: "Sun, 25 Aug 2019 22:09:15 GMT" | ||
author: "Peter Chung <[email protected]>" | ||
--- | ||
|
||
|
@@ -17,7 +17,17 @@ author: "Peter Chung <[email protected]>" | |
Open bracket must be on same line. It must be indented by other constructions by space. | ||
|
||
## Options | ||
This rule does not have options. | ||
This rule accepts a string option of rule severity. Must be one of "error", "warn", "off". Default to warn. | ||
|
||
### Example Config | ||
```json | ||
{ | ||
"rules": { | ||
"bracket-align": "warn" | ||
} | ||
} | ||
``` | ||
|
||
|
||
## Examples | ||
### 👍 Examples of **correct** code for this rule | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
warning: "This is a dynamically generated file. Do not edit manually." | ||
layout: "default" | ||
title: "expression-indent | Solhint" | ||
date: "Sat, 24 Aug 2019 03:06:49 GMT" | ||
date: "Sun, 25 Aug 2019 22:09:15 GMT" | ||
author: "Peter Chung <[email protected]>" | ||
--- | ||
|
||
|
@@ -17,7 +17,17 @@ author: "Peter Chung <[email protected]>" | |
Expression indentation is incorrect. | ||
|
||
## Options | ||
This rule does not have options. | ||
This rule accepts a string option of rule severity. Must be one of "error", "warn", "off". Default to warn. | ||
|
||
### Example Config | ||
```json | ||
{ | ||
"rules": { | ||
"expression-indent": "warn" | ||
} | ||
} | ||
``` | ||
|
||
|
||
## Examples | ||
### 👍 Examples of **correct** code for this rule | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
warning: "This is a dynamically generated file. Do not edit manually." | ||
layout: "default" | ||
title: "indent | Solhint" | ||
date: "Sat, 24 Aug 2019 03:06:49 GMT" | ||
date: "Sun, 25 Aug 2019 22:09:15 GMT" | ||
author: "Peter Chung <[email protected]>" | ||
--- | ||
|
||
|
@@ -21,10 +21,20 @@ Indentation is incorrect. | |
## Options | ||
This rule accepts an array of options: | ||
|
||
| Index | Description | Default Value | | ||
| ----- | ---------------------------------------------- | ------------- | | ||
| 0 | Rule severity. Must be one of "error", "warn". | error | | ||
| 1 | Number of indents | 4 | | ||
| Index | Description | Default Value | | ||
| ----- | ----------------------------------------------------- | ------------- | | ||
| 0 | Rule severity. Must be one of "error", "warn", "off". | error | | ||
| 1 | Number of indents | 4 | | ||
|
||
|
||
### Example Config | ||
```json | ||
{ | ||
"rules": { | ||
"indent": ["error",4] | ||
} | ||
} | ||
``` | ||
|
||
|
||
## Examples | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
warning: "This is a dynamically generated file. Do not edit manually." | ||
layout: "default" | ||
title: "no-mix-tabs-and-spaces | Solhint" | ||
date: "Sat, 24 Aug 2019 03:06:49 GMT" | ||
date: "Sun, 25 Aug 2019 22:09:15 GMT" | ||
author: "Peter Chung <[email protected]>" | ||
--- | ||
|
||
|
@@ -17,7 +17,17 @@ author: "Peter Chung <[email protected]>" | |
Mixed tabs and spaces. | ||
|
||
## Options | ||
This rule does not have options. | ||
This rule accepts a string option of rule severity. Must be one of "error", "warn", "off". Default to warn. | ||
|
||
### Example Config | ||
```json | ||
{ | ||
"rules": { | ||
"no-mix-tabs-and-spaces": "warn" | ||
} | ||
} | ||
``` | ||
|
||
|
||
## Examples | ||
### 👎 Examples of **incorrect** code for this rule | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
warning: "This is a dynamically generated file. Do not edit manually." | ||
layout: "default" | ||
title: "no-spaces-before-semicolon | Solhint" | ||
date: "Sat, 24 Aug 2019 10:42:48 GMT" | ||
date: "Sun, 25 Aug 2019 22:09:15 GMT" | ||
author: "Peter Chung <[email protected]>" | ||
--- | ||
|
||
|
@@ -17,7 +17,17 @@ author: "Peter Chung <[email protected]>" | |
Semicolon must not have spaces before. | ||
|
||
## Options | ||
This rule does not have options. | ||
This rule accepts a string option of rule severity. Must be one of "error", "warn", "off". Default to warn. | ||
|
||
### Example Config | ||
```json | ||
{ | ||
"rules": { | ||
"no-spaces-before-semicolon": "warn" | ||
} | ||
} | ||
``` | ||
|
||
|
||
## Examples | ||
### 👍 Examples of **correct** code for this rule | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
warning: "This is a dynamically generated file. Do not edit manually." | ||
layout: "default" | ||
title: "space-after-comma | Solhint" | ||
date: "Sat, 24 Aug 2019 03:06:49 GMT" | ||
date: "Sun, 25 Aug 2019 22:09:15 GMT" | ||
author: "Peter Chung <[email protected]>" | ||
--- | ||
|
||
|
@@ -17,7 +17,17 @@ author: "Peter Chung <[email protected]>" | |
Comma must be separated from next element by space. | ||
|
||
## Options | ||
This rule does not have options. | ||
This rule accepts a string option of rule severity. Must be one of "error", "warn", "off". Default to warn. | ||
|
||
### Example Config | ||
```json | ||
{ | ||
"rules": { | ||
"space-after-comma": "warn" | ||
} | ||
} | ||
``` | ||
|
||
|
||
## Examples | ||
### 👍 Examples of **correct** code for this rule | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
warning: "This is a dynamically generated file. Do not edit manually." | ||
layout: "default" | ||
title: "statement-indent | Solhint" | ||
date: "Sat, 24 Aug 2019 03:06:49 GMT" | ||
date: "Sun, 25 Aug 2019 22:09:16 GMT" | ||
author: "Peter Chung <[email protected]>" | ||
--- | ||
|
||
|
@@ -17,7 +17,17 @@ author: "Peter Chung <[email protected]>" | |
Statement indentation is incorrect. | ||
|
||
## Options | ||
This rule does not have options. | ||
This rule accepts a string option of rule severity. Must be one of "error", "warn", "off". Default to warn. | ||
|
||
### Example Config | ||
```json | ||
{ | ||
"rules": { | ||
"statement-indent": "warn" | ||
} | ||
} | ||
``` | ||
|
||
|
||
## Examples | ||
### 👍 Examples of **correct** code for this rule | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
warning: "This is a dynamically generated file. Do not edit manually." | ||
layout: "default" | ||
title: "code-complexity | Solhint" | ||
date: "Sat, 24 Aug 2019 03:06:50 GMT" | ||
date: "Sun, 25 Aug 2019 22:09:16 GMT" | ||
author: "Peter Chung <[email protected]>" | ||
--- | ||
|
||
|
@@ -16,10 +16,20 @@ Function has cyclomatic complexity "current" but allowed no more than maxcompl. | |
## Options | ||
This rule accepts an array of options: | ||
|
||
| Index | Description | Default Value | | ||
| ----- | ---------------------------------------------- | ------------- | | ||
| 0 | Rule severity. Must be one of "error", "warn". | warn | | ||
| 1 | Maximum allowed cyclomatic complexity | 7 | | ||
| Index | Description | Default Value | | ||
| ----- | ----------------------------------------------------- | ------------- | | ||
| 0 | Rule severity. Must be one of "error", "warn", "off". | warn | | ||
| 1 | Maximum allowed cyclomatic complexity | 7 | | ||
|
||
|
||
### Example Config | ||
```json | ||
{ | ||
"rules": { | ||
"code-complexity": ["warn",7] | ||
} | ||
} | ||
``` | ||
|
||
|
||
## Examples | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
warning: "This is a dynamically generated file. Do not edit manually." | ||
layout: "default" | ||
title: "constructor-syntax | Solhint" | ||
date: "Sat, 24 Aug 2019 03:06:51 GMT" | ||
date: "Sun, 25 Aug 2019 22:09:17 GMT" | ||
author: "Peter Chung <[email protected]>" | ||
--- | ||
|
||
|
@@ -14,7 +14,17 @@ author: "Peter Chung <[email protected]>" | |
Constructors should use the new constructor keyword. | ||
|
||
## Options | ||
This rule does not have options. | ||
This rule accepts a string option of rule severity. Must be one of "error", "warn", "off". Default to warn. | ||
|
||
### Example Config | ||
```json | ||
{ | ||
"rules": { | ||
"constructor-syntax": "warn" | ||
} | ||
} | ||
``` | ||
|
||
|
||
## Examples | ||
This rule does not have examples. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
warning: "This is a dynamically generated file. Do not edit manually." | ||
layout: "default" | ||
title: "function-max-lines | Solhint" | ||
date: "Sat, 24 Aug 2019 03:06:50 GMT" | ||
date: "Sun, 25 Aug 2019 22:09:16 GMT" | ||
author: "Peter Chung <[email protected]>" | ||
--- | ||
|
||
|
@@ -16,10 +16,20 @@ Function body contains "count" lines but allowed no more than maxlines. | |
## Options | ||
This rule accepts an array of options: | ||
|
||
| Index | Description | Default Value | | ||
| ----- | ---------------------------------------------- | ------------- | | ||
| 0 | Rule severity. Must be one of "error", "warn". | warn | | ||
| 1 | Maximum allowed lines count per function | 50 | | ||
| Index | Description | Default Value | | ||
| ----- | ----------------------------------------------------- | ------------- | | ||
| 0 | Rule severity. Must be one of "error", "warn", "off". | warn | | ||
| 1 | Maximum allowed lines count per function | 50 | | ||
|
||
|
||
### Example Config | ||
```json | ||
{ | ||
"rules": { | ||
"function-max-lines": ["warn",50] | ||
} | ||
} | ||
``` | ||
|
||
|
||
## Examples | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
warning: "This is a dynamically generated file. Do not edit manually." | ||
layout: "default" | ||
title: "max-line-length | Solhint" | ||
date: "Sat, 24 Aug 2019 03:06:50 GMT" | ||
date: "Sun, 25 Aug 2019 22:09:16 GMT" | ||
author: "Peter Chung <[email protected]>" | ||
--- | ||
|
||
|
@@ -18,10 +18,20 @@ Line length must be no more than maxlen. | |
## Options | ||
This rule accepts an array of options: | ||
|
||
| Index | Description | Default Value | | ||
| ----- | ---------------------------------------------- | ------------- | | ||
| 0 | Rule severity. Must be one of "error", "warn". | error | | ||
| 1 | Maximum allowed number of characters per line | 120 | | ||
| Index | Description | Default Value | | ||
| ----- | ----------------------------------------------------- | ------------- | | ||
| 0 | Rule severity. Must be one of "error", "warn", "off". | error | | ||
| 1 | Maximum allowed number of characters per line | 120 | | ||
|
||
|
||
### Example Config | ||
```json | ||
{ | ||
"rules": { | ||
"max-line-length": ["error",120] | ||
} | ||
} | ||
``` | ||
|
||
|
||
## Examples | ||
|
Oops, something went wrong.