Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid reporting runtime errors with unknown file types #1370

Merged
merged 1 commit into from Feb 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/ansiblelint/skip_utils.py
Expand Up @@ -108,10 +108,11 @@ def _append_skipped_rules(pyyaml_data: Sequence[Any], lintable: Lintable) -> Seq
# assume it is a playbook, check needs to be added higher in the
# call stack, and can remove this except
return pyyaml_data
elif lintable.kind in ['yaml', 'requirements', 'vars']:
elif lintable.kind in ['yaml', 'requirements', 'vars', 'meta', 'reno']:
return pyyaml_data
else:
raise RuntimeError('Unexpected file type: {}'.format(lintable.kind))
# For unsupported file types, we return empty skip lists
return []

# get tasks from blocks of tasks
pyyaml_tasks = _get_tasks_from_blocks(pyyaml_task_blocks)
Expand Down