Skip to content

Commit

Permalink
Fix meta-incorrect rule to report correctly (#1515)
Browse files Browse the repository at this point in the history
* Fixed meta-incorrect rule to report errors correctly

* Fixed flake8 errors

* Fix lint

Co-authored-by: John <[email protected]>
  • Loading branch information
ssbarnea and ansiblejunky authored Apr 7, 2021
1 parent 58a9d8c commit 1c2e779
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ansiblelint/rules/MetaChangeFromDefaultRule.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ def matchplay(
value = galaxy_info.get(field, None)
if value and value == default:
results.append(
self.create_matcherror('Should change default metadata: %s' % field)
self.create_matcherror(
filename=file,
linenumber=data['__line__'],
message='Should change default metadata: %s' % field,
)
)

return results

0 comments on commit 1c2e779

Please sign in to comment.