Repository navigation
Conversation
|
|
e5e3f32 to
cd2f8f5
Compare
Signed-off-by: Ric Orna <33195092+ricorna@users.noreply.github.com>
cd2f8f5 to
4083bba
Compare
|
Thanks for the bracket-class work and the fixture-backed tests. Bracket patterns have been handled since #3603 (merged 2026-08-26): the subset rtk walks itself now refuses any -name value containing "[" and hands the command to real find, so on current develop "a[0-9].txt", "a[!0-9].txt" and "[]a]*.txt" all return the right files without rtk implementing fnmatch itself. The same merge removed has_native_find_flags and rewrites the compact rtk syntax into find syntax before dispatch, so the native-versus-compact distinction this PR keys its visibility carve-out on no longer exists at that point, and #3854 (merged 2026-09-03) then chose to disclose pruned entries as "... (N filtered: hidden or gitignored)" with a tee file rather than return them. That last decision is still contested: hidden and gitignored matches are indeed missing from the results, and open issue #2995 tracks it, so a narrow PR against the current walker would be the way back in. Please comment or reopen if a case here was missed. |
Summary
findvisibility when native flags are used by disabling hidden,.ignore, and git-ignore pruning.[123],[0-9], and[!0-9].]as the first class member, including patterns such as[]a]and[!]].[as a literal instead of introducing a malformed-pattern regression.This addresses the hidden/gitignored and bracket-class false negatives documented in #2995 and its follow-up report. It overlaps the visibility portion of draft #2996, while also covering the bracket-class cases that PR does not address.
Root cause
The
ignore::WalkBuilderalways pruned hidden and ignored entries, even when RTK was transparently rewriting nativefind ... -name/-type/-maxdepthsyntax. The custom glob matcher only implemented*and?, so valid native bracket expressions silently returned no matches with exit 0.Verification
]bracket classes.cargo fmt --all -- --checkcargo clippy --locked --all-targets -- -D warningscargo test --lockedThe complete locked suite passed locally: 2,512 unit tests passed, 8 ignored, plus all integration targets.