Loading .clang-tidy +3 −1 Original line number Diff line number Diff line Loading @@ -18,8 +18,10 @@ Checks: 'clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-alpha*,google-*,modernize-*,readability-*' # produce HeaderFilterRegex from cpp/build-support/lint_exclusions.txt with: # echo -n '^('; sed -e 's/*/\.*/g' cpp/build-support/lint_exclusions.txt | tr '\n' '|'; echo ')$' HeaderFilterRegex: '^(.*cmake-build-debug.*|.*cmake-build-release.*|.*cmake_build.*|.*src/thirdparty.*|.*src/core/thirdparty.*|.*src/grpc.*|)$' HeaderFilterRegex: '^(.*cmake-build-debug.*|.*cmake-build-release.*|.*cmake_build.*|.*src/core/thirdparty.*|.*thirdparty.*|.*easylogging++.*|.*SqliteMetaImpl.cpp|.*src/grpc.*|.*src/core.*|.*src/wrapper.*)$' AnalyzeTemporaryDtors: true ChainedConditionalReturn: 1 ChainedConditionalAssignment: 1 CheckOptions: - key: google-readability-braces-around-statements.ShortStatementLines value: '1' Loading cpp/build.sh +8 −8 Original line number Diff line number Diff line Loading @@ -111,14 +111,14 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then exit 1 fi echo "clang-format check passed!" # # # clang-tidy check # make check-clang-tidy # if [ $? -ne 0 ]; then # echo "ERROR! clang-tidy check failed" # exit 1 # fi # echo "clang-tidy check passed!" # clang-tidy check make check-clang-tidy if [ $? -ne 0 ]; then echo "ERROR! clang-tidy check failed" exit 1 fi echo "clang-tidy check passed!" else # compile and build make -j 4 || exit 1 Loading cpp/src/cache/CpuCacheMgr.h +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ class CpuCacheMgr : public CacheMgr<DataObjPtr> { CpuCacheMgr(); public: // TODO: use smart pointer instead // TODO(myh): use smart pointer instead static CpuCacheMgr* GetInstance(); Loading cpp/src/core/test/kdtree.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ DatasetPtr generate_queries(int64_t n, int64_t d, int64_t k, int64_t base) { size_t size = sizeof(float) * n * d; auto v = (float *) malloc(size); // TODO: check malloc // TODO(lxj): check malloc for (auto i = 0; i < n; ++i) { for (auto j = 0; j < d; ++j) { v[i * d + j] = float(base + i); Loading cpp/src/core/test/test_ivf.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -694,4 +694,4 @@ TEST_F(GPURESTEST, TrainAndSearch) { // TODO(linxj): Add exception test // TODO(lxj): Add exception test Loading
.clang-tidy +3 −1 Original line number Diff line number Diff line Loading @@ -18,8 +18,10 @@ Checks: 'clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-alpha*,google-*,modernize-*,readability-*' # produce HeaderFilterRegex from cpp/build-support/lint_exclusions.txt with: # echo -n '^('; sed -e 's/*/\.*/g' cpp/build-support/lint_exclusions.txt | tr '\n' '|'; echo ')$' HeaderFilterRegex: '^(.*cmake-build-debug.*|.*cmake-build-release.*|.*cmake_build.*|.*src/thirdparty.*|.*src/core/thirdparty.*|.*src/grpc.*|)$' HeaderFilterRegex: '^(.*cmake-build-debug.*|.*cmake-build-release.*|.*cmake_build.*|.*src/core/thirdparty.*|.*thirdparty.*|.*easylogging++.*|.*SqliteMetaImpl.cpp|.*src/grpc.*|.*src/core.*|.*src/wrapper.*)$' AnalyzeTemporaryDtors: true ChainedConditionalReturn: 1 ChainedConditionalAssignment: 1 CheckOptions: - key: google-readability-braces-around-statements.ShortStatementLines value: '1' Loading
cpp/build.sh +8 −8 Original line number Diff line number Diff line Loading @@ -111,14 +111,14 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then exit 1 fi echo "clang-format check passed!" # # # clang-tidy check # make check-clang-tidy # if [ $? -ne 0 ]; then # echo "ERROR! clang-tidy check failed" # exit 1 # fi # echo "clang-tidy check passed!" # clang-tidy check make check-clang-tidy if [ $? -ne 0 ]; then echo "ERROR! clang-tidy check failed" exit 1 fi echo "clang-tidy check passed!" else # compile and build make -j 4 || exit 1 Loading
cpp/src/cache/CpuCacheMgr.h +1 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ class CpuCacheMgr : public CacheMgr<DataObjPtr> { CpuCacheMgr(); public: // TODO: use smart pointer instead // TODO(myh): use smart pointer instead static CpuCacheMgr* GetInstance(); Loading
cpp/src/core/test/kdtree.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ DatasetPtr generate_queries(int64_t n, int64_t d, int64_t k, int64_t base) { size_t size = sizeof(float) * n * d; auto v = (float *) malloc(size); // TODO: check malloc // TODO(lxj): check malloc for (auto i = 0; i < n; ++i) { for (auto j = 0; j < d; ++j) { v[i * d + j] = float(base + i); Loading
cpp/src/core/test/test_ivf.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -694,4 +694,4 @@ TEST_F(GPURESTEST, TrainAndSearch) { // TODO(linxj): Add exception test // TODO(lxj): Add exception test