summaryrefslogtreecommitdiff
path: root/infra/command
diff options
context:
space:
mode:
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>2019-08-20 19:17:11 +0900
committerGitHub Enterprise <noreply-CODE@samsung.com>2019-08-20 19:17:11 +0900
commitdc884191af9dd048e7ee194e20ffffaf77498431 (patch)
tree1bcc637afaac715eaa54bbe76d3686b752cf0938 /infra/command
parentef97d8bd377b679e84d40e328396a02f64e254e8 (diff)
downloadnnfw-dc884191af9dd048e7ee194e20ffffaf77498431.tar.gz
nnfw-dc884191af9dd048e7ee194e20ffffaf77498431.tar.bz2
nnfw-dc884191af9dd048e7ee194e20ffffaf77498431.zip
Check format changed files (#6683)
Check and fix format with warning message when there is changed files Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
Diffstat (limited to 'infra/command')
-rw-r--r--infra/command/format8
1 files changed, 4 insertions, 4 deletions
diff --git a/infra/command/format b/infra/command/format
index c850b41d8..3940112b0 100644
--- a/infra/command/format
+++ b/infra/command/format
@@ -140,14 +140,14 @@ function check_python_files() {
pushd ${NNAS_PROJECT_PATH}
if [ -n "$(git diff)" ]; then
- echo "[ERROR] Commit all the changes before running format check"
- exit 1
+ echo "[WARNING] Commit all the changes before running format check"
+ echo " format.patch file will contain unstaged files"
fi
__Check_CPP=${CHECK_CPP:-"1"}
__Check_PYTHON=${CHECK_PYTHON:-"1"}
-FILES_TO_CHECK=$(git ls-files)
+FILES_TO_CHECK=$(git ls-files -co --exclude-standard)
if [[ "${CHECK_DIFF_ONLY}" = "1" ]]; then
MASTER_EXIST=$(git rev-parse --verify master)
CURRENT_BRANCH=$(git branch | grep \* | cut -d ' ' -f2-)
@@ -161,7 +161,7 @@ if [[ "${CHECK_DIFF_ONLY}" = "1" ]]; then
fi
fi
-for DIR_NOT_TO_BE_TESTED in $(git ls-files '*/.FORMATDENY'); do
+for DIR_NOT_TO_BE_TESTED in $(git ls-files -co --exclude-standard '*/.FORMATDENY'); do
DIRECTORIES_NOT_TO_BE_TESTED+=($(dirname "${DIR_NOT_TO_BE_TESTED}"))
done