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

api: enable matchtask() to return list[MatchError] #2445

Merged
merged 1 commit into from Sep 19, 2022

Conversation

ssbarnea
Copy link
Member

@ssbarnea ssbarnea commented Sep 19, 2022

Extends the API for matchtask() to allow implementations to also return list[MatchError), in addition to already supported results.

This change extends the API but does not break existing users. In the future we might want to discourage/deprecate returning the other type of results (bool, str or MatchError).

This change is needed in order to enable other rules to return multiple errors within a single task file, like enabling name rule to also report name[templating] errors. See #2444

Extends the API for matchtask() to allow implementations to also
return list[MatchError), in addition to already supported results.

This change extends the API but does not break existing users. In
the future we might want to discourage/deprecate returning the other
type of results (bool, str or MatchError).

This change is needed in order to enable other rules to return
multiple errors within a single task file, like enabling `name` rule
to also report `name[templating]` errors.
@ssbarnea ssbarnea merged commit efdac53 into ansible:main Sep 19, 2022
@ssbarnea ssbarnea deleted the fix/name branch September 19, 2022 14:47
davedittrich pushed a commit to davedittrich/ansible-lint that referenced this pull request Sep 27, 2022
Extends the API for matchtask() to allow implementations to also
return list[MatchError), in addition to already supported results.

This change extends the API but does not break existing users. In
the future we might want to discourage/deprecate returning the other
type of results (bool, str or MatchError).

This change is needed in order to enable other rules to return
multiple errors within a single task file, like enabling `name` rule
to also report `name[templating]` errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants