You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@yetus.apache.org by aw...@apache.org on 2016/01/08 21:29:14 UTC

yetus git commit: YETUS-273. Misleading warning messages when FINDBUGS_HOME is not set.

Repository: yetus
Updated Branches:
  refs/heads/master cccbb02ac -> 6ce890bcd


YETUS-273. Misleading warning messages when FINDBUGS_HOME is not set.

00:
  * test if FINDBUGS_HOME is set, before testing the commands within
01:
  * remove trailing whitespace

Signed-off-by: Allen Wittenauer <aw...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/6ce890bc
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/6ce890bc
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/6ce890bc

Branch: refs/heads/master
Commit: 6ce890bcd6bf2876f3d13b3fb4fc43e30b2c93d4
Parents: cccbb02
Author: Marco Zuehlke <mz...@gmail.com>
Authored: Fri Jan 8 17:01:11 2016 +0100
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Fri Jan 8 11:45:30 2016 -0800

----------------------------------------------------------------------
 precommit/test-patch.d/findbugs.sh | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/yetus/blob/6ce890bc/precommit/test-patch.d/findbugs.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/findbugs.sh b/precommit/test-patch.d/findbugs.sh
index 2f77811..a9e9614 100755
--- a/precommit/test-patch.d/findbugs.sh
+++ b/precommit/test-patch.d/findbugs.sh
@@ -60,15 +60,20 @@ function findbugs_precheck
   declare exec
   declare status=0
 
-  for exec in findbugs \
-              computeBugHistory \
-              convertXmlToText \
-              filterBugs \
-              setBugDatabaseInfo; do
-    if ! verify_command "${exec}" "${FINDBUGS_HOME}/bin/${exec}"; then
-      status=1
-    fi
-  done
+  if [[ -z ${FINDBUGS_HOME} ]]; then
+    yetus_error "FINDBUGS_HOME was not specified."
+    status=1
+  else
+    for exec in findbugs \
+                computeBugHistory \
+                convertXmlToText \
+                filterBugs \
+                setBugDatabaseInfo; do
+      if ! verify_command "${exec}" "${FINDBUGS_HOME}/bin/${exec}"; then
+        status=1
+      fi
+    done
+  fi
   if [[ ${status} == 1 ]]; then
     add_vote_table 0 findbugs "Findbugs executables are not available."
     delete_test findbugs