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


class EMatcherRule(AnsibleLintRule):
    """BANNED string found."""

    id = "TEST0001"
    description = (
        "This is a test custom rule that looks for lines containing BANNED string"
    )
    tags = ["fake", "dummy", "test1"]

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