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 2 months 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: 11 months 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 1 year 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 1 year 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 1 year 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 1 year 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: over 1 year 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 2 years ago
Start by feeding your codebase to a static analysis tool like cppcheck, to rule out obvious bound-checking mistakes in it. Source: over 2 years ago
Cppcheck is free. I've previously used it with a C++ project. Source: about 3 years ago
Do you know an article comparing Cppcheck to other products?
Suggest a link to a post with product alternatives.
This is an informative page about Cppcheck. You can review and discuss the product 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.