Added instruction to use TScanCode [#CLICKHOUSE-2].

This commit is contained in:
Alexey Milovidov 2018-06-08 21:52:37 +03:00
parent 77fd2f3721
commit f45c0ce9a9

View File

@ -0,0 +1,26 @@
# TScanCode is a static analyzer from Tencent
# It looks like to be based on CppCheck
git clone git@github.com:Tencent/TscanCode.git
cd TscanCode/trunk
make -j4
# It looks weird that TScanCode itself compiles with multiple warnings like 'unused-but-set-variable' and 'misleading-indentation'
# Run analysis:
./tscancode -j4 --enable=all ~/work/ClickHouse 2> result.txt
# It has no way to remove specific directories. We have to checkout ClickHouse to separate directory and manually remove "contrib".
# Otherwise it segfaults when analysing llvm submodule.
# It works quite fast:
real 0m17.174s
user 0m45.498s
sys 0m0.496s
wc -l result.txt
61 result.txt
# It gives almost all false positives.