goblint / analyzer

Static analysis framework for C
https://goblint.in.tum.de
MIT License
184 stars 75 forks source link

JSON5 conf files #1524

Open sim642 opened 5 months ago

sim642 commented 5 months ago

Yojson now has JSON5 support: https://github.com/ocaml-community/yojson/pull/152. This would give support for comments and trailing commas. The annoying thing about JSON5 is that Microsoft and VSCode seem to be immune to it (https://github.com/microsoft/vscode/issues/100688), so JSON5 syntax highlighting requires installing a separate extension.

Actually, Yojson's non-JSON5 parser also allows comments which we could already use, but that might confuse some other tooling. For example, VSCode doesn't like comments in .json files, but is fine with them using .jsonc extension (for JSON with comments). But that extension is quite uncommon.

sim642 commented 2 weeks ago

We could also allow YAML conf files with minimal effort: we already include the yaml library for YAML witnesses.