Skip to content
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

Consider running cppcheck on the CI #3316

Open
gilles-peskine-arm opened this issue May 7, 2020 · 1 comment
Open

Consider running cppcheck on the CI #3316

gilles-peskine-arm opened this issue May 7, 2020 · 1 comment

Comments

@gilles-peskine-arm
Copy link
Contributor

gilles-peskine-arm commented May 7, 2020

Cppcheck is a static analysis tool for C (and C++). We should run it on our CI.

In my limited experience, Cppcheck doesn't find much compared to other tools we're already using, in particular ASan+UBSan and Coverity. But those tools only analyze a specific compile-time configuration (Coverity) or only cases that are hit by test code in a few compile-time configurations (ASan+UBSan). Cppcheck is a rare tool that tries analyzes all possible preprocessor configurations. It can find issues in “exotic” or untested configurations such as #3310.

There's an Ubuntu package so we could fairly easily arrange to run it on Travis, however it may be a little too CPU-hungry. It's not at all expensive by the standards of what we run on Jenkins, but installing an additional package is a bit more of a hassle there.

@mpg
Copy link
Contributor

mpg commented May 11, 2020

Does it have a low enough rate of false positives? That's usually the issue with static analysis tools that makes it hard to run them as part of the CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants