You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Since the trailing-dash fix (6937eb9), [a-z-] no longer matches "q", file[0-9a-] no longer matches "file5", and []a-] matches nothing #153
MoveTrailingClassDashes (TextFilter/TextFilter.cs, ~L474-518, added in 6937eb9 for #130) moves the dash to the front of every class that ends in -. It does this even for classes DotNet.Glob already parsed correctly, and a leading - pushes DotNet.Glob into character-list mode. There, - is a member and ranges aren't read (see #152).
The existing test (TextFilter.Test/TextFilterTests.cs, ~L970-971) only checks the rewritten text ("[0-9a-]" -> "[-0-9a]", "[]-]" -> "[-]]"), not what the result matches, so the regression got through.
Why it matters
Patterns that worked before the #130 fix now silently hide matching items. []a-] turns into a pattern that matches nothing at all.
Suggested fix / acceptance criteria
Never put the dash in front of a leading ]: []a-] should become []-a], which DotNet.Glob parses as a list where a, - and ] all match.
Rewrite only the forms that actually fail to parse, and leave classes like [a-z-] that DotNet.Glob already handles.
Notes: This is a regression: patterns that worked before now silently hide matching items, and []a-] matches nothing at all. If #152's expansion approach takes longer, a quick interim fix is to rewrite only the forms that fail to parse and never move the dash in front of a leading ]. Either way, replace the text-only rewrite assertions with match assertions.
Activity
matt-edmondson commentedon Oct 23, 2026
Triage
file[a-]is treated as unparseable: as a filter it shows every item, as an exclusion it hides nothing #130)TextFilter.MoveTrailingClassDashesglob preprocessingNotes: This is a regression: patterns that worked before now silently hide matching items, and
[]a-]matches nothing at all. If #152's expansion approach takes longer, a quick interim fix is to rewrite only the forms that fail to parse and never move the dash in front of a leading]. Either way, replace the text-only rewrite assertions with match assertions.Generated by Claude Code