Closed NiumXp closed 8 months ago
I'm adding a rich way of handling errors to format it as "short" (currently), "verbose" (with highlights and hints, like GCC does on errors/warnings), or others like JSON (#448).
Example of errors in JSON format:
norminette test.c --format=json
{ "files": [ { "path": "/home/nium/OpenSource/norminette/test.c", "status": "Error", "errors": [ { "name": "INVALID_HEADER", "text": "Missing or invalid 42 header", "level": "Error", "highlights": [{"lineno": 1, "column": 1, "length": null, "hint": null}] }, { "name": "SPACE_AFTER_KW", "text": "Missing space after keyword", "level": "Error", "highlights": [{"lineno": 3, "column": 5, "length": null, "hint": null}] } ] } ] }
Some considerations (just for now):
length
hint
null
highlights
I'm adding a rich way of handling errors to format it as "short" (currently), "verbose" (with highlights and hints, like GCC does on errors/warnings), or others like JSON (#448).
Example of errors in JSON format:
Some considerations (just for now):
length
andhint
is alwaysnull
highlights
always contains just one element