Cppcheck: Reduction of False Positives: Manual Approach
lukebenes at hotmail.com
Fri Oct 26 16:52:33 UTC 2018
> Was it not you how came up with the idea to reduce the false positives with specifying the includes?
No, it was not my idea. On #cppcheck, I was told by danmar, the primary developer of cppcheck, that our script is using cppcheck incorrectly. Without being passed the same include locations as we pass the compiler, we should expect a large amount of garbage.
In fact, according to the developer, we should not get any False Postives if we call cppcheck correctly. He encouraged me to file bug reports for any FP that remain, once cppcheck is being run properly.
> The main point that this change seems to simply reduce the scope of cppcheck. If this is the purpose then we can just run cppcheck on an empty file and so we won't see any issue (all false positives will disappear).
Again, No my goal is to improve the Signal-to-noise. FPs can be dangerous as in tdf#96089 and make it much harder to spot real issues.
Currently, I am in the process of comparing old cppcheck fixes with and without the '-Iinclude' option. So far, the three that I have checked would not be filtered out. In other words, had we been calling cppcheck the way I propose, these issues would have been much easier for developers to spot(4000 vs 500).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LibreOffice