Open marvinhagemeister opened 3 months ago
Have you tried **/dist/**
instead of **/dist
?
That will work, but I think it's a workaround. **/dist
should be still valid I think. Looking at how they run the command, they use biome format .
, so the folder will be crawled with a path like this ./dist
, which I think should match the pattern, however we know there's a bug filed (it's somewhere), and we came to the conclusion that we prefer to evaluate a better glob lib.
We have #2000.
Maybe it is a regression, because I remember making a change to ignore entire folders when specified under ignore
. We should try the reproduction on different versions of Biome.
When I add the folders explicitly they are ignored as expected:
"ignore": [
- "**/dist/",
+ "hooks/dist/",
+ "debug/dist/",
+ "compat/dist/",
+ "dist/",
]
Seems like the leading **
are not working, or maybe I'm misunderstanding the syntax.
While I was working on #3317, I noticed some code that might be related to this issue: https://github.com/biomejs/biome/blob/3c23f599d96a67e4a32e296c0419006b3e82a835/crates/biome_service/src/matcher/mod.rs#L104-L115
I think it was meant to be starts_with
, but that will still match many false positives.
And I can't see where the root
field in the Matcher
is used.
We have many issues with the glob matcher library. This is something we want to improve in Biome 2.0 I started some experimentation two month ago.
one thing that could be fixed is how "foo/*/" will match both <rootDir>/foo/x
and <rootDir>/nested/dir/foo/x
. there's currently no way to clamp down the glob to say just the /foo
at root
the only workaround i've found so far is using the parent directory name, e.g. my_repo_dir/foo/**/*
I believe I'm having this issue. https://github.com/emilte/biome-issues/tree/json-format-ignore-not-respected
Environment information
Configuration
Playground link
Steps to reproduce:
npm i
npm run build
biome format .
It will try to format all generated files in
dist/
folders despite them being ignored in the config.Code of Conduct