mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-06 05:49:24 +08:00
7d74edd6dd
Default llvm toolchain version in Ubuntu 20.04 is 10, while Ubuntu 22.04 does not have `clang-tidy-10` or `clang-format-10` by default. issue: #33142 Signed-off-by: Patrick Weizhi Xu <weizhi.xu@zilliz.com> Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
20 lines
636 B
Bash
Executable File
20 lines
636 B
Bash
Executable File
if [ -z $1 ]; then
|
|
echo "usage: $0 <path_to_core>"
|
|
exit -1
|
|
else
|
|
echo start formating
|
|
fi
|
|
CorePath=$1
|
|
|
|
formatThis() {
|
|
find "$1" | grep -E "(*\.cpp|*\.h|*\.cc)$" | grep -v "gen_tools/templates" | grep -v "\.pb\." | grep -v "tantivy-binding.h" | xargs clang-format-12 -i
|
|
}
|
|
|
|
formatThis "${CorePath}/src"
|
|
formatThis "${CorePath}/unittest"
|
|
formatThis "${CorePath}/unittest/bench"
|
|
formatThis "${CorePath}/thirdparty/tantivy"
|
|
|
|
${CorePath}/build-support/add_cpp_license.sh ${CorePath}/build-support/cpp_license.txt ${CorePath}
|
|
${CorePath}/build-support/add_cmake_license.sh ${CorePath}/build-support/cmake_license.txt ${CorePath}
|