Uh oh!
There was an error while loading. Please reload this page.
Fix #10039 (integrate --check-config include findings with normal analysis) / also fixes #11283 - #3229
Conversation
b657a68 to
95d4f92Compareamai2012
commented
Apr 24, 2021
I like the Idea. |
firewave
commented
Apr 24, 2021
Unfortunately I don't have the time for that. And I still need to integrate this change with the GUI (which I never used so far) and my pending changes to the CLion plugin. Is there a ticket outlining this "necessary" overhaul? If not, could you please create one? Thanks. |
amai2012
commented
Apr 25, 2021
@firewave There has been some discussion but I wasn't able to dit out a suitable trac ticket. Maybe we should focus on the details instead: so missingInclude messages should now show up in normal analysis? Is there a notable impact on performance? |
firewave
commented
Apr 25, 2021
Not that I am aware of. The checks are performed anyways but it doesn't show the detailed information of which includes are actually missing. Just the generic one that some are missing and you should run it with |
firewave
commented
Dec 20, 2021
I figured it makes more sense to just report the multiple messages in the normal analysis instead of a message which tells you to run This also would limit |
danmar
commented
Dec 22, 2021
maybe. does this encourage users to include all system paths? that would be unfortunate. can users test out cppcheck on their code without getting a flood of warnings about missing includes. Personally I would primarily suggest that
I also think we can neglect this |
firewave
commented
Dec 22, 2021
Maybe we need to introduce a That's where the idea came from. The CLion plugin is invoking the files without any proper context (since it is either not available or hard to obtain through the Plugin API) and you do not get any feedback about which include is actually missing. I would consider Going a bit off-topic: As usual I will try to be incremental about those things but it will probably not happen soon - I have spent too much here during my "ping-pong-ing". I will try to file tickets about it though. |
danmar
commented
Dec 22, 2021
I agree of course.
hmm.. I was assuming that in a IDE (plugin), it would be easy to get proper compiler configurations. |
danmar
commented
Dec 22, 2021
sorry you probably know it already .. but can you generate the compile_commands.json with cmake ? then you can run cppcheck on a single file.. |
It probably depends. The IDEA plugin is not CLion dependent but for all IDEs so it doesn't use the available CLion integration. I have not been able to build such a plugin yet and the documentation is really bad to non-existent. Beside it being buggy as hell. I got in touch with a developer and filed some bugs but nothing has come from it yet. Also me not having the time to look into it anymore isn't helping either. The plugin only having a global and no project-specific configuration makes things a bit harder.
I am not sure what you mean. Do you mean for the IDE analysis? Also you don't actually need CMake to generate a compilation database. You just need |
danmar
commented
Dec 25, 2021
if there is a compile database then the plugin can execute: to just check thefile.c |
firewave
commented
Dec 25, 2021
Ah, now I get you. That was exactly what I wanted to do but I could not figure out how to get the build directory from the IDE. I am finally getting some more feedback on how a plugin actually needs to be written and have another developer contact which I can use when I get into the development again. |
firewave
commented
Jan 9, 2022
This still needs a couple of unit tests before it is ready. |
--check-config include findings with normal analysis)427a34b to
76b3ac6Compare--check-config include findings with normal analysis)--check-config include findings with normal analysis) / also fixes #11283firewave
commented
Feb 8, 2023
This also fixes https://trac.cppcheck.net/ticket/11283 which was essentially broken in non-Windows binaries since ages. |
firewave
commented
Feb 8, 2023
|
firewave
commented
Feb 8, 2023
On a side note: That would also allow use to remove that method from the interface which will clean up things and possibly help with other things (I think this once caused me some problems in some refactoring). |
c9ac251 to
28e7146Comparedanmar
commented
Feb 8, 2023
I have the feeling we added reportInfo() so those messages can be displayed differently in the GUI.
I think that sounds OK to me. |
firewave
commented
Feb 8, 2023
That might possibly be |
…m` are being reported / suppress `missingIncludeSystem` in selfcheck
danmar
commented
Mar 4, 2023
I think for some users it will be more visible that some local headers must be included that is good! Some users will start including every header, including stdio.h etc.. that is not good. I believe we will need to try to prevent that better. This message |
firewave
commented
Mar 4, 2023
Good point. When I split |
No description provided.