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

globset: add matches_all method #2900

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tmccombs
Copy link
Contributor

This returns true if all globs in the set match the supplied file.

Fixes: #2869

This returns true if all globs in the set match the supplied file.

Fixes: BurntSushi#2869
@tmccombs
Copy link
Contributor Author

See also rust-lang/regex#1228

@@ -351,6 +351,27 @@ impl GlobSet {
false
}

/// Returns true if ALL globs in this set match the path given.
Copy link
Owner

Choose a reason for hiding this comment

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

I don't think we need to use caps for ALL here. Just "all" is fine.

/// cost of peparing a path for matching.
///
/// This will return true if the set of globs is empty, as in that case all `0` of
/// the globs will match.
Copy link
Owner

Choose a reason for hiding this comment

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

Please wrap lines to 79 columns (inclusive).

Copy link
Owner

Choose a reason for hiding this comment

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

Also, this note should be added to matches_all too.

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.

feat(globset): better way to see if ALL globs match
2 participants