Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-10-26 Thread Luke Benes
> It was mentioned that the correct way is to generate the proper project > structure for cppcheck using our existing tools that generate IDE > integrations (and they have correct include correct includes, deps and all). Mike, Yes, agreed. But AFAIK, no one other than me is looking into this.

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-10-26 Thread Kaganski Mike
Hi Luke, I believe that continuing the "manual approach" is moot. It was mentioned that the correct way is to generate the proper project structure for cppcheck using our existing tools that generate IDE integrations (and they have correct include correct includes, deps and all). -- Best

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-10-26 Thread Luke Benes
> 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

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-10-26 Thread Tamás Zolnai
Hi Luke, all It does not matter that variableScope is a low priority issue or a can be dangerous . If someone want to disable a check it can be disabled explictiely (I guess). The main point that this change seems to simply reduce the scope of cppcheck. If this is the purpose then we can just run

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-10-26 Thread Jan-Marek Glogowski
Hi Luke, Am October 25, 2018 12:40:33 AM UTC schrieb Luke Benes : >In my first attempt to improve the quality of the cppcheck reports, >Tamás Zolnai pointed out that including every possible header resulted >in some valid warnings not being reported. [snip] >It seems many valid variableScope

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-10-25 Thread Michael Stahl
On 25.10.18 02:40, Luke Benes wrote: It seems many valid variableScope warnings are still being omitted. those warnings are quite dangerous anyway if naively believed, tdf#96089 was quite a pain to debug... ___ LibreOffice mailing list

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-10-24 Thread Luke Benes
In my first attempt to improve the quality of the cppcheck reports, Tamás Zolnai pointed out that including every possible header resulted in some valid warnings not being reported. Instead, how about just including only our primary include folder of ./include with the '-Iinclude' parameter?

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-10-02 Thread Tamás Zolnai
Hi Luke, slacka ezt írta (időpont: 2018. okt. 2., K, 4:05): > The goal of my manual approach was to configure Cppcheck to minimize false > positives. In doing so, I was forced to only scan the Linux code base, as > only Linux has Linux system headers and does not have Window's or BSD's... > So

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-10-02 Thread Stephan Bergmann
On 02/10/2018 04:05, slacka wrote: There are many knobs I could tweak. For example, since my last post, I discovered I could remove the "-DNDEBUG" to scan the debug code path. I could also remove the "-j 4" option to allow Cppcheck to scan for unused functions. I don't know what is most useful,

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-10-01 Thread slacka
The goal of my manual approach was to configure Cppcheck to minimize false positives. In doing so, I was forced to only scan the Linux code base, as only Linux has Linux system headers and does not have Window's or BSD's... So I am not surprised that some valid issues were not reported. There

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-10-01 Thread Miklos Vajna
Hi, On Mon, Oct 01, 2018 at 08:52:19AM +0200, Stephan Bergmann wrote: > That smells like gbuild-to-ide needs to be run from within gbuild's > "config_host.mk polluted" environment, which can be done via the "cmd" make > target, i.e., something like > > make cmd cmd='bin/gbuild-to-ide --ide

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-10-01 Thread Stephan Bergmann
On 30/09/2018 05:20, Luke Benes wrote: Also when there seems to have been a coding style that all <> includes outside of /inc folders should be defined by their relative path. Cppcheck only complains about 4 missing includes that do not follow this pattern.(see my earlier email on oddball

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-10-01 Thread Stephan Bergmann
On 30/09/2018 15:04, Maarten Hoes wrote: So, my futile attempt was : ./bin/gbuild-to-ide --ide vim --make make Which resulted in this: Traceback (most recent call last): File "./bin/gbuild-to-ide", line 1664, in gbuildparser = GbuildParser(args.makecmd).parse() File

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-09-30 Thread Maarten Hoes
Hi, On Sun, Sep 30, 2018 at 5:20 AM Luke Benes wrote: > Maarten, > Thanks for your suggestion here and your earlier contributions to the > Cppcheck Report. I agree that we should create the include file > dynamically. However the approach used by your script seems like overkill. > Cppcheck

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-09-30 Thread Maarten Hoes
Hi, On Sun, Sep 30, 2018 at 11:29 AM Tamás Zolnai wrote: > > I'm not sure what your modification is doing. I just checked the report > you attached and I compared it with the full report and I see your change > filters out not only false positives. > > Am I interpreting correctly here that the

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-09-30 Thread Maarten Hoes
Hi, slacka wrote > Ideally, the next step would be to extract the "DEFS": and "INCLUDE": from > gbuild-to-ide and pass that to cppcheck. But that's for another time. Well, the very name 'gbuild-to-ide' sounds intriguing, but I can't figure out what it is supposed to do (and how could it help

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-09-30 Thread Tamás Zolnai
Hello Luke, I'm not sure what your modification is doing. I just checked the report you attached and I compared it with the full report and I see your change filters out not only false positives. I used to use the cppcheck report to give my students a small task for their first patch. So it would

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-09-29 Thread Luke Benes
Maarten, Thanks for your suggestion here and your earlier contributions to the Cppcheck Report. I agree that we should create the include file dynamically. However the approach used by your script seems like overkill. Cppcheck already finds that quoted includes like #include

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-09-27 Thread Maarten Hoes
Hi, If, by specifying (additional ?) include files/directories and adding defines, you managed to bring down the massive zillions of warnings back to just 30, it seems to me that you managed to do what the script should have been doing all along to begin with. ;-) Just a small remark (and you

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-09-25 Thread Luke Benes
As I mentioned before, by manually specifying  includes and preprocessor configurations, I was able to reduce the number of warning from ~9000 to 30. https://drive.google.com/file/d/1Ai_Zcj18cdQxVIQESb4lJr5K9LnzjnpW/view?usp=sharing You can view it by unzipping and opening 'index.html'. Caolán

Re: Cppcheck: Reduction of False Positives: Manual Approach

2018-09-13 Thread Mike Kaganski
Hi! On 9/13/2018 8:59 AM, Luke Benes wrote: By manually specifying includes and preprocessor configurations, I was able to reduce the number of warning from ~9000 to 30. Great! Ideally, the next step would be to extract the "DEFS": and "INCLUDE": from gbuild-to-ide and pass that to

Cppcheck: Reduction of False Positives: Manual Approach

2018-09-13 Thread Luke Benes
By manually specifying includes and preprocessor configurations, I was able to reduce the number of warning from ~9000 to 30. https://drive.google.com/file/d/1Ai_Zcj18cdQxVIQESb4lJr5K9LnzjnpW/view?usp=sharing You can view it by unzipping and opening 'index.html'.Did this uncover any valid