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

Assure we do not produce duplicated matches #912

Merged
merged 1 commit into from
Jul 24, 2020
Merged

Assure we do not produce duplicated matches #912

merged 1 commit into from
Jul 24, 2020

Conversation

ssbarnea
Copy link
Member

Due to the way we parse files it is possible to get duplicated matches.

This change avoids printing duplications and also assures no regressions are made.

Our examples/example.yml was not used during testing and was a good example that caused duplicates. Now we test it and assure we find the exact number of matches that we were expecting.

@ssbarnea ssbarnea requested a review from webknjaz July 23, 2020 09:18
@ssbarnea ssbarnea added this to the 4.3.0 milestone Jul 23, 2020
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing tests for cases with MatchError being the same except for different MatchError.line. Per https://github.com/ansible/ansible-lint/pull/881/files#r451486472.

I think this is introducing a regression without that.

Due to the way we parse files it is possible to get duplicated
matches.

This change avoids printing duplications and also assures no
regressions are made.

Our examples/example.yml was not used during testing and was a good
example that caused duplicates. Now we test it and assure we
find the exact number of matches that we were expecting.
@ssbarnea
Copy link
Member Author

This is missing tests for cases with MatchError being the same except for different MatchError.line. Per #881 (files).

I think this is introducing a regression without that.

Refactoring to details removed this issue. Now details matters and different value will be counted.

@ssbarnea ssbarnea removed the review label Jul 24, 2020
@ssbarnea ssbarnea changed the title Assure we do not produce duplicated matches Assure we do not produce duplicated matches Jul 24, 2020
@ssbarnea ssbarnea merged commit aec7d8f into ansible:master Jul 24, 2020
@ssbarnea ssbarnea deleted the fix/nodups branch July 24, 2020 10:25
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.

2 participants