goblint / GobPie

Goblint IDE integration via MagpieBridge
MIT License
5 stars 3 forks source link

Multiple errors are shown when `goblint.json` is incorrect #62

Closed karoliineh closed 1 year ago

karoliineh commented 1 year ago

In case there is something wrong with the goblint.json file, multiple pop-up warnings are produced by GobPie, out of which one is actually informative and the other one is not.

For example when an unexpected object field is present in the JSON, the following warnings are produced:

GobPie failed to analyze the code: no suitable function to start from
Goblint was unable to successfully read the new configuration: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Json_encoding: Unexpected object field debug

or when there is incorrect syntax used in the JSON:

GobPie failed to analyze the code: no suitable function to start from
Goblint was unable to successfully read the new configuration: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: Yojson.Json_error("Line 19, bytes 17-50:\nInvalid token 'f\n },\n \"warn\": {\n \"r'")

Only one warning about the issues with the JSON file should be shown and the one about "no suitable function to start from" should be removed.