Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fvictorio committed Apr 23, 2020
1 parent 9a01ffd commit d8ca5a3
Show file tree
Hide file tree
Showing 40 changed files with 117 additions and 91 deletions.
90 changes: 39 additions & 51 deletions docs/rules.md
Expand Up @@ -2,38 +2,10 @@
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "Rule Index of Solhint"
date: "Wed, 19 Feb 2020 23:51:57 GMT"
date: "Thu, 23 Apr 2020 20:59:54 GMT"
author: "Franco Victorio <victorio.franco@gmail.com>"
---

## Style Guide Rules

| Rule Id | Error | Recommended |
| ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ----------- |
| [array-declaration-spaces](./rules/align/array-declaration-spaces.md) | Array declaration must not contains spaces. | ✔️ |
| [bracket-align](./rules/align/bracket-align.md) | Open bracket must be on same line. It must be indented by other constructions by space. | ✔️ |
| [expression-indent](./rules/align/expression-indent.md) | Expression indentation is incorrect. | ✔️ |
| [indent](./rules/align/indent.md) | Indentation is incorrect. | ✔️ |
| [no-mix-tabs-and-spaces](./rules/align/no-mix-tabs-and-spaces.md) | Mixed tabs and spaces. | ✔️ |
| [no-spaces-before-semicolon](./rules/align/no-spaces-before-semicolon.md) | Semicolon must not have spaces before. | ✔️ |
| [space-after-comma](./rules/align/space-after-comma.md) | Comma must be separated from next element by space. | ✔️ |
| [statement-indent](./rules/align/statement-indent.md) | Statement indentation is incorrect. | ✔️ |
| [quotes](./rules/miscellaneous/quotes.md) | Use double quotes for string literals. Values must be 'single' or 'double'. | ✔️ |
| [const-name-snakecase](./rules/naming/const-name-snakecase.md) | Constant name must be in capitalized SNAKE_CASE. | ✔️ |
| [contract-name-camelcase](./rules/naming/contract-name-camelcase.md) | Contract name must be in CamelCase. | ✔️ |
| [event-name-camelcase](./rules/naming/event-name-camelcase.md) | Event name must be in CamelCase. | ✔️ |
| [func-name-mixedcase](./rules/naming/func-name-mixedcase.md) | Function name must be in camelCase. | ✔️ |
| [func-param-name-mixedcase](./rules/naming/func-param-name-mixedcase.md) | Function name must be in camelCase. | |
| [modifier-name-mixedcase](./rules/naming/modifier-name-mixedcase.md) | Modifier name must be in mixedCase. | |
| [use-forbidden-name](./rules/naming/use-forbidden-name.md) | Avoid to use letters 'I', 'l', 'O' as identifiers. | ✔️ |
| [var-name-mixedcase](./rules/naming/var-name-mixedcase.md) | Variable name must be in mixedCase. | ✔️ |
| [func-order](./rules/order/func-order.md) | Function order is incorrect. | |
| [imports-on-top](./rules/order/imports-on-top.md) | Import statements must be on top. | ✔️ |
| [separate-by-one-line-in-contract](./rules/order/separate-by-one-line-in-contract.md) | Definitions inside contract / library must be separated by one line. | |
| [two-lines-top-level-separator](./rules/order/two-lines-top-level-separator.md) | Definition must be surrounded with two blank line indent. | |
| [visibility-modifier-order](./rules/order/visibility-modifier-order.md) | Visibility modifier must be first in list of modifiers. | ✔️ |

## Best Practise Rules

| Rule Id | Error | Recommended |
Expand All @@ -49,30 +21,46 @@ author: "Franco Victorio <victorio.franco@gmail.com>"
| [constructor-syntax](./rules/best-practises/constructor-syntax.md) | Constructors should use the new constructor keyword. | |

## Style Guide Rules

