Skip to content

Commit

Permalink
jinja[spacing]: Avoid evaluating noqa comments (#2329)
Browse files Browse the repository at this point in the history
Fixes: #2318
  • Loading branch information
ssbarnea authored Aug 24, 2022
1 parent 8b719f4 commit ec7599c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ansiblelint/yaml_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ def _nested_items_path(
f"of type '{type(data_collection)}'"
)
for key, value in convert_data_collection_to_tuples():
if key in ("skipped_rules", "__file__", "__line__"):
continue
yield key, value, parent_path
if isinstance(value, (dict, list)):
yield from _nested_items_path(
Expand Down

0 comments on commit ec7599c

Please sign in to comment.