Skip to content

Commit

Permalink
feat: Handle uninstalled yamllint as rule violation
Browse files Browse the repository at this point in the history
  • Loading branch information
dosmanak committed Apr 27, 2021
1 parent 83cb495 commit 17a17aa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/ansiblelint/rules/YamllintRule.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ def matchyaml(self, file: Lintable) -> List["MatchError"]:
tag=p.rule,
)
)
else:
matches.append(
self.create_matcherror(
message="yamllint.config module is not present",
details="Install yamllint package so ansiblelint can invoke it.",
filename="YamllintRule.py",
linenumber=15
)
)

if matches:
lines = file.content.splitlines()
Expand Down

0 comments on commit 17a17aa

Please sign in to comment.