replace std with rule

This commit is contained in:
Robert Kaussow 2024-01-27 18:36:32 +01:00
parent 057939ca09
commit 96c50be68f
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0

View File

@ -334,10 +334,10 @@ class RulesLoader:
)
def validate(self):
normalized_std = list(toolz.remove(lambda x: x.rid == "", self.rules))
unique_std = len(list(toolz.unique(normalized_std, key=lambda x: x.rid)))
all_std = len(normalized_std)
if all_std != unique_std:
normalize_rule = list(toolz.remove(lambda x: x.rid == "", self.rules))
unique_rule = len(list(toolz.unique(normalize_rule, key=lambda x: x.rid)))
all_rules = len(normalize_rule)
if all_rules != unique_rule:
sysexit_with_message(
"Found duplicate tags in rules definition. Please use unique tags only."
)