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

Clarify progressive mode documentation #2708

Merged
merged 3 commits into from
Nov 21, 2022

Conversation

MarcinWieczorek
Copy link
Contributor

Hello.

In this PR I have fixed two issues regarding the progressive mode.

  1. The default config lacks progressive mode, it is only mentioned in the cli help. I have added progressive: false with a comment (which is modified from the original, see 2.)

  2. The logic behind progressive marking a success is a comparison of sets. The help says that the number of violations must be reduced, which is not true, because keeping the same number of violations is still a success: len({1,2,3} - {1,2,3}) evaluates to 0 (src/ansiblelint/__main__.py#233). Therefore ansible-lint returns success if the number of violations has not increased. This takes no change in number into account. Once again, reducing means that every commit needs to remove at least 1 violation. Note, that the warning in __main__.py states correctly that Total violations not increased since previous commit, so does the docs/usage.md: as long the total number of violations did not increase since the previous commit.

I have read test_progressive.py file and came to the conclusion that these are issues of purely documentation nature, there's no need to additionally test, but I will continue to verify that once resolvelib dependency is fixed in my distro...

Now it indicates that if would return success if the number of
violations is not increased
@ssbarnea ssbarnea changed the title Fix/docs progressive Clarify progressive mode documentation Nov 21, 2022
@ssbarnea ssbarnea merged commit 397dc1d into ansible:main Nov 21, 2022
@MarcinWieczorek MarcinWieczorek deleted the fix/docs-progressive branch November 21, 2022 13:43
@MarcinWieczorek
Copy link
Contributor Author

Thanks for merging!

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.

2 participants