From 436f12241b06397989fd7a522af0deca0d46ac09 Mon Sep 17 00:00:00 2001 From: Dror Tirosh Date: Mon, 13 Nov 2023 16:39:28 +0200 Subject: [PATCH] fix checkRulesCoverage (#158) unknown rule: don't throw exception, just add to report (once) --- scripts/checkRulesCoverage | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/checkRulesCoverage b/scripts/checkRulesCoverage index 11e2501e..b266bd56 100755 --- a/scripts/checkRulesCoverage +++ b/scripts/checkRulesCoverage @@ -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++;