| Rule Id | Error | Recommended |
| ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------- | ----------- |
| [quotes](./rules/miscellaneous/quotes.md) | Use double quotes for string literals. Values must be 'single' or 'double'. | ✔️ |
| [const-name-snakecase](./rules/naming/const-name-snakecase.md) | Constant name must be in capitalized SNAKE_CASE. | ✔️ |
| [contract-name-camelcase](./rules/naming/contract-name-camelcase.md) | Contract name must be in CamelCase. | ✔️ |
| [event-name-camelcase](./rules/naming/event-name-camelcase.md) | Event name must be in CamelCase. | ✔️ |
| [func-name-mixedcase](./rules/naming/func-name-mixedcase.md) | Function name must be in camelCase. | ✔️ |
| [func-param-name-mixedcase](./rules/naming/func-param-name-mixedcase.md) | Function param name must be in mixedCase | |
| [modifier-name-mixedcase](./rules/naming/modifier-name-mixedcase.md) | Modifier name must be in mixedCase. | |
| [private-vars-leading-underscore](./rules/naming/private-vars-leading-underscore.md) | Private and internal names must start with a single underscore. | |
| [use-forbidden-name](./rules/naming/use-forbidden-name.md) | Avoid to use letters 'I', 'l', 'O' as identifiers. | ✔️ |
| [var-name-mixedcase](./rules/naming/var-name-mixedcase.md) | Variable name must be in mixedCase. | ✔️ |
| [func-order](./rules/order/func-order.md) | Function order is incorrect. | |
| [imports-on-top](./rules/order/imports-on-top.md) | Import statements must be on top. | ✔️ |
| [visibility-modifier-order](./rules/order/visibility-modifier-order.md) | Visibility modifier must be first in list of modifiers. | ✔️ |

## Security Rules

