-
Notifications
You must be signed in to change notification settings - Fork 6
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
Cppcheck should only be invoked with a single configuration #34
Comments
A workaround is using |
If there's too many configuration Cppcheck will bail out and only check at most what is configured via
So I think for the time being we should always invoke it with either |
I contacted JetBrains about this and got a contact regarding CLion plugin development. Hopefully I will get some input on this soon. |
To get the project configurations it is necessary to use CLion-specific functionality. I haven't figured out yet how to develop with them. There also were some recent changes outlined in https://blog.jetbrains.com/clion/2020/12/migration-guide-for-plugins-2020-3/ This probably makes the plugin CLion/AppCode-only but to be honest without the proper data for the file Cppcheck will never give you all the actual results. |
If we have access to the build path (I know we can access the workspace path) we could leverage a potentially existing |
Environment
cppcheck --version
): 1.90Expected behaviour
The inspections show issues in active code only.
Actual behaviour
The inspection may should code in non-active (i.e.
_MSC_VER
although GCC is being used) blocks.If Cppcheck is invoked with just a source file it tries to detect and process all configuration (i.e. defines) in the source. In case of the IDE it should only do a scan for that current configuration. This requires the plugin to get this from the IDE (if possible) and provide it to the call.
The text was updated successfully, but these errors were encountered: