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

Add MatchesExact function #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

jedevc
Copy link
Member

@jedevc jedevc commented Aug 7, 2024

This function allows matching on the full path, without attempting to match any parent elements of the path.

This was technically possible before, by calling the deprecated MatchesUsingParentResult and always setting parentMatched to false. However, this is quite hacky and results in quite tricky-to-read code (and also didn't have tests, etc). So this patch adds in a proper function for this, and ensures it works with some refactored tests.

@jedevc jedevc force-pushed the add-matches-exact branch 3 times, most recently from 6283fdf to ab6276d Compare August 7, 2024 10:14
This function allows matching on the full path, without attempting to
match any parent elements of the path.

This was *technically* possible before, by calling the deprecated
`MatchesUsingParentResult` and always setting `parentMatched` to
`false`. However, this is quite hacky and results in quite
tricky-to-read code (and also didn't have tests, etc). So this patch
adds in a proper function for this, and ensures it works with some
refactored tests.

Signed-off-by: Justin Chadwell <me@jedevc.com>
@jedevc
Copy link
Member Author

jedevc commented Sep 18, 2024

cc @thaJeztah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant