mac clang-format

This commit is contained in:
caifubi 2021-05-18 19:50:15 +08:00
parent ea99e19b47
commit 87334c287f
1 changed files with 3 additions and 3 deletions

View File

@ -86,11 +86,11 @@ cd "${SCRIPTS_PATH}/.." || exit 1
FMT_FILE_LIST='__format_files_list__' FMT_FILE_LIST='__format_files_list__'
if [[ "X${mode}" == "Xall" ]]; then if [[ "X${mode}" == "Xall" ]]; then
find mindspore/{ccsrc,core,lite} -type f -name "*" | grep "\.h$\|\.cc$\|\.c$" > "${FMT_FILE_LIST}" || true find mindspore/{ccsrc,core,lite} -type f -name "*" | grep -E "(\.h$|\.cc$|\.c$)" > "${FMT_FILE_LIST}" || true
elif [[ "X${mode}" == "Xchanged" ]]; then elif [[ "X${mode}" == "Xchanged" ]]; then
git diff --name-only | grep "mindspore/ccsrc\|mindspore/core\|mindspore/lite" | grep "\.h$\|\.cc$\|\.c$" > "${FMT_FILE_LIST}" || true git diff --name-only | grep "mindspore/ccsrc\|mindspore/core\|mindspore/lite" | grep -E "(\.h$|\.cc$|\.c$)" > "${FMT_FILE_LIST}" || true
else # "X${mode}" == "Xlastcommit" else # "X${mode}" == "Xlastcommit"
git diff --name-only HEAD~ HEAD | grep "mindspore/ccsrc\|mindspore/core\|mindspore/lite" | grep "\.h$\|\.cc$\|\.c$" > "${FMT_FILE_LIST}" || true git diff --name-only HEAD~ HEAD | grep "mindspore/ccsrc\|mindspore/core\|mindspore/lite" | grep -E "(\.h$|\.cc$|\.c$)" > "${FMT_FILE_LIST}" || true
fi fi
while read line; do while read line; do