glob: honour backslash escapes of non-special characters in scan() - #32876
Open
robobun wants to merge 5 commits into
Open
glob: honour backslash escapes of non-special characters in scan()#32876robobun wants to merge 5 commits into
robobun wants to merge 5 commits into
Claude / Claude Code Review
completed
Jun 27, 2026 in 27m 13s
Code review found 1 potential issue
Found 1 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 0 |
| 🟣 Pre-existing | 1 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟣 Pre-existing | src/glob/GlobWalker.rs:1942-1948 |
WildcardFilepath bailout loop scans past component end |
Annotations
Check notice on line 1948 in src/glob/GlobWalker.rs
claude / Claude Code Review
WildcardFilepath bailout loop scans past component end
Pre-existing nit (perf-only): this loop iterates `pattern[(component.start + 2)..]` to the end of the **full** pattern string rather than to `(component.start + component.len)`, so a special token in a *later* component (e.g. the second `*` in `*.ts/*.js`, or now a `\` in `*.ts/foo\ bar`) defeats the `WildcardFilepath` fast path for the earlier `*.ts` component. Since this PR touches the match arm anyway, you could tighten the slice to `&pattern[(component.start + 2) as usize..(component.start +
Loading