| Rule Id | Error | Recommended |
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------ | ----------- |
| [avoid-call-value](./rules/security/avoid-call-value.md) | Avoid to use ".call.value()()". | ✔️ |
| [avoid-low-level-calls](./rules/security/avoid-low-level-calls.md) | Avoid to use low level calls. | ✔️ |
| [avoid-sha3](./rules/security/avoid-sha3.md) | Use "keccak256" instead of deprecated "sha3". | ✔️ |
| [avoid-suicide](./rules/security/avoid-suicide.md) | Use "selfdestruct" instead of deprecated "suicide". | ✔️ |
| [avoid-throw](./rules/security/avoid-throw.md) | "throw" is deprecated, avoid to use it. | ✔️ |
| [avoid-tx-origin](./rules/security/avoid-tx-origin.md) | Avoid to use tx.origin. | ✔️ |
| [check-send-result](./rules/security/check-send-result.md) | Check result of "send" call. | ✔️ |
| [compiler-fixed](./rules/security/compiler-fixed.md) | Compiler version must be fixed. | |
| [compiler-gt-0_4](./rules/security/compiler-gt-0_4.md) | Compiler version must be fixed. | |
| [compiler-version](./rules/security/compiler-version.md) | Compiler version must satisfy a semver requirement. | ✔️ |
| [func-visibility](./rules/security/func-visibility.md) | Explicitly mark visibility in function. | ✔️ |
| [mark-callable-contracts](./rules/security/mark-callable-contracts.md) | Explicitly mark all external contracts as trusted or untrusted. | ✔️ |
| [multiple-sends](./rules/security/multiple-sends.md) | Avoid multiple calls of "send" method in single transaction. | ✔️ |
| [no-complex-fallback](./rules/security/no-complex-fallback.md) | Fallback function must be simple. | ✔️ |
| [no-inline-assembly](./rules/security/no-inline-assembly.md) | Avoid to use inline assembly. It is acceptable only in rare cases. | ✔️ |
| [no-simple-event-func-name](./rules/security/no-simple-event-func-name.md) | Event and function names must be different. | |
| [not-rely-on-block-hash](./rules/security/not-rely-on-block-hash.md) | Do not rely on "block.blockhash". Miners can influence its value. | ✔️ |
| [not-rely-on-time](./rules/security/not-rely-on-time.md) | Avoid to make time-based decisions in your business logic. | ✔️ |
| [reentrancy](./rules/security/reentrancy.md) | Possible reentrancy vulnerabilities. Avoid state changes after transfer. | ✔️ |
| [state-visibility](./rules/security/state-visibility.md) | Explicitly mark visibility of state. | ✔️ |
| Rule Id | Error | Recommended |
| ---------------------------------------------------------------------- | ------------------------------------------------------------------------ | ----------- |
| [avoid-call-value](./rules/security/avoid-call-value.md) | Avoid to use ".call.value()()". | ✔️ |
| [avoid-low-level-calls](./rules/security/avoid-low-level-calls.md) | Avoid to use low level calls. | ✔️ |
| [avoid-sha3](./rules/security/avoid-sha3.md) | Use "keccak256" instead of deprecated "sha3". | ✔️ |
| [avoid-suicide](./rules/security/avoid-suicide.md) | Use "selfdestruct" instead of deprecated "suicide". | ✔️ |
| [avoid-throw](./rules/security/avoid-throw.md) | "throw" is deprecated, avoid to use it. | ✔️ |
| [avoid-tx-origin](./rules/security/avoid-tx-origin.md) | Avoid to use tx.origin. | ✔️ |
| [check-send-result](./rules/security/check-send-result.md) | Check result of "send" call. | ✔️ |
| [compiler-version](./rules/security/compiler-version.md) | Compiler version must satisfy a semver requirement. | ✔️ |
| [func-visibility](./rules/security/func-visibility.md) | Explicitly mark visibility in function. | ✔️ |
| [mark-callable-contracts](./rules/security/mark-callable-contracts.md) | Explicitly mark all external contracts as trusted or untrusted. | ✔️ |
| [multiple-sends](./rules/security/multiple-sends.md) | Avoid multiple calls of "send" method in single transaction. | ✔️ |
| [no-complex-fallback](./rules/security/no-complex-fallback.md) | Fallback function must be simple. | ✔️ |
| [no-inline-assembly](./rules/security/no-inline-assembly.md) | Avoid to use inline assembly. It is acceptable only in rare cases. | ✔️ |
| [not-rely-on-block-hash](./rules/security/not-rely-on-block-hash.md) | Do not rely on "block.blockhash". Miners can influence its value. | ✔️ |
| [not-rely-on-time](./rules/security/not-rely-on-time.md) | Avoid to make time-based decisions in your business logic. | ✔️ |
| [reentrancy](./rules/security/reentrancy.md) | Possible reentrancy vulnerabilities. Avoid state changes after transfer. | ✔️ |
| [state-visibility](./rules/security/state-visibility.md) | Explicitly mark visibility of state. | ✔️ |

