linter: check for namespace instead of rule-category

This commit is contained in:
William Ballenthin
2020-06-26 17:52:32 -06:00
parent 36749df848
commit 35faa20e9e

View File

@@ -39,12 +39,13 @@ class NameCasing(Lint):
rule.name[1] not in string.ascii_uppercase)
class MissingRuleCategory(Lint):
name = 'missing rule category'
recommendation = 'Add meta.rule-category so that the rule is emitted correctly'
class MissingNamespace(Lint):
name = 'missing rule namespace'
recommendation = 'Add meta.namespace so that the rule is emitted correctly'
def check_rule(self, ctx, rule):
return ('rule-category' not in rule.meta and
return ('namespace' not in rule.meta and
'nursery' not in rule.meta and
'maec/malware-category' not in rule.meta and
'lib' not in rule.meta)