Skip to content

Commit

Permalink
fix checkRulesCoverage (#158)
Browse files Browse the repository at this point in the history
unknown rule: don't throw exception, just add to report (once)
  • Loading branch information
drortirosh authored Nov 13, 2023
1 parent 09056eb commit 436f122
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/checkRulesCoverage
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ rules["STO-000"] = "== placehodler rule";

function foundRule(r) {
if (r.match(/UTF|eip|erc|gpl/i)) return ;
if ( !rules[r])
throw new Error(`unknown referenced rule ${r}`)
if ( unmatched[r]) {
if ( !rules[r]) {
console.log("UNKNOWN:", r)
rules[r] = "==unknown=="
} else if ( unmatched[r]) {
if ( showMatch )
console.log("matched:",r) // ${rules[r]})
totMatched++;
Expand Down

0 comments on commit 436f122

Please sign in to comment.