linter: accept instruction scope

This commit is contained in:
Willi Ballenthin
2022-04-05 12:24:41 -06:00
parent 5957dfecf0
commit f923a4ea9b

View File

@@ -161,10 +161,10 @@ class MissingScope(Lint):
class InvalidScope(Lint):
name = "invalid scope"
recommendation = "Use only file, function, or basic block rule scopes"
recommendation = "Use only file, function, basic block, or instruction rule scopes"
def check_rule(self, ctx: Context, rule: Rule):
return rule.meta.get("scope") not in ("file", "function", "basic block")
return rule.meta.get("scope") not in ("file", "function", "basic block", "instruction")
class MissingAuthor(Lint):