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

--write: Allow Transforms to mark MatchErrors as fixed #2041

Merged
merged 7 commits into from Mar 28, 2022

Conversation

cognifloyd
Copy link
Member

@cognifloyd cognifloyd commented Mar 24, 2022

This adds MatchError.fixed so that transforms can report when they have fixed a given issue.

When a match is marked as "fixed", it is not included in the list of failures or warnings at the end of the run.
That should ensure that any remaining issues reported are actionable.

It also reports how many issues were fixed at the end of an ansible-lint --write run.

When nothing was fixed, the report stays the same:

Finished with 10 failure(s), 7 warning(s) on 12 files.

If nothing is fixed, but files were reformatted, the report looks like this:

Modified 7 files.
Finished with 10 failure(s), 7 warning(s) on 12 files.

If any matches were marked fixed then the report looks like this (anything in the "fixed" count is not counted in failures or warnings):

Modified 7 files.
Finished with 5 failure(s), 4 warning(s), and fixed 8 issue(s) on 12 files.

@cognifloyd
Copy link
Member Author

I don't understand what the eco failure is telling me, or how this change could have caused that

@cognifloyd cognifloyd merged commit 3738f6a into ansible:main Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants