Cppcheck vs Infer
Cppcheck
cppcheck.comInfer
fbinfer.comSide by side
| Figure | Cppcheck | Infer |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | Yes | — |
| Open source | Yes | — |
| Web | — | Yes |
| Windows | Yes | — |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 8 | 1 |
| Spec score · Static Analysis Tools | 8.7 (#3) | 8.6 (#7) |
| Deployment | Cppcheck can run locally and in air-gapped environments without license servers or network configuration. | Infer runs in Meta's continuous-integration pipeline to verify select properties of code modifications for projects including Facebook, Messenger, Instagram, and WhatsApp. |
| Integrations | The site lists integrations with Visual Studio, VSCode, Keil, Eclipse, CLion, Qt Creator, and C++ Builder. | Infer documents integrations for Buck, cmake, Gradle, Make, Maven, Xcodebuild, xctool, and compilation databases. |
| Purpose | Cppcheck is a static analysis tool for C and C++ code that detects bugs, undefined behavior, and dangerous coding constructs. | Infer is a static analysis tool that produces a list of potential bugs from Java or C/C++/Objective-C code. |
| Support | Enterprise includes onboarding and configuration support and access to an enterprise support portal; Project includes onboarding support and prioritized second-line support. | The project directs users to GitHub issues and the #infer IRC channel on Libera Chat for questions and issue reports. |
| What it does | Cppcheck statically analyzes C and C++ code, concentrating on bugs such as undefined behavior and dangerous constructs. | Infer is a static analyzer that reports potential bugs in source code before it ships. |
Plans
Cppcheck
- Cppcheck Premium trialFree
- Open-sourceFree
- Open-source CppcheckFree
- EnterprisePriced on request
- Enterprise LicensePriced on request
- IndividualPriced on request
- ProjectPriced on request
- Project LicensePriced on request
In their own words
Cppcheck
Cppcheck is a static analysis tool for C and C++ code that detects bugs, undefined behavior, and dangerous coding constructs. It can analyze non-standard syntax commonly found in embedded projects. The tool fully supports C++11, C++14, and C++17, with partial support for C++20, and lists integrations with Visual Studio, VSCode, Keil, Eclipse, CLion, Qt Creator, and C++ Builder. Its Soundy mode is intended to help find hard-to-find bugs discovered during testing. The free Open-source plan provides core static analysis. Premium adds checks for safety and security standards, with compliance reports for supported standards; the maker describes Premium as TÜV SÜD certified for safety-critical development. A three-week free trial is offered without a credit card or commitment. Individual licensing excludes CI environments, virtual machines, and containers, while Enterprise supports those environments and air-gapped use. Project requires at least five users and one Git repository. Paid plan prices are available by tailored quotation.
Infer
Infer is a static analysis tool that examines compiled Java, C, C++, Objective-C, and Erlang code and reports potential bugs before release. Its checks include null pointer problems, resource or memory leaks, coding conventions, unavailable APIs, and concurrency issues such as data races. Some analyses can follow an issue across multiple functions or methods and files. Pulse provides memory-safety analysis, while RacerD checks thread safety. Cost analysis estimates asymptotic function complexity for Java and C-family languages; Hack support is experimental, and Python, Rust, and Swift are not supported by that analysis. Infer captures compilation commands, analyzes the captured files, and writes reports that can be reviewed with `infer explore`; files that are not compiled are not analyzed. Integrations are documented for build tools including Buck, CMake, Gradle, Make, Maven, Xcodebuild, and xctool. It can be installed from binary releases, built from source, or run in Docker. The free plan costs nothing. Infer runs on Linux and macOS, with web and self-hosted options; Windows is not supported.