Fix check-style util

This commit is contained in:
Ivan Lezhankin 2020-02-17 19:30:25 +03:00
parent 102dad0ca0
commit 922add6244
2 changed files with 8 additions and 9 deletions

View File

@ -45,13 +45,12 @@ inc="-I. \
-I./contrib/capnproto/c++/src \
-I./contrib/unixodbc/include \
-I./contrib/unixodbc-cmake/linux_x86_64 \
-I./libs/libmysqlxx/include \
-I./libs/libcommon/include \
-I${BUILD_DIR}/libs/libcommon/include \
-I./libs/libzkutil/include \
-I./libs/libdaemon/include \
-I./libs/consistent-hashing \
-I./libs/consistent-hashing-sumbur \
-I./base/mysqlxx \
-I./base \
-I${BUILD_DIR}/base \
-I./base/daemon \
-I./base/consistent-hashing \
-I./base/consistent-hashing-sumbur \
-I./contrib/libhdfs3/include \
-I./contrib/base64/include \
-I./contrib/protobuf/src \
@ -65,7 +64,7 @@ inc="-I. \
if [ -z $1 ]; then
cd ${ROOT_DIR=${CUR_DIR}../..}
find dbms libs utils \( -name *.h -and -not -name *.inl.h \) -print0 | xargs -0 -n1 sh $CUR_DIR`basename $0`
find base dbms utils \( -name *.h -and -not -name *.inl.h \) -print0 | xargs -0 -n1 sh $CUR_DIR`basename $0`
else
echo -n "$1 "
echo -n `grep "#include" $1| wc -l` " "

View File

@ -6,7 +6,7 @@ cd `readlink -f $(dirname $0)`/../..
clang_format=`bash -c "compgen -c clang-format | grep 'clang-format-[[:digit:]]' | sort --version-sort --reverse | head -n1"`
if [ ! -z $clang_format ]; then
find dbms libs utils -name *.cpp -or -name *.h -exec $clang_format -i {} + ;
find base dbms utils -name *.cpp -or -name *.h -exec $clang_format -i {} + ;
else
echo clang-format missing. try to install:
echo sudo apt install clang-format