mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Added instruction for cppcheck usage [#CLICKHOUSE-3300].
This commit is contained in:
parent
8b313ab99e
commit
9befe805e2
17
dbms/tests/instructions/cppcheck.txt
Normal file
17
dbms/tests/instructions/cppcheck.txt
Normal file
@ -0,0 +1,17 @@
|
||||
# Install cppcheck
|
||||
|
||||
mkdir cppcheck && cd cppcheck
|
||||
git clone git@github.com:danmar/cppcheck.git .
|
||||
mkdir build && cd build
|
||||
CC=gcc-7 CXX=g++-7 cmake -D CMAKE_BUILD_TYPE=Release ..
|
||||
make -j24
|
||||
sudo make install
|
||||
|
||||
# Perform analysis
|
||||
# cd ClickHouse_clean
|
||||
|
||||
cppcheck -j24 -i contrib -i build --enable=all . 2> cppcheck-errors.txt
|
||||
|
||||
# Check is pretty fast.
|
||||
# It doesn't understand atomics, lambdas, std::rethrow_exception, macros, it have poor logic inference.
|
||||
# But the result is worth looking and at least few real errors found.
|
Loading…
Reference in New Issue
Block a user