Skip to content

Commit

Permalink
Don't show deprecated rules as recommended
Browse files Browse the repository at this point in the history
  • Loading branch information
fvictorio committed Sep 4, 2019
1 parent 616bf79 commit 80e240a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
warning: "This is a dynamically generated file. Do not edit manually."
layout: "default"
title: "Rule Index of Solhint"
date: "Fri, 30 Aug 2019 08:43:22 GMT"
author: "Peter Chung <touhonoob@gmail.com>"
date: "Wed, 04 Sep 2019 18:09:22 GMT"
author: "Franco Victorio <victorio.franco@gmail.com>"
---

## Style Guide Rules
Expand Down Expand Up @@ -60,8 +60,8 @@ author: "Peter Chung <[email protected]>"
| [avoid-throw](./rules/security/avoid-throw.html) | "throw" is deprecated, avoid to use it. | ✔️ |
| [avoid-tx-origin](./rules/security/avoid-tx-origin.html) | Avoid to use tx.origin. | ✔️ |
| [check-send-result](./rules/security/check-send-result.html) | Check result of "send" call. | ✔️ |
| [compiler-fixed](./rules/security/compiler-fixed.html) | Compiler version must be fixed. | ✔️ |
| [compiler-gt-0_4](./rules/security/compiler-gt-0_4.html) | Compiler version must be fixed. | ✔️ |
| [compiler-fixed](./rules/security/compiler-fixed.html) | Compiler version must be fixed. | |
| [compiler-gt-0_4](./rules/security/compiler-gt-0_4.html) | Compiler version must be fixed. | |
| [compiler-version](./rules/security/compiler-version.html) | Compiler version must satisfy a semver requirement. | ✔️ |
| [func-visibility](./rules/security/func-visibility.html) | Explicitly mark visibility in function. | ✔️ |
| [mark-callable-contracts](./rules/security/mark-callable-contracts.html) | Explicitly mark all external contracts as trusted or untrusted. | ✔️ |
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-rule-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ function generateRuleIndex(rulesIndexed) {

const contents = Object.keys(rulesIndexed).map(category => {
const rows = [["Rule Id", "Error", "Recommended"]];
rulesIndexed[category].map(rule => [`[${rule.ruleId}](./rules/${rule.meta.type}/${rule.ruleId}.html)`, rule.meta.docs.description, rule.meta.recommended ? '✔️' : '']).forEach(row => rows.push(row));
rulesIndexed[category].map(rule => [`[${rule.ruleId}](./rules/${rule.meta.type}/${rule.ruleId}.html)`, rule.meta.docs.description, (rule.meta.recommended && !rule.meta.deprecated) ? '✔️' : '']).forEach(row => rows.push(row));
return `## ${category}
${table(rows)}
Expand Down

0 comments on commit 80e240a

Please sign in to comment.