forked from mindspore-Ecosystem/mindspore
mac clang-format
This commit is contained in:
parent
ea99e19b47
commit
87334c287f
|
@ -86,11 +86,11 @@ cd "${SCRIPTS_PATH}/.." || exit 1
|
|||
FMT_FILE_LIST='__format_files_list__'
|
||||
|
||||
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
|
||||
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"
|
||||
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
|
||||
|
||||
while read line; do
|
||||
|
|
Loading…
Reference in New Issue