Although it is theoretically possible to integrate an external static analyzer into Eclipse as demonstrated here (i.e. for Cppcheck), I was wondering whether a more up to date solution exists which does not require plug-in development? For example an existing plug-in, an available option in CODAN or a simplified version of the above tutorial for Clang Static Analyzer specifically.
CodeCheckerEclipsePlugin is an Eclipse plugin that shows Clang Static Analyzer and Clang Tidy defects for your C/C++ projects.
After installation you can add it to your CDT project as "CodeChecker nature". The only software requirement is that you must have Clang and CodeChecker tools installed on your machine. You will need to set up your project so it builds from from Eclipse CDT. Clang static analyzer will be called automatically on your code whenever you build your project in eclipse.
The plugin will call the CodeChecker tool in the background which in turn calls the analysis engines (tidy and static-analyzer) on your build.
As an extention to ClangSA, you may also suppress false positives by using codechecker_suppress code comments like: // codechecker_suppress [deadcode.DeadStores] suppress deadcode
The plugin is hosted on github, see https://github.com/Ericsson/CodeCheckerEclipsePlugin
No. But possible? Yes. All it takes is volunteers to make it happen.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With