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

no-loop-var-prefix: refactor to use matchtask() #2218

Merged
merged 2 commits into from Jul 4, 2022

Conversation

nishipy
Copy link
Contributor

@nishipy nishipy commented Jun 15, 2022

A part of #2105.

This PR refactors the no_loop_var_prefix rule and resolves the following problem. Please refer to here.

  • currently uses matchplay() with custom match methods: handle_play(), handle_tasks(), handle_task().
  • unlike the standard match*() methodds, the custom block detection in this rule is incomplete: it only descends into block, not rescue or always.
  • the handle_*() and matchplay() methods should be condensed into a single matchtask().

@nishipy nishipy requested review from a team as code owners June 15, 2022 15:44
@nishipy nishipy force-pushed the refactor-no-loop-var-prefix branch from 0f17070 to 759d9be Compare June 15, 2022 16:17
@nishipy nishipy force-pushed the refactor-no-loop-var-prefix branch from af5d81b to 759d9be Compare June 25, 2022 13:54
@nishipy
Copy link
Contributor Author

nishipy commented Jun 25, 2022

I will wait until the schema update gets merged

@ssbarnea ssbarnea added the skip-changelog Can be missed from the changelog. label Jul 4, 2022
@ssbarnea ssbarnea added bug and removed skip-changelog Can be missed from the changelog. labels Jul 4, 2022
@ssbarnea ssbarnea merged commit 5badf05 into ansible:main Jul 4, 2022
@ssbarnea ssbarnea changed the title Refactor no_loop_var_prefix rule to condense methods into matchtask() no-loop-var-prefix: refactor to use matchtask() Jul 11, 2022
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