2020-10-24 18:04:57 +08:00
|
|
|
if [ -z $1 ]; then
|
|
|
|
echo "usage: $0 <path_to_core>"
|
|
|
|
exit -1
|
|
|
|
else
|
|
|
|
echo start formating
|
|
|
|
fi
|
|
|
|
CorePath=$1
|
|
|
|
|
|
|
|
formatThis() {
|
2020-11-05 14:30:52 +08:00
|
|
|
find "$1" | grep -E "(*\.cpp|*\.h|*\.cc)$" | grep -v "gen_tools/templates" | grep -v "/thirdparty" | grep -v "\.pb\." | xargs clang-format-10 -i
|
2020-10-24 18:04:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
formatThis "${CorePath}/src"
|
|
|
|
formatThis "${CorePath}/unittest"
|
2022-04-14 22:37:34 +08:00
|
|
|
formatThis "${CorePath}/unittest/bench"
|
2020-10-24 18:04:57 +08:00
|
|
|
|
2021-04-19 11:16:16 +08:00
|
|
|
${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}
|