diff --git a/clang/www/analyzer/codechecker.html b/clang/www/analyzer/codechecker.html new file mode 100644 --- /dev/null +++ b/clang/www/analyzer/codechecker.html @@ -0,0 +1,58 @@ + + + + CodeChecker: running the analyzer from the command line + + + + + + +
+ +
+ +

CodeChecker: running the analyzer from the command line

+ +

Basic Usage

+ +

+Analyze your project with the check command: +

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

+ +

+The check command 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
+
+

+ +

+Store your analysis reports onto the server to be able to use the Web Viewer. +

+CodeChecker store ~/results -n my-project
+
+

+ +

+To view the results, open the CodeChecker web viewer in your browser at localhost:8001, and you should be greeted with a web application showing you the analysis results. +

+firefox localhost:8001
+
+

+ +

Detailed Usage

+ +

+For extended documentation please refer to the official site of CodeChecker! +

+ diff --git a/clang/www/analyzer/command-line.html b/clang/www/analyzer/command-line.html new file mode 100644 --- /dev/null +++ b/clang/www/analyzer/command-line.html @@ -0,0 +1,50 @@ + + + + Running the analyzer from the command line + + + + + + +
+ +
+ +

Running the analyzer from the command line

+ +

The following tools are used commonly to run the analyzer from the command line. +Both tools are wrapper scripts to drive the analysis and the underlying invocations of the Clang compiler: +

    +
  1. scan-build
  2. + +
  3. CodeChecker
  4. +
      +
    • Preferred on Linux.
    • +
    • Out-of-tree, not part of the LLVM project, hosted on github.
    • +
    • On Linux there are many projects for embedded devices which are built only with GCC. + CodeChecker converts these GCC invocations to the appropriate Clang invocations, this way the CSA can work on these projects seamlessly. +
    • +
    • Cross Translation Unit (CTU) analysis is supported fully on Linux via CodeChecker. +
    • +
    • Supports incremental analysis: Results can be stored in a database, subsequent analysis runs can be compared to list the newly added defects. +
    +
+

+ +

+

+

+

+ +
+
+ + diff --git a/clang/www/analyzer/index.html b/clang/www/analyzer/index.html --- a/clang/www/analyzer/index.html +++ b/clang/www/analyzer/index.html @@ -72,9 +72,9 @@

The Clang Static Analyzer is a source code analysis tool that finds bugs in C, C++, and Objective-C programs.

-

Currently it can be run either as a standalone -tool or within Xcode. The standalone tool is -invoked from the command line, and is intended to be run in tandem with a build +

Currently it can be run either from the command + line or if you use macOS then within Xcode. When +invoked from the command line, it is intended to be run in tandem with a build of a codebase.

The analyzer is 100% open source and is part of the