Skip to content

This is an Eclipse plugin that shows C/C++ static analysis results found by CodeChecker

License

Notifications You must be signed in to change notification settings

dkrupp/CodeCheckerEclipsePlugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

This is an Eclipse plugin for the Ericsson Codechecker Project.

Requirements

  • Linux operating system
  • Recent CodeChecker
  • Eclipse: the plugin is currently tested with Eclipse Neon, but any recent Eclipse version should work
  • Eclipse CDT
  • Java 1.7
  • Thrift 0.9.1 or later

Install or build Thrift 0.9.1

install:

using a package manager provided by your OS:
Ubuntu:
sudo apt-get install -y thrift-compiler

build from source:
curl http://archive.apache.org/dist/thrift/0.9.1/thrift-0.9.1.tar.gz | tar zx
cd thrift-0.9.1
./configure
make
# add `compiler/cpp/` to PATH where the thrift binary is available
export PATH=$PATH:$PWD/compiler/cpp/

Build and install CodeChecker Eclipse Plugin

Build

  • run mvn package in the project's directory

Install

  • Copy the cc.codechecker.eclipse.plugin-0.0.1-SNAPSHOT.jar:
    • From: ./eclipse-plugin/eclipse/cc.codechecker.eclipse.plugin/target/
    • To: the dropins directory of Eclipse

How to use

Make sure that before staring Eclipse:

  • CodeChecker/bin directory is included in PATH (e.g.: export PATH="/home/<username>/CodeChecker/bin/:$PATH")
  • Python virtualenv with CodeChecker dependencies is sourced (e.g.: source /home/<username>/venv/bin/activate)

Currently the plugin is usable with a CDT project.

1. Setup Perspective

In Eclipse, select Window, Perspectives, and activate the CodeChecker perspective. Alternatively, you can manually add the two windows under the CodeChecker category into any perspective, using the Window - Views menu.

Window->Perspective->Open Perspective->Other

2. Setup Nature

The plugin is activated on a per project basis, first you have to add the CodeChecker Nature to a CDT project using it's context menu in the project explorer.

CodeChecker Nature Add

3. Configure CodeChecker

After that, the settings can be customized in the project preferences window under the CodeChecker panel. For the plugin to work correctly, it is mandatory to add the correct path to the root of the CodeChecker package.

CodeChecker Configure

After the plugin is successfully configured for a project, it'll listen to build events, and automatically rechecks the project with CodeChecker when needed.

4. Analyze C/C++ project and view results

By default it displays the problems related to the currently selected file on the problems view, and the details for a selected bugpath in the Details view. Selecting a problem or jumping to a details item is possible with double clicking on it.

The problems view can be customized: it supports custom search options with a filter editor, where saving or loading filters is also possible.

CodeChecker Runtime Example

Troubleshooting and Development

For further information see developer documentation.

About

This is an Eclipse plugin that shows C/C++ static analysis results found by CodeChecker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 94.4%
  • Thrift 5.5%
  • Shell 0.1%