forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makefile.am: Add clang static analysis support
Clang Static Analyzer is a source code analysis tool to find bugs. This patch adds make target to trigger static analysis using below commands. ./boot.sh For Clang: ./configure CC=clang --with-dpdk For GCC: ./configure CC=gcc --with-dpdk CFLAGS="-std=gnu99" make clang-analyze Run 'scan-view <results dir>' command to examine the bug report. Signed-off-by: Bhanuprakash Bodireddy <[email protected]> Acked-By: Lance Richardson <[email protected]> Signed-off-by: Ben Pfaff <[email protected]>
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -746,6 +746,28 @@ Instructions to setup travis-ci for your GitHub repository: | |
4. Pushing a commit to the repository which breaks the build or the | ||
testsuite will now trigger a email sent to [email protected] | ||
Static Code Analysis | ||
-------------------- | ||
Static Analysis is a method of debugging Software by examining code rather | ||
than actually executing it. This can be done through 'scan-build' commandline | ||
utility which internally uses clang (or) gcc to compile the code and also | ||
invokes a static analyzer to do the code analysis. At the end of the build, the | ||
reports are aggregated in to a common folder and can later be analyzed using | ||
'scan-view'. | ||
Open vSwitch includes a Makefile target to trigger static code Analysis and | ||
the instructions are below. | ||
1. ./boot.sh | ||
2. ./configure CC=clang (when using clang compiler) | ||
./configure CC=gcc CFLAGS="-std=gnu99" (when using GCC) | ||
3. make clang-analyze | ||
You should invoke scan-view to view analysis results. The last line of output | ||
from 'make clang-analyze' shall list the command (containing results directory) | ||
that you should invoke to view the results on a browser. | ||
Bug Reporting | ||
============= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters