-
-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Panic checking json/jsonc file containing triple-quotes #2606
Comments
This is probably a duplicate of #2357. Do you have nursery lint rules enabled? |
I haven't enabled any of them, just the recommended rules. I just tried creating a new config using
a.json gives me 5 errors and doesn't panic:
hello.json bails after the first error:
|
It looks like instead of three double-quotes, I can also do any of these:
I'm not quite seeing a pattern but I've found a few other simple test cases that cause it to bail:
whereas these will work fine (reporting a handful of legit errors)
|
Oh yes that is expected. you'll need to enable nursery rules to trigger the panic in that issue. In stable releases nursery rules are disabled by default and one has to set it explicitly in the settings to enable them.
So this one is different, because this seems to be triggered by analyzing the keys instead of the values. But I guess it is still related to how we handle unterminated string literals. Apart from #2357, another similar issue reported is #2410. And thank you for providing the fail cases. |
Environment information
What happened?
biome check
on the file.Expected result
I would expect to see the errors it does report, possibly some others, but not the message about biome encountering an unexpected error. It sounds like Biome bailed out early.
Code of Conduct
The text was updated successfully, but these errors were encountered: