Yes, we can blacklist checks with:
cppcheck --suppress=<id>

You can see the check ids with:
cppcheck --errorlist

It's actually even more flexible, checks can be disabled for specific
files, directories and even lines in the file. And it can all be specified
in a text file then passed in with:
cppcheck --suppressions-list=<path>

Maybe we could start off running this as tier 3 (so it won't cause
backouts, but people who care can check up on it once in awhile). We could
modify the list of checks to exclude over time and maybe get a better sense
of whether or not the job is catching anything useful.

On Sun, Jun 18, 2017 at 3:08 PM, Ehsan Akhgari <ehsan.akhg...@gmail.com>
wrote:

> Is it possible to run cppcheck in a mode where we select which checks it
> runs?  If yes, we could look at the list of true positives that people have
> found (and continue to find) in bug 1370292 and create an opt-in set of
> checks that rare valuable ones to have turned on by default, and leave the
> rest off by default. (I'm hoping the effectiveness of its check isn't
> context sensitive...)
>
>
>
> On 06/06/2017 09:06 AM, Andrew Halberstadt wrote:
>
>> I was doing a bit of research into cppcheck [1] to see if it might be
>> worth
>> running as a linter (alongside eslint, flake8 etc). More discussion in bug
>> 1370292 [2]. I ran it against the entire tree [3] and got these results:
>> https://bug1370292.bmoattachments.org/attachment.cgi?id=8874498
>>
>> So far it looks like the false positive rate is too high to warrant
>> standing up a job in CI. It seems it would cause more frustration than
>> it's
>> worth. But there are likely some legit errors in there, so please take a
>> quick look to see if any apply to your module. Feel free to comment over
>> in
>> bug 1370292 if you have opinions one way or the other on standing this up
>> as a task. Barring a claim that it would be useful, I'll be WONTFIXing
>> that
>> bug in a bit.
>>
>> -Andrew
>>
>>
>> [1] http://cppcheck.sourceforge.net/
>> [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1370292
>> [3] cppcheck $(sed -e 's/^/-i/' tools/rewriting/ThirdPartyPaths.txt)
>> -ithird_party . 2> errors.txt
>> _______________________________________________
>> dev-platform mailing list
>> dev-platform@lists.mozilla.org
>> https://lists.mozilla.org/listinfo/dev-platform
>>
>
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to