diff --git a/rflint/parser/rfkeyword.py b/rflint/parser/rfkeyword.py index e41682d..fd5fd05 100644 --- a/rflint/parser/rfkeyword.py +++ b/rflint/parser/rfkeyword.py @@ -20,3 +20,12 @@ def __repr__(self): # should this return the fully qualified name? return "" % self.name + # this is great, except that we don't return the line number + # or character position of each tag. The linter needs that. :-( + @property + def tags(self): + tags = [] + for statement in self.statements: + if len(statement) > 2 and statement[1].lower() == "[tags]": + tags = tags + statement[2:] + return tags