1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
5 <title>CodeChecker: running the analyzer from the command line
</title>
6 <link type=
"text/css" rel=
"stylesheet" href=
"content.css">
7 <link type=
"text/css" rel=
"stylesheet" href=
"menu.css">
8 <script type=
"text/javascript" src=
"scripts/menu.js"></script>
13 <!--#include virtual="menu.html.incl"-->
16 <h1>CodeChecker: running the analyzer from the command line
</h1>
21 Install CodeChecker as described here:
<a href=
"https://github.com/Ericsson/codechecker/#Install-guide"> CodeChecker Install Guide.
</a>
25 Create a compilation database. If you use cmake then pass the
<tt>-DCMAKE_EXPORT_COMPILE_COMMANDS=
1</tt> parameter to cmake. Cmake will create a
<tt>compile_commands.json
</tt> file.
26 If you have a Makefile based or similar build system then you can log the build commands with the help of CodeChecker:
27 <pre class=
"code_example">
29 CodeChecker log -b
"make" -o compile_commands.json
35 <pre class=
"code_example">
36 CodeChecker analyze compile_commands.json -o ./reports
41 View the analysis results.
42 Print the detailed results in the command line:
43 <pre class=
"code_example">
44 CodeChecker parse --print-steps ./reports
46 Or view the detailed results in a browser:
47 <pre class=
"code_example">
48 CodeChecker parse ./reports -e html -o ./reports_html
49 firefox ./reports_html/index.html
54 Optional: store the analysis results in a DB.
55 <pre class=
"code_example">
57 CodeChecker server -w ./ws -v
8555 &
58 CodeChecker store ./reports --name my-project --url http://localhost:
8555/Default
63 Optional: manage (categorize, suppress) the results in your web browser:
64 <pre class=
"code_example">
65 firefox http://localhost:
8555/Default
69 <h2>Detailed Usage
</h2>
72 For extended documentation please refer to the
<a href=
"https://github.com/Ericsson/codechecker/blob/master/docs/usage.md">official site of CodeChecker
</a>!