Skip to content

Commit dff4161

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

File tree

2 files changed

+37
-33
lines changed

2 files changed

+37
-33
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: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,67 +2,69 @@
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
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
2527

26-
## How to use
27-
Make sure that before staring Eclipse:
28+
# How to use
29+
Make sure that before starting Eclipse:
2830

29-
* CodeChecker/bin directory is included in PATH (e.g.: `export PATH="/home/<username>/CodeChecker/bin/:$PATH"`)
30-
* Python virtualenv with CodeChecker dependencies is sourced (e.g.: `source /home/<username>/venv/bin/activate`)
31+
* CodeChecker/bin directory is included in PATH (e.g.: `export PATH="/home/<username>/CodeChecker/bin/:$PATH"`)
32+
* Python virtualenv with CodeChecker dependencies is sourced (e.g.: `source /home/<username>/venv/bin/activate`)
3133

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

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

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

40-
#### 2. Setup Nature
42+
## 2. Setup Nature
4143
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.
4244

4345
![CodeChecker Nature Add](docs/nature.png)
4446

45-
#### 3. Configure CodeChecker and checkers
47+
## 3. Configure CodeChecker and checkers
4648
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).
4749

4850
![CodeChecker Configure](docs/config.png)
4951
![CodeChecker Checkers Configure](docs/checkershow.png)
5052

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

53-
#### 4. Set up eclipse C/C++ build environment
55+
## 4. Set up eclipse C/C++ build environment
5456

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

59-
#### 5. Analyze C/C++ project and view results
61+
## 5. Analyze C/C++ project and view results
6062
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.
6163

6264
*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.*
6365

6466
![CodeChecker Runtime Example](docs/example.png)
6567

66-
## Contributing
68+
# Contributing
6769

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

0 commit comments

Comments
 (0)