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

Expand coverage of path globbing #1709

Merged
merged 8 commits into from Oct 1, 2021

Conversation

greg-hellings
Copy link
Contributor

@greg-hellings greg-hellings commented Aug 30, 2021

Exclude path handling does not pick up very many glob matches. This
improves the matching by adding in fnmatch module usage

Fixes: #1561

Exclude path handling does not pick up very many glob matches. This
improves the matching by adding in fnmatch module usage
@ssbarnea ssbarnea requested a review from webknjaz August 31, 2021 10:36
@@ -76,12 +76,17 @@ def test_runner_exclude_paths(default_rules_collection: RulesCollection) -> None
assert len(matches) == 0


def test_runner_exclude_globs(default_rules_collection: RulesCollection) -> None:
@pytest.mark.parametrize(
('exclude_path'), ('**/example.yml', 'examples/**/example.yml')
Copy link
Contributor

Choose a reason for hiding this comment

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

Those samples are not the best since they, while being valid globs, are too similar to the extended (wildcard) matches that are supported by the wcmatch library for example. Maybe we should add some more bash-like expressions here? Things like *.yml, etc.

@webknjaz webknjaz added the new Triage required label Sep 13, 2021
@ssbarnea ssbarnea requested a review from a team as a code owner October 1, 2021 10:15
@ssbarnea ssbarnea removed the new Triage required label Oct 1, 2021
@ssbarnea ssbarnea requested a review from tadeboro October 1, 2021 10:24
@ssbarnea ssbarnea added bug and removed enhancement labels Oct 1, 2021
@ssbarnea ssbarnea merged commit af402d0 into ansible:main Oct 1, 2021
@greg-hellings greg-hellings deleted the more_glob_match_excludes branch October 1, 2021 15:04
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

4 participants