summaryrefslogtreecommitdiffstats
path: root/test/rules/fixtures/unset_variable_matcher.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/rules/fixtures/unset_variable_matcher.py')
-rw-r--r--test/rules/fixtures/unset_variable_matcher.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/rules/fixtures/unset_variable_matcher.py b/test/rules/fixtures/unset_variable_matcher.py
new file mode 100644
index 0000000..8486009
--- /dev/null
+++ b/test/rules/fixtures/unset_variable_matcher.py
@@ -0,0 +1,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