clang static analyzer is a source code analysis tool that
finds bugs in C, C++.
This patch automates clang analyzes part by integrating
it with 'make clang-check'
clang-checker.sh: runs clang analyzer with and without the
HEAD commit, and shows the bugs introduced by HEAD commit (if any)
sample report:
$[ gluster-block ]: make clang-check
================ Clang analyzer in progress ================
...
BASELINE BUGS LIST (before applying patch):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dead assignment --> 4
All Bugs --> 12
Dereference of null pointer --> 8
TARGET BUGS LIST (after applying patch):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dead assignment --> 4
All Bugs --> 13
Dereference of null pointer --> 9
SUMMARY OF CLANG-ANALYZER:
~~~~~~~~~~~~~~~~~~~~~~~~~~
Patch Value given by Clang analyzer '-1'
Explore complete results at:
/home/user/gluster-block/baseline/results/rpc/2020-05-14-123417-12345-1/index.html
/home/user/gluster-block/target/results/rpc/2020-05-14-123632-19247-1/index.html
================= Done with Clang Analysis =================
And we run these scan-build via Travis CI and get the score.
What does this PR achieve? Why do we need it?
And we run these scan-build via Travis CI and get the score.
Notes for the reviewer
This is a WIP as of now.