Skip to content

Commit c01922f

Browse files
author
Gyorgy Orban
committed
update documentation
1 parent ed094fc commit c01922f

File tree

2 files changed

+35
-32
lines changed

2 files changed

+35
-32
lines changed

docs/developer.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11

2-
## Troubleshooting
2+
# Troubleshooting
33

44
* In case of compile error, attach the maven output
55
* Runtime logging is still a big todo, currently most log will appear on stdout/stderr
66

7-
## Development Notes
7+
# Development Notes
88

99
* Requires the Tycho Connector, Eclipse will automatically install it for you when you first import the project
10-
* Requires Eclipse PDE (Plug-in Development Environment)
10+
* [Requires Eclipse PDE](https://www.eclipse.org/pde/) (Plug-in Development Environment)
1111
* WindowMaker plugin is recommended
1212
* Adherence to the [Google Java Style](https://google.github.io/styleguide/javaguide.html) is mandatory
1313
* An IntelliJ Idea autoformatter XML configuration file is included in the repo for convenience
1414

15-
## Version Update
15+
# Update plugin version
1616

17-
Execute the following command in CodeCheckerEclipsePlugin/eclipse-plugin.
17+
Execute the following command in CodeCheckerEclipsePlugin/eclipse-plugin:
1818
``` mvn -Dtycho.mode=maven org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=X.X.X-SNAPSHOT -Dartifacts=cc.codechecker.eclipse.plugin ```
1919

20-
## Log
20+
# Logging
2121

2222
Logging in the plugin is handled by `log4j` from Apache. The default loglevel is `ERROR`, and the following loglevels are used, in increasing severity order:
2323

@@ -30,10 +30,12 @@ Logging in the plugin is handled by `log4j` from Apache. The default loglevel is
3030

3131
The log configuration file's location is `eclipse-plugin/eclipse/cc.codechecker.eclipse.plugin/log4j.properties` before compilation.
3232

33-
After compiling the plugin, you may change the log level (which specifies which *least severe* category will be logged) by opening the built `cc.codechecker.eclipse.plugin-0.0.1-SNAPSHOT.jar` file (with `mc` or any `zip` editor) and changing the `log4j.properties` file therein.
33+
After compiling the plugin, you may change the log level (which specifies which *least severe* category will be logged) by opening the built `cc.codechecker.eclipse.plugin-0.0.6.jar` file (with `mc` or any `zip` editor) and changing the `log4j.properties` file therein.
3434

3535
The loglevel is specified as follows:
3636

37-
log4j.appender.log.threshold=ERROR
37+
```
38+
log4j.appender.log.threshold=ERROR
39+
```
3840

3941
After modifying the jar file, you will need to restart eclipse for the changes to take effect.

readme.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,67 +2,68 @@
22

33
[![Build Status](https://travis-ci.org/Ericsson/CodeCheckerEclipsePlugin.svg?branch=master)](https://travis-ci.org/Ericsson/CodeCheckerEclipsePlugin)
44

5-
This is a C/C++ code analysis plugin for Eclipse that shows bugs detected by the [Clang Static Analyzer](http://clang-analyzer.llvm.org/) and [Clang Tidy](http://clang.llvm.org/extra/clang-tidy/) analyzers, using [CodeChecker](https://github.com/Ericsson/codechecker) as a backend,
5+
This is a C/C++ code analysis plugin for Eclipse that shows bugs detected by the [Clang Static Analyzer](http://clang-analyzer.llvm.org/) and [Clang Tidy](http://clang.llvm.org/extra/clang-tidy/) analyzers, using [CodeChecker](https://github.com/Ericsson/codechecker) as a backend to run the analyzers.
66

7-
## Requirements
7+
# Requirements
88

9-
* Linux operating system
10-
* Recent [CodeChecker](https://github.com/Ericsson/codechecker)
11-
* [Eclipse](www.eclipse.org): the plugin is currently tested with Eclipse Neon, but any recent Eclipse version should work
12-
* Eclipse CDT
9+
* Linux operating system (Tested on Ubuntu 16.04)
10+
* Recent [CodeChecker](https://github.com/Ericsson/codechecker) (v6.8.0 or newer)
11+
* [Eclipse](https://www.eclipse.org): the plugin is currently tested with Eclipse Neon, but any recent Eclipse version should work
12+
* [Eclipse CDT](https://www.eclipse.org/cdt/) (C/C++ Development Tooling)
1313
* Java 1.7
1414

15-
## Build and install CodeChecker Eclipse Plugin
16-
### Build
17-
run `mvn package` in the project's directory in:
15+
# Build and install CodeChecker Eclipse Plugin
16+
## Build
1817

19-
`./eclipse-plugin/`
18+
```sh
19+
cd ./eclipse-plugin
20+
mvn package # build the plugin and run the tests
21+
```
2022

21-
### Install
22-
* Copy the `cc.codechecker.eclipse.plugin-0.0.6-SNAPSHOT.jar`:
23-
* From: ./eclipse-plugin/eclipse/cc.codechecker.eclipse.plugin/target/
24-
* To: the dropins directory of Eclipse
25-
26-
## How to use
27-
Make sure that before staring Eclipse:
23+
## Install
24+
Copy the `cc.codechecker.eclipse.plugin-0.0.6-SNAPSHOT.jar`:
25+
* From: `./eclipse-plugin/eclipse/cc.codechecker.eclipse.plugin/target/`
26+
* To: the `dropins` directory of Eclipse
2827

28+
# How to use
29+
Make sure that before starting Eclipse:
2930
* CodeChecker/bin directory is included in PATH (e.g.: `export PATH="/home/<username>/CodeChecker/bin/:$PATH"`)
3031
* Python virtualenv with CodeChecker dependencies is sourced (e.g.: `source /home/<username>/venv/bin/activate`)
3132

32-
__Currently the plugin is only usable with a CDT project.__
33+
__Currently the plugin is only usable with a CDT project!__
3334

34-
#### 1. Setup Perspective
35+
## 1. Setup Perspective
3536
In Eclipse, select Window, Perspectives, and activate the CodeChecker perspective.
3637
Alternatively, you can manually add the two windows under the CodeChecker category into any perspective, using the Window - Views menu.
3738

3839
![Window->Perspective->Open Perspective->Other](docs/allperspective.png)
3940

40-
#### 2. Setup Nature
41+
## 2. Setup Nature
4142
The plugin is activated on a per project basis, first you have to add the __CodeChecker Nature__ to a CDT project using the projects context menu in the project explorer with `Add CodeChecker Nature` command.
4243

4344
![CodeChecker Nature Add](docs/nature.png)
4445

45-
#### 3. Configure CodeChecker and checkers
46+
## 3. Configure CodeChecker and checkers
4647
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. You can download and compile CodeChecker from [here](https://github.com/Ericsson/codechecker).
4748

4849
![CodeChecker Configure](docs/config.png)
4950
![CodeChecker Checkers Configure](docs/checkershow.png)
5051

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

53-
#### 4. Set up eclipse C/C++ build environment
54+
## 4. Set up eclipse C/C++ build environment
5455

5556
The code analysis runs only if your project can be built by Eclipse (as it intercepts gcc build commands).
5657
Please check that your builder is set up correctly in properties/C/C++ Build settings.
5758
If all goes well, you should be able to build your project from Eclipse using the Project/Build Project menu item.
5859

59-
#### 5. Analyze C/C++ project and view results
60+
## 5. Analyze C/C++ project and view results
6061
By default the plugin displays the problems related to the currently selected file on the current file reports view. Here the viewer can decide to check the individual reports selected from the reports tree, and view the related bugpath. Double clicking on a bugpath item will jump and set the cursor to that line in the editor.
6162

6263
*Please note that codechecker will only show analysis results for files that you built. This means that if you want to see all bugs for your project you will need to do a full (clean) build. After you update a source file, analysis results will be updated when you rebuild your project.*
6364

6465
![CodeChecker Runtime Example](docs/example.png)
6566

66-
## Contributing
67+
# Contributing
6768

6869
For further information see [developer documentation](docs/developer.md).

0 commit comments

Comments
 (0)