pub fn matches_pattern(
files: &[PathBuf],
project_root: &Path,
pattern: &str,
) -> boolExpand description
Check if any of the given files match a pattern.
Supports two matching modes:
- Simple paths: Patterns without wildcards (
*,?,[) are treated as path prefixes. For example,"crates"matches"crates/foo/bar.rs". - Glob patterns: Patterns with wildcards use glob matching.
§Arguments
files- Changed file paths (typically repo-relative from git diff)project_root- The project root for normalizing pathspattern- The input pattern to match against
§Returns
true if any file matches the pattern