-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix #10039 (integrate --check-config
include findings with normal analysis) / also fixes #11283
#3229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b657a68
to
95d4f92
Compare
I like the Idea. |
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. |
@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? |
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 |
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 |
95d4f92
to
6fc5a36
Compare
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 |
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. |
I agree of course.
hmm.. I was assuming that in a IDE (plugin), it would be easy to get proper compiler configurations. |
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 |
if there is a compile database then the plugin can execute:
to just check thefile.c |
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. |
This still needs a couple of unit tests before it is ready. |
--check-config
include findings with normal analysis)
427a34b
to
76b3ac6
Compare
76b3ac6
to
6f3c931
Compare
6f3c931
to
e025853
Compare
--check-config
include findings with normal analysis)--check-config
include findings with normal analysis) / also fixes #11283
This also fixes https://trac.cppcheck.net/ticket/11283 which was essentially broken in non-Windows binaries since ages. |
e025853
to
0070adf
Compare
0070adf
to
7afc8b1
Compare
7afc8b1
to
77218ef
Compare
|
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
28e7146
Compare
I have the feeling we added reportInfo() so those messages can be displayed differently in the GUI.
I think that sounds OK to me. |
That might possibly be |
28e7146
to
f261514
Compare
…m` are being reported / suppress `missingIncludeSystem` in selfcheck
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 |
Good point. When I split |
No description provided.