Cppcheck Eclipse Plugin ((NEW)) Download

21 views
Skip to first unread message

Astri Gierut

unread,
Jan 20, 2024, 8:56:46 PM1/20/24
to scalelbovir

FYI, the files on GitHub are not in a eclipse update repository format: they would need extra information (artifacts.jar, content.jar). There ia already a ticket open about the update site shut down:

Now, in addition we would like to use the cppcheck - Eclipse plugin for static code analysis. Running the cppcheck results in lots of warnings and errors especially when cppcheck checks the nRF5_SDK_15.0.0 (Software Development Kit for Nordic nRF52 processors). The nRF5_SDK is necessary to build the project, but I only want to have the cppcheck done on our project-specific C- and H- files.

cppcheck eclipse plugin download


Download File ✒ ✒ ✒ https://t.co/Zl1bqjYrjW



I did not manage to exclude the nRF5_SDK_15.0.0 - source files from the cppchecking (I tried a lot of cppcheck-settings, properties (i.e.: Eclipse->properties->cppcheclipse->Advances Settings->Advanced command line arguments :
--suppress=purgedConfiguration --check-config -i /home/ntrnd/subversion/SmartNeckband/Software/SDK/nRF5_SDK_15.0.0_a53641a/.

Since you added these options directly as command line argument I think it is ok to ask here. Otherwise the cppchecklipse plugin is a different project which can be found here:
Maybe they can help better with the problem.

java.lang.NullPointerException
at com.googlecode.cppcheclipse.ui.ToolchainSettings.getIncludes(ToolchainSettings.java:181)
at com.googlecode.cppcheclipse.ui.ToolchainSettings.getUserIncludes(ToolchainSettings.java:87)
at com.googlecode.cppcheclipse.core.Checker.(Checker.java:80)
at com.googlecode.cppcheclipse.ui.Builder$ResourceVisitor.initChecker(Builder.java:164)
at com.googlecode.cppcheclipse.ui.Builder$ResourceVisitor.processFile(Builder.java:199)
at com.googlecode.cppcheclipse.ui.Builder$ResourceVisitor.visit(Builder.java:122)
at org.eclipse.core.internal.resources.Resource.lambda$1(Resource.java:117)
at org.eclipse.core.internal.resources.Resource.lambda$0(Resource.java:85)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:135)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:94)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:55)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:117)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:105)
at com.googlecode.cppcheclipse.ui.Builder.processResource(Builder.java:306)
at com.googlecode.cppcheclipse.ui.commands.RunCodeAnalysis$RunCodeAnalysisJob.runResource(RunCodeAnalysis.java:26)
at com.googlecode.cppcheclipse.ui.commands.ResourceSelectionJob.run(ResourceSelectionJob.java:44)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

sorry but it looks like a bug in the eclipse plugin. We have nothing to do with that. I do not know where you can report cppceclipse issues. If you can find some forum/issue tracker please feel free to write the url here..

The biggest problem of C++ code is bugs. Bugs can slip through even when compiling code with all warnings turned on. A useful tool in the arsenal of a C++ programmer is CPPCheck, a static analysis tool. You are in luck if you are using Eclipse CDT because the CPPChEclipse plugin makes using CPPCheck with your C++ project very easy.

Go to Window -> Preferences -> C/C++ -> CPPChEclipse. First, set the path of CPPCheck to /usr/bin/cppcheck. In the Problems subsection, choose the types of problems you want to be reported about (warnings, errors, style problems). In the Settings subsection, choose the C and C++ standard versions you want to be applied. You can also indicate the CPPCheck use the include paths used by your project (this is very useful).

Hi, thank you for your clear explanation. I want to ask a question. I download and set up the cppchecklipse plugin. It works with no problem. What I want to do is exclude some files from analysis. Lets say in a project I have 3 folders with 3 main files and folders' names are src1 src2 src3 respectively. I want to only analyse first folder's source files(src1) not the other 2 folders(src2,src3). How can I manage this? I tried right-click to the first project and go to properties->cppcheclipse->advanced settigs-> from there I write a command that is cppcheck -isrc2 -isrc3 but it does not work. What do you suggest? Thank you for your effort.

Cppcheck is available both as open-source (this page) and as Cppcheck Premium with extended functionality and support. Please visit www.cppchecksolutions.com for more information and purchase options for the commercial version.

thanks for your reply. In fact I'm trying to access CCS project related settings (build variables, toolchain path, etc.) from a headless command line plugin. This would be a nice addition to our CI-process and I could run tools like e.g. cppcheck with the exact settings CCS uses to build the project. So far I've tried to parse the project files, but I'm still missing some vital information that cannot be easily accessed from these files.

