Skip to content

Commit

Permalink
latest: include filename on rule match (#2378)
Browse files Browse the repository at this point in the history
Fixes regression from #2366
  • Loading branch information
ssbarnea committed Sep 1, 2022
1 parent 50612ef commit 25302dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ansiblelint/rules/latest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ def matchtask(
task["action"]["__ansible_module__"] == "git"
and task["action"].get("version", "HEAD") == "HEAD"
):
return self.create_matcherror(tag="latest[git]")
return self.create_matcherror(tag="latest[git]", filename=file)
if (
task["action"]["__ansible_module__"] == "hg"
and task["action"].get("revision", "default") == "default"
):
return self.create_matcherror(tag="latest[hg]")
return self.create_matcherror(tag="latest[hg]", filename=file)
return False

0 comments on commit 25302dc

Please sign in to comment.