syntastic icon indicating copy to clipboard operation
syntastic copied to clipboard

Only one character is underlined, not the whole error

Open glibg10b opened this issue 3 years ago • 1 comments

Notice that only the "i" is underlined, not "iint":

image

GCC provides -fdiagnostics-parseable-fixits which shows the start and end lines and columns:

       -fdiagnostics-parseable-fixits
           Emit fix-it hints in a machine-parseable format, suitable for consumption by IDEs.  For each fix-it, a line will be printed after the relevant diagnostic, starting with the string "fix-it:".  For example:

                   fix-it:"test.c":{45:3-45:21}:"gtk_widget_show_all"

This applies to the gcc and avrgcc cpp checkers. I didn't test any of the other ones.

glibg10b avatar Jul 08 '22 21:07 glibg10b

Please note that syntastic is dead, deprecation note is in the README.

Please also note that even when syntastic was alive, nobody really cared about the C/C++ checkers. Syntastic is a general framework for putting error messages in a box; for C/C++ there are far more capable specialized plugins such as YCM.

Still, if you insist to fix this, patches are welcome. Please make sure the fix is only applied to the gcc versions that support fix-it, and that it doesn't break checking with CLang.

lcd047 avatar Jul 09 '22 03:07 lcd047