summaryrefslogtreecommitdiffstats
path: root/test/rules/fixtures/unset_variable_matcher.py
blob: 848600937c8c22f2b92255b912f1554894abb9da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""Custom linting rule used as test fixture."""
from ansiblelint.rules import AnsibleLintRule


class UnsetVariableMatcherRule(AnsibleLintRule):
    """Line contains untemplated variable."""

    id = "TEST0002"
    description = (
        "This is a test rule that looks for lines post templating that still contain {{"
    )
    tags = ["fake", "dummy", "test2"]

    def match(self, line: str) -> bool:
        return "{{" in line