Open dyc3 opened 1 month ago
The pattern logic is an internal fork of glob
: https://docs.rs/glob/latest/glob/struct.pattern.html
Other than that, unfortunately I can't give you more information, we will have to figure it out ourselves.
Regarding the recursion, I think it's safe to assume that we don't want to support nested patterns deeper than one level:
{*.ts, *.js}
yes{{*.ts, *.js}}
noEven other libraries that offer Unix glob parsing and matching don't support nested patterns.
If we set this as a goal, I think recursion isn't needed. Or we could use it, and it should not put too much memory pressure.
FYI, there're some pre-discussions here: #2620
I think we can set this task for Biome 2.0 because this will require a breaking change.
@Conaclos why was this PR merged if the milestone is set for Biome 2.0?
does this still need to be open?
Yes. The code for this is already implemented, but it's placed behind a flag. This issue should be closed when that flag is removed in biome 2.0.
Summary
We want to support
{a,b}
pattern matching syntax for includes and excludes. It will allow us to more comprehensively support all the patterns that the Editorconfig spec defines (although not completely).Specifically, this syntax is to indicate that in the pattern
{a,b}
, there is a comma separated list of patterns that are applicable in that position.