This might be a newbie stupid question, but I would like to replace my compiler gcc.exe with a call to cppcheck. Ideally the error output of ccpcheck would match the same format as GCC errors such that the IDE can parse correctly. I am not sure if this is possible already or not?
Thanks
Trampas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hmm, i have not tried that. If the IDE uses only parameters that Cppcheck also knows (like -I, -D) or if you can customize it then it maybe works.
You can add the parameter "--template=gcc" to the Cppcheck call so the error format is like the one from GCC, then the IDE should be able to parse it.
Maybe you can try that and report how it worked :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to get my IDE, eclipse, to work and could not as I could not turn off some compiler command line options.
One of the reasons I wanted to do this is that it would be nice to setup with MISRA rules and basically do a build for cppcheck.
I know there is a plugin for ecplise for cppcheck but currently it does not parse errors correctly in eclipse and does not allow plugins.
Another option might be write a script (python/bash) that removes the GCC command line options and calls cppcheck, or maybe better would be to modify cppcheck with a configuration file where you could configure command line parameters to ignore.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This might be a newbie stupid question, but I would like to replace my compiler gcc.exe with a call to cppcheck. Ideally the error output of ccpcheck would match the same format as GCC errors such that the IDE can parse correctly. I am not sure if this is possible already or not?
Thanks
Trampas
Hmm, i have not tried that. If the IDE uses only parameters that Cppcheck also knows (like -I, -D) or if you can customize it then it maybe works.
You can add the parameter "--template=gcc" to the Cppcheck call so the error format is like the one from GCC, then the IDE should be able to parse it.
Maybe you can try that and report how it worked :)
I tried to get my IDE, eclipse, to work and could not as I could not turn off some compiler command line options.
One of the reasons I wanted to do this is that it would be nice to setup with MISRA rules and basically do a build for cppcheck.
I know there is a plugin for ecplise for cppcheck but currently it does not parse errors correctly in eclipse and does not allow plugins.
Another option might be write a script (python/bash) that removes the GCC command line options and calls cppcheck, or maybe better would be to modify cppcheck with a configuration file where you could configure command line parameters to ignore.