Allow configuration on directories to be format checked (#90)
author박종현/동작제어Lab(SR)/Senior Engineer/삼성전자 <jh1302.park@samsung.com>
Wed, 18 Apr 2018 01:39:49 +0000 (10:39 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Wed, 18 Apr 2018 01:39:49 +0000 (10:39 +0900)
This commit allows users to specify directories to be format checked on
'nncc format' via command-line arguments.

Running 'nncc format dir1' will check all the files under dir1 in addition
to the default files (i.e. files under directories that include .FORMATCHECKED)

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
scripts/command/format

index a8560dc..67d41f3 100644 (file)
@@ -22,7 +22,7 @@ if [[ -n $(git -C "${NNCC_PROJECT_PATH}" diff) ]]; then
   exit 255
 fi
 
-DIRECTORIES_TO_BE_TESTED=()
+DIRECTORIES_TO_BE_TESTED=("$@")
 
 for DIRECTORY_TO_BE_TESTED in $(find "${NNCC_PROJECT_PATH}" -name '.FORMATCHECKED' -exec dirname {} \;); do
   DIRECTORIES_TO_BE_TESTED+=("$DIRECTORY_TO_BE_TESTED")