From 6e18def2147a824a5f978d0575c94c19e3c90890 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Senior=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Wed, 18 Apr 2018 10:39:49 +0900 Subject: [PATCH] Allow configuration on directories to be format checked (#90) 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 --- scripts/command/format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/command/format b/scripts/command/format index a8560dc..67d41f3 100644 --- a/scripts/command/format +++ b/scripts/command/format @@ -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") -- 2.7.4