Merge branch 'branch-0.5.0' into 'branch-0.5.0'

disable clang-tidy

See merge request megasearch/milvus!674

Former-commit-id: dded4b8476538aa517658a53a58320ed8915f1cd
This commit is contained in:
peng.xu 2019-10-09 17:21:09 +08:00
commit e68a4efd5e
2 changed files with 12 additions and 8 deletions

View File

@ -112,13 +112,13 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then
fi fi
echo "clang-format check passed!" echo "clang-format check passed!"
# clang-tidy check # # clang-tidy check
make check-clang-tidy # make check-clang-tidy
if [ $? -ne 0 ]; then # if [ $? -ne 0 ]; then
echo "ERROR! clang-tidy check failed" # echo "ERROR! clang-tidy check failed"
exit 1 # exit 1
fi # fi
echo "clang-tidy check passed!" # echo "clang-tidy check passed!"
else else
# compile and build # compile and build
make -j 4 || exit 1 make -j 4 || exit 1

View File

@ -71,7 +71,11 @@ ValidationUtil::ValidateTableName(const std::string& table_name) {
Status Status
ValidationUtil::ValidateTableDimension(int64_t dimension) { ValidationUtil::ValidateTableDimension(int64_t dimension) {
if (dimension <= 0 || dimension > TABLE_DIMENSION_LIMIT) { if (dimension <= 0) {
std::string msg = "Dimension value should be greater than 0";
SERVER_LOG_ERROR << msg;
return Status(SERVER_INVALID_VECTOR_DIMENSION, msg);
} else if (dimension > TABLE_DIMENSION_LIMIT) {
std::string msg = "Table dimension excceed the limitation: " + std::to_string(TABLE_DIMENSION_LIMIT); std::string msg = "Table dimension excceed the limitation: " + std::to_string(TABLE_DIMENSION_LIMIT);
SERVER_LOG_ERROR << msg; SERVER_LOG_ERROR << msg;
return Status(SERVER_INVALID_VECTOR_DIMENSION, msg); return Status(SERVER_INVALID_VECTOR_DIMENSION, msg);