Open Source
Cppcheck is open-source software, which means it is free to use and its source code is available for modification and distribution under the terms of the GNU General Public License.
Static Analysis
Cppcheck excels at performing static code analysis, detecting bugs, memory leaks, and potential issues in C and C++ code without executing the program.
Wide Platform Support
Cppcheck supports a wide range of platforms, including Windows, Linux, and macOS, making it versatile and accessible to developers on different operating systems.
Integrated with IDEs
Cppcheck can be integrated with popular Integrated Development Environments (IDEs) like Visual Studio, Eclipse, and Code::Blocks, providing seamless code analysis during development.
Customizable
Cppcheck allows customization of its analysis through command-line options and configurations, enabling users to tailor the tool to their specific needs and project requirements.
Extensive Reporting
Cppcheck provides detailed reports that highlight various types of issues, making it easier for developers to identify and resolve problems efficiently.
Regular Updates
Cppcheck is actively maintained, with regular updates and improvements that enhance its capabilities and address any newly discovered issues.
I dedicated Sunday morning to going over the documentation of the linters we use in the project. The goal was to understand all options and use them in the best way for our project. Seeing their manuals side by side was nice because even very similar things are solved differently. Cppcheck is the most configurable and best documented; JSON Lint lies at the other end. - Source: dev.to / about 1 year ago
Using infer, someone else exploited null-dereference checks to introduce simple affine types in C++. Cppcheck also checks for null-dereferences. Unfortunately, that approach means that borrow-counting references have a larger sizeof than non-borrow counting references, so optimizing the count away potentially changes the semantics of a program which introduces a whole new way of writing subtly wrong code. Source: almost 2 years ago
For my own projects, I used cppcheck. You can check out that tool to get a feel. Depending on what industry your in, you might need to follow a standard like Misra. Source: about 2 years ago
Https://cppcheck.sourceforge.io/ (there are many other static analysis tools, I just haven't used them or didn't care for them). Source: about 2 years ago
Sounds like something that could simply be communicated with the team that writes the tests. Unless you have dozens of such classes. In that case, you could just use e.g. Cppcheck and add a rule (regular expression) that searches for usages of the forbidden classes. Source: over 2 years ago
If I had to pick one, I'd go with cppcheck. It's OSS, we have it embedded in our CI, it gives pretty clear feedback and helps keep our team in check. Source: over 2 years ago
No. Even if you use 100% modern C++ constructs, and sanitizers/static analyzers, you will not, AFAIK, get the same static memory safety guarantees that Rust provides. Source: almost 3 years ago
There are tools called lints (static analyzers) that detect such faults. Cppcheck or clang-analyzer are two of these. Cppcheck found it for me:. Source: over 3 years ago
Start by feeding your codebase to a static analysis tool like cppcheck, to rule out obvious bound-checking mistakes in it. Source: almost 4 years ago
Cppcheck is free. I've previously used it with a C++ project. Source: about 4 years ago
Do you know an article comparing Cppcheck to other products?
Suggest a link to a post with product alternatives.
Is Cppcheck good? This is an informative page that will help you find out. Moreover, you can review and discuss Cppcheck here. The primary details have not been verified within the last quarter, and they might be outdated. If you think we are missing something, please use the means on this page to comment or suggest changes. All reviews and comments are highly encouranged and appreciated as they help everyone in the community to make an informed choice. Please always be kind and objective when evaluating a product and sharing your opinion.