radon-h2020/radon-gmt

Raise proper error message on YAML syntax issues

gcasale opened this issue · 4 comments

I am trialing the todo item list demo and conclude that the GMT seems
to have this bug: if one uses adds tab a tab anywhere to a TOSCA file
to indent text, then GMT won't start anymore

I am attaching the error code, you remove the tab all works fine. Is it possible to fix this?

image

Hi, could you pls post a minimal example to reproduce this error? An example of the modified YAML file would be good.

However, you are talking about "tabs"... So, the YAML spec forbids tab characters. For indentation, you have to use space characters accordingly. Otherwise, the GMT's YAML parser won't be able to process the files. Further, when using spaces, you either must use two or four spaces to indent the files (for the whole file). So, could it be the case you mixed the indentation size and introduced a YAML syntax error? I think you can also use RADON IDE and set the language to "YAML" to verify this... As I said, a minimal example would be helpful to investigate further.

Well, of course, the error message is indeed kinda misleading in such a scenario. We'll look into this to provide a more useful message.

Done over the email

The files you provided contain a YAML syntax error:
image

Line 5 has an additional indentation which results in a wrong YAML syntax. Therefore, the GMT parser complains and raises an error.

As said, I'll forward this issue to the eclipse/winery issue to provide a more useful error message in such cases.