summaryrefslogtreecommitdiffstats
path: root/test/rules/fixtures/ematcher.py
blob: b0340641226c0d71b55b0e1818fa51b306324257 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""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