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

Asure matchtasks is runs on supported file kinds #1474

Merged
merged 1 commit into from Mar 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
2 changes: 1 addition & 1 deletion src/ansiblelint/rules/__init__.py
Expand Up @@ -89,7 +89,7 @@ def matchlines(self, file: "Lintable") -> List[MatchError]:
# https://github.com/ansible-community/ansible-lint/issues/744
def matchtasks(self, file: Lintable) -> List[MatchError]:
matches: List[MatchError] = []
if not self.matchtask or file.kind == 'meta':
if not self.matchtask or file.kind not in ['handlers', 'tasks', 'playbook']:
return matches

yaml = ansiblelint.utils.parse_yaml_linenumbers(file)
Expand Down