## References
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/best-practises/code-complexity.md
Expand Up @@ -2,7 +2,7 @@
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "code-complexity | Solhint"
date: "Wed, 19 Feb 2020 23:51:46 GMT"
date: "Thu, 23 Apr 2020 20:59:47 GMT"
author: "Franco Victorio <victorio.franco@gmail.com>"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/best-practises/constructor-syntax.md
Expand Up @@ -2,7 +2,7 @@
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "constructor-syntax | Solhint"
date: "Wed, 19 Feb 2020 23:51:48 GMT"
date: "Thu, 23 Apr 2020 20:59:48 GMT"
author: "Franco Victorio <victorio.franco@gmail.com>"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/best-practises/function-max-lines.md
Expand Up @@ -2,7 +2,7 @@
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "function-max-lines | Solhint"
date: "Wed, 19 Feb 2020 23:51:46 GMT"
date: "Thu, 23 Apr 2020 20:59:47 GMT"
author: "Franco Victorio <victorio.franco@gmail.com>"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/best-practises/max-line-length.md
Expand Up @@ -2,7 +2,7 @@
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "max-line-length | Solhint"
date: "Wed, 19 Feb 2020 23:51:47 GMT"
date: "Thu, 23 Apr 2020 20:59:47 GMT"
author: "Franco Victorio <victorio.franco@gmail.com>"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/best-practises/max-states-count.md
Expand Up @@ -2,7 +2,7 @@
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "max-states-count | Solhint"
date: "Wed, 19 Feb 2020 23:51:47 GMT"
date: "Thu, 23 Apr 2020 20:59:48 GMT"
author: "Franco Victorio <victorio.franco@gmail.com>"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/best-practises/no-empty-blocks.md
Expand Up @@ -2,7 +2,7 @@
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "no-empty-blocks | Solhint"
date: "Wed, 19 Feb 2020 23:51:47 GMT"
date: "Thu, 23 Apr 2020 20:59:48 GMT"
author: "Franco Victorio <victorio.franco@gmail.com>"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/best-practises/no-unused-vars.md
Expand Up @@ -2,7 +2,7 @@
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "no-unused-vars | Solhint"
date: "Wed, 19 Feb 2020 23:51:47 GMT"
date: "Thu, 23 Apr 2020 20:59:48 GMT"
author: "Franco Victorio <victorio.franco@gmail.com>"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/best-practises/payable-fallback.md
Expand Up @@ -2,7 +2,7 @@
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "payable-fallback | Solhint"
date: "Wed, 19 Feb 2020 23:51:48 GMT"
date: "Thu, 23 Apr 2020 20:59:48 GMT"
author: "Franco Victorio <victorio.franco@gmail.com>"
---

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/best-practises/reason-string.md
Expand Up @@ -2,7 +2,7 @@
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "reason-string | Solhint"
date: "Wed, 19 Feb 2020 23:51:48 GMT"
date: "Thu, 23 Apr 2020 20:59:48 GMT"
author: "Franco Victorio <victorio.franco@gmail.com>"
---

Expand Down Expand Up @@ -76,7 +76,7 @@ This rule accepts an array of options:
```

## Version
This rule was introduced in [Solhint 3.0.0-rc.1](https://github.com/protofire/solhint/tree/v3.0.0-rc.1)
This rule was introduced in [Solhint 2.3.1](https://github.com/protofire/solhint/tree/v2.3.1)

## Resources
- [Rule source](https://github.com/protofire/solhint/tree/master/lib/rules/best-practises/reason-string.js)
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/miscellaneous/quotes.md
Expand Up @@ -2,7 +2,7 @@
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "quotes | Solhint"
date: "Wed, 19 Feb 2020 23:51:48 GMT"
date: "Thu, 23 Apr 2020 20:59:49 GMT"
author: "Franco Victorio <victorio.franco@gmail.com>"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/naming/const-name-snakecase.md
Expand Up @@ -2,7 +2,7 @@
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "const-name-snakecase | Solhint"
date: "Wed, 19 Feb 2020 23:51:49 GMT"
date: "Thu, 23 Apr 2020 20:59:49 GMT"
author: "Franco Victorio <victorio.franco@gmail.com>"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/naming/contract-name-camelcase.md
Expand Up @@ -2,7 +2,7 @@
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "contract-name-camelcase | Solhint"
date: "Wed, 19 Feb 2020 23:51:49 GMT"
date: "Thu, 23 Apr 2020 20:59:49 GMT"
author: "Franco Victorio <victorio.franco@gmail.com>"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/naming/event-name-camelcase.md
Expand Up @@ -2,7 +2,7 @@
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "event-name-camelcase | Solhint"
date: "Wed, 19 Feb 2020 23:51:49 GMT"
date: "Thu, 23 Apr 2020 20:59:49 GMT"
author: "Franco Victorio <victorio.franco@gmail.com>"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/naming/func-name-mixedcase.md
Expand Up @@ -2,7 +2,7 @@
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "func-name-mixedcase | Solhint"
date: "Wed, 19 Feb 2020 23:51:49 GMT"
date: "Thu, 23 Apr 2020 20:59:49 GMT"
author: "Franco Victorio <victorio.franco@gmail.com>"
---

Expand Down

0 comments on commit d8ca5a3

Please sign in to comment.