At the time of writing this article, the most recent version of Cppcheck is 1.60.1 which supports the following languages: C89, C99, C11, C++03, C++11; and provides the following plugins to integrate into various development environments:

Eclipse/CDT - in conjunction with the GNU MCU Eclipse plugins - provide the main SoftConsole GUI/IDE (Graphical User Interface/Integrated Development Environment). The Windows Eclipse/CDT starter.exe has been modified by Microchip to allow for graceful termination of OpenOCD or other external executables launched from Eclipse. SoftConsole builds from the Eclipse Platform Runtime Binary (PRB) package and only adds those plugins that are absolutely necessary for Microchip target development/debug to avoid unnecessary bloat. Users can still install any additional plugins that they see fit. Credit/thanks to the Eclipse/CDT developer community

Even though Qt Creator and Eclipse are different tools written in different programming languages, they still share the approach of adding all the functionality by plugins. So, from that point of view Qt Creator and Eclipse can be seen more as plugin frameworks instead of IDEs.

In Eclipse, the extension points are usually defined as soon as the plugin is implemented meaning that those interfaces are often best guesses based on one example extension if at all. This may easily result in unnecessary extension in the first place or too inflexible or limited interfaces for more real world use cases.

This plugin can read Codeblocks .workspace project files. It reads the projects hierarchy and parses the individual .cbp project files to extract the source and header files and the build targets. Using commandline Codeblocks it allows you to (re)build your workspace. Also the build output is parsed(gcc and msvc supported).

Configurable SpellCheck plugin that checks the spelling of comments as well as string literal. Interaction made possible using an output pane, navigation widget and other menus and commands. The spell checking is done using the Hunspell spell checker. Implemented and tested for English but might work for other languages.

Qt-cppcheck integrates the external command line tool into QtCreator IDE.
Automatic and manual check of active project and individual project files.
Display found error in task pan (with marks in editor)

Mylyn is a application lifecycle management plugin, inspired by an eclipse plugin of the same name. Status: abandoned. Anyone wishing to pick up the project is encouraged to contact the former project owner on github [github.com]

KDevelop with the kdev-clang-tidy plugin, starting from version 5.1, performsstatic analysis using clang-tidy. The plugin launches theclang-tidy binary from the specified location and parses itsoutput to provide a list of issues.

MS Visual Studio has a native clang-tidy-vs plugin and also can integrateclang-tidy by means of three other tools. The ReSharper C++extension, version 2017.3 and later, provides seamless clang-tidyintegration: checks and quick-fixes run alongside native inspections. Apartfrom that, ReSharper C++ incorporates clang-tidy as a separatestep of its code clean-up process. Visual Assist build 2210 includes asubset of clang-tidy checklist to inspect the code as you edit.Another way to bring clang-tidy functionality to Visual Studio isthe Clang Power Tools plugin, which includes most of theclang-tidy checks and runs them during compilation or as a separatestep of code analysis.

Emacs24, when expanded with the Flycheck plugin, incorporates theclang-tidy inspection into the syntax analyzer. For Vim, you canuse Syntastic, which includes clang-tidy, or A.L.E.,a lint engine that applies clang-tidy along with other linters.

clang-tidy is integrated in CPPDepend starting from version 2018.1and CPPCheck 1.82. CPPCheck integration lets you import Visual Studiosolutions and run the clang-tidy inspection on them. TheCodeChecker application of version 5.3 or later, which also comes as a pluginfor Eclipse, supports clang-tidy as a static analysis instrument andallows to use a custom clang-tidy binary.

Yasca consists of two components:* a framework for conducting source code analyses, and* an implementation of that framework, leveraging custom plugins, FindBugs, PMD, and JlintYasca is a command-line tool. Just point it at your code base and watch it go to work. The output is an HTML file containing all findings.

Let me inform you that MISRA-C rule checker plugin is available in e2studio for the professional editions of CC-RX, CC-RL and CC-RH compilers. Unfortunattely it is not supported for GCC compiler for RA devices. As you can see bellow:

Parasoft C/C++test supports ARM Compiler v5 and ARM Compiler v6, Keil compilers and is available as a plugin to ARM DS, ARM DS-5, Keil MDK, and standalone Eclipse for C/C++. The integration enables the ability to perform static code analysis, create and execute unit and integration tests, and performing structural code coverage. Users can scan projects for compliance with coding standards such as MISRA C/C++, AUTOSAR C++ 14, or CERT C/C++, and other standards, to pinpoint real bugs with static analysis. Also identify regressions with unit tests, integration tests and perform structural code coverage to automate compliance with industry standards such as ISO 26262, DO-178C, IEC 61508, IEC 62304, EN 50128 and other safety and security process standards.

df19127ead
Reply all
Reply to author
Forward
0 new messages