summaryrefslogtreecommitdiffstats
path: root/test/rules/fixtures/ematcher.py
blob: cbae696a648b1bdb329f1bc4b1e22aa592d2db2f (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