News for hackers. Stuff that matters.
Re:27000 errors in the Tizen operating system by kronos29296 on Wednesday July 12, 2017 @12:49PM (#14754118)
The number of errors seem like pylint giving me errors. Some of them were like a is not a valid variable name. Maybe the numbers are like that. (Pylint that is not configured sanely/with default config really gives you thousands of errors and warnings for a fairly large code base and some of them were not errors but coding style.)

The numbers here may also be something like that. Nice blog post, may even make developers adopt something like cppcheck but most guys won't buy this.

Re:27000 errors in the Tizen operating system by szatkus on Wednesday July 12, 2017 @03:44PM (#14755919)
I switched to flake8. Pylint's default config is crazy.
Re:27000 errors in the Tizen operating system by pebers on Wednesday July 12, 2017 @05:07PM (#14756690)
It's not just the config; Pylint assumes it's possible to statically parse code and make some simple assumptions about things like class / module members, which only works for the most straightforward Python code. It issues constant warnings for many third-party packages - the one that broke the back of it for us was protobuf, in which it complains on every access to any one of the generated classes. In the end we moved to flake8 as well, which finds probably 90% of the issues that Pylint did but at < 1% of the false positive rate.
Re:27000 errors in the Tizen operating system by loeg on Wednesday July 12, 2017 @01:35PM (#14754586)
It's a lot like that. PVS-Studio ran against FreeBSD and produced a ton of false positives.
Re:27000 errors in the Tizen operating system by AndreyKarpov on Wednesday July 12, 2017 @01:46PM (#14754705)
The reason for this is described in the article "How to find 56 potential vulnerabilities in FreeBSD code in one evening": https://www.viva64.com/en/b/0496/#ID0ENNAC . There it is told that this is not scary and the analyzer settings can be customized.
Re:27000 errors in the Tizen operating system by jotux on Wednesday July 12, 2017 @03:30PM (#14755810)
Running any sufficiently advanced static analyzer on any large codebase will generate a ton of false positives.
Re:27000 errors in the Tizen operating system by loeg on Wednesday July 12, 2017 @05:12PM (#14756726)
So what? Qualitatively, it feels like PVS-Studio's false positive rate is higher than Coverity. And far higher than a modern free compiler's -Wall.

To describe the 27,000 detections as errors is a little misleading, and I think that's what the grandparent post is discussing.

Re:27000 errors in the Tizen operating system by AndreyKarpov on Thursday July 13, 2017 @03:25AM (#14759386)
This is not the way you think and it is not nice to mislead people. It all depends on the project.

I've heard people who said that Coverity gives many false positives and Cppcheck gives few. I've heard the opposite, that it is impossible to use Cppcheck because of the huge number of false positives, but Coverity is doing great. I heard that Coverity gives more false positives than PVS-Studio. And vice versa. And so on and so forth. What is the reason for such differences?

Projects have their certain styles of writing and different kinds of macros. These are macros and peculiarities of style that become the main source of false positives. This is why the first impression of using the analyzers of code depends on luck, and not on the coolness of the analyzer. If the analyzer doesn’t like a self-made my_assert() it will issue 10000 false positives.

So there is no point in talking abstractly about the number of false positives. Yes, you can not get lucky and there can be a lot of false positives. However, the static code analyzers allow you to configure them. In articles I have showed many times that the simplest configuration of the analyzer can greatly reduce the number of false positives. Example: https://www.viva64.com/en/b/0496/#ID0ENNAC

Re:27000 errors in the Tizen operating system by irundebian on Wednesday July 12, 2017 @05:16PM (#14756764)
If you write good code, there won't be that many FPs.