Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Only one character is underlined, not the whole error #2408

Open
glibg10b opened this issue Jul 8, 2022 · 1 comment
Open

Only one character is underlined, not the whole error #2408

glibg10b opened this issue Jul 8, 2022 · 1 comment

Comments

@glibg10b
Copy link

glibg10b commented Jul 8, 2022

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.

@lcd047
Copy link
Collaborator

lcd047 commented Jul 9, 2022

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants