Skip to content

Commit

Permalink
Rename 'quickcheck' to 'check' and make '--output' a mandatory argume…
Browse files Browse the repository at this point in the history
…nt for 'parse'
  • Loading branch information
whisperity committed Sep 7, 2017
1 parent 4515730 commit 1a3f11f
Show file tree
Hide file tree
Showing 29 changed files with 254 additions and 797 deletions.
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,18 +194,27 @@ export PATH=~/{user path}/build/bin:$PATH

### Check the test project

Check your project using SQLite database. The database will be placed in your
workspace directory (`~/.codechecker` by default), which can be provided via
the `-w` flag.

Analyze your project with the `check` command:

CodeChecker check -b "cd ~/your-project && make clean && make" -o ~/results

`check` will print an overview of the issues found in your project by the
analyzers.

Start a CodeChecker web and storage server in another terminal or as a
background process. By default it will listen on `localhost:8001`.

The SQLite database containing the reports will be placed in your workspace
directory (`~/.codechecker` by default), which can be provided via the `-w`
flag.

CodeChecker server

Analyze your project with the check command:
Store your analysis reports onto the server to be able to use the Web Viewer.

CodeChecker store ~/results -n my-project

CodeChecker check test-check -b "cd ~/your-project && make clean && make"

### View results

Expand Down
9 changes: 6 additions & 3 deletions bin/CodeChecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,22 @@ def signal_handler(sig, frame):
CodeChecker server
Analyze a project with default settings:
CodeChecker check -b "cd ~/myproject && make" -n myproject
CodeChecker check -b "cd ~/myproject && make" -o "~/results"
Store the analyzer results to the server:
CodeChecker store "~/results" -n myproject
The results can be viewed:
* In a web browser: http://localhost:8001
* In the command line:
CodeChecker cmd results -n myproject
CodeChecker cmd results myproject
Example scenario: Analyzing, and printing results to Terminal (no storage)
--------------------------------------------------------------------------
In this case, no database is used, and the results are printed on the standard
output.
CodeChecker quickcheck -b "cd ~/myproject && make\"""")
CodeChecker check -b "cd ~/myproject && make\"""")

subparsers = parser.add_subparsers(help='commands')

Expand Down
3 changes: 0 additions & 3 deletions bin/codechecker-quickcheck

This file was deleted.

6 changes: 3 additions & 3 deletions docs/cross-compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ powerpc64-linux-g++ -c -o /home/<username>/mylib_ppc64_linux/commonhandler.cpp
```
when we try to analyze this file with Clang Static Analyzer with the same command line options like
```
CodeChecker quickcheck -b "powerpc64-linux-g++ -c -o /home/<username>/mylib_ppc64_linux/commonhandler.cpp" --analyzers clangsa --verbose debug
CodeChecker check -b "powerpc64-linux-g++ -c -o /home/<username>/mylib_ppc64_linux/commonhandler.cpp" --analyzers clangsa --verbose debug
```
we get the following error:
```
Expand All @@ -33,7 +33,7 @@ You can pass any parameters to clang using `--saargs` parameter.
For example the error above can be solved for Clang Static Analyzer analysis like

```
CodeChecker quickcheck -b "powerpc64-linux-g++ -c -o
CodeChecker check -b "powerpc64-linux-g++ -c -o
/home/<username>/mylib_ppc64_linux/commonhandler.cpp" --analyzers clangsa --saargs ./saargs.txt
```

Expand All @@ -60,7 +60,7 @@ tidyargs.txt:

So the full analysis command will be
```
CodeChecker quickcheck -b "powerpc64-linux-g++ -c -o
CodeChecker check -b "powerpc64-linux-g++ -c -o
/home/<username>/mylib_ppc64_linux/commonhandler.cpp" --saargs ./saargs.txt --tidyargs ./tidyargs.txt
```

Expand Down
7 changes: 4 additions & 3 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ Once the build is logged successfully (and the `compilation.json`) was created,
```
CodeChecker parse ./reports
```

Hint:
You can do the 1st and the 2nd step in one round by execution quickcheck
You can do the 1st and the 2nd step in one round by executing `check`
```
cd tmux
make clean
CodeChecker quickcheck -b "make"
CodeChecker check -b "make"
or to run on 22 thread
CodeChecker quickcheck -j22 -b "make clean;make -j22"
CodeChecker check -j22 -b "make clean;make -j22"
```

[What to do if the analysis fails (analysis settings for cross-compilation)](/docs/cross-compilation.md)
Expand Down
Loading

0 comments on commit 1a3f11f

Please sign in to comment.