Repository: hadoop Updated Branches: refs/heads/HADOOP-12111 4bc87cd2d -> 5e1985501
HADOOP-12196. shellcheck plugin is picking up target executables (Kengo Seki via aw) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/5e198550 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/5e198550 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/5e198550 Branch: refs/heads/HADOOP-12111 Commit: 5e19855013c1254b5db66a9b5009fa0458cd8d8e Parents: 4bc87cd Author: Allen Wittenauer <[email protected]> Authored: Mon Jul 13 10:53:09 2015 -0700 Committer: Allen Wittenauer <[email protected]> Committed: Mon Jul 13 10:53:09 2015 -0700 ---------------------------------------------------------------------- dev-support/test-patch.d/shellcheck.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/5e198550/dev-support/test-patch.d/shellcheck.sh ---------------------------------------------------------------------- diff --git a/dev-support/test-patch.d/shellcheck.sh b/dev-support/test-patch.d/shellcheck.sh index 1c06a5d..0ccd1c0 100755 --- a/dev-support/test-patch.d/shellcheck.sh +++ b/dev-support/test-patch.d/shellcheck.sh @@ -47,7 +47,15 @@ function shellcheck_private_findbash while read line; do value=$(find "${line}" ! -name '*.cmd' -type f \ | ${GREP} -E -v '(.orig$|.rej$)') - list="${list} ${value}" + + for i in ${value}; do + if [[ ! ${i} =~ \.sh(\.|$) + && ! $(head -n 1 "${i}") =~ ^#! ]]; then + yetus_debug "Shellcheck skipped: ${i}" + continue + fi + list="${list} ${i}" + done done < <(find . -type d -name bin -o -type d -name sbin -o -type d -name libexec -o -type d -name shellprofile.d) # shellcheck disable=SC2086 echo ${list} ${SHELLCHECK_SPECIFICFILES} | tr ' ' '\n' | sort -u @@ -137,6 +145,9 @@ function shellcheck_calcdiffs function shellcheck_postapply { local i + local numPrepatch + local numPostpatch + local diffPostpatch verify_needed_test shellcheck if [[ $? == 0 ]]; then
