You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@yetus.apache.org by aw...@apache.org on 2022/04/19 18:46:11 UTC

[yetus] branch main updated: YETUS-1150. handle verify_command failures better (#253)

This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/yetus.git


The following commit(s) were added to refs/heads/main by this push:
     new d1c3eaa1 YETUS-1150. handle verify_command failures better (#253)
d1c3eaa1 is described below

commit d1c3eaa16c0d92855d4b3f0c962952347414aa68
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Tue Apr 19 11:46:05 2022 -0700

    YETUS-1150. handle verify_command failures better (#253)
---
 precommit/src/main/shell/plugins.d/ansiblelint.sh  | 1 +
 precommit/src/main/shell/plugins.d/buf.sh          | 1 +
 precommit/src/main/shell/plugins.d/checkmake.sh    | 1 +
 precommit/src/main/shell/plugins.d/codespell.sh    | 1 +
 precommit/src/main/shell/plugins.d/detsecrets.sh   | 1 +
 precommit/src/main/shell/plugins.d/hadolint.sh     | 1 +
 precommit/src/main/shell/plugins.d/jshint.sh       | 1 +
 precommit/src/main/shell/plugins.d/markdownlint.sh | 1 +
 precommit/src/main/shell/plugins.d/perlcritic.sh   | 1 +
 precommit/src/main/shell/plugins.d/pylint.sh       | 1 +
 precommit/src/main/shell/plugins.d/revive.sh       | 1 +
 precommit/src/main/shell/plugins.d/rubocop.sh      | 1 +
 precommit/src/main/shell/plugins.d/shellcheck.sh   | 1 +
 precommit/src/main/shell/plugins.d/shelldocs.sh    | 1 +
 precommit/src/main/shell/plugins.d/spotbugs.sh     | 1 +
 precommit/src/main/shell/plugins.d/yamllint.sh     | 1 +
 16 files changed, 16 insertions(+)

diff --git a/precommit/src/main/shell/plugins.d/ansiblelint.sh b/precommit/src/main/shell/plugins.d/ansiblelint.sh
index 2f0fbcc4..baf60620 100755
--- a/precommit/src/main/shell/plugins.d/ansiblelint.sh
+++ b/precommit/src/main/shell/plugins.d/ansiblelint.sh
@@ -54,6 +54,7 @@ function ansiblelint_precheck
   if ! verify_command ansiblelint "${ANSIBLELINT}"; then
     add_vote_table 0 ansiblelint "ansiblelint was not available."
     delete_test ansiblelint
+    return 0
   fi
 }
 
diff --git a/precommit/src/main/shell/plugins.d/buf.sh b/precommit/src/main/shell/plugins.d/buf.sh
index 11fef5c5..bf12025c 100755
--- a/precommit/src/main/shell/plugins.d/buf.sh
+++ b/precommit/src/main/shell/plugins.d/buf.sh
@@ -88,6 +88,7 @@ function buf_precheck
     add_vote_table_v2 0 buf "" "buf was not available."
     delete_test buflint
     delete_test bufcompat
+    return 0
   fi
 
   # shellcheck disable=SC2016
diff --git a/precommit/src/main/shell/plugins.d/checkmake.sh b/precommit/src/main/shell/plugins.d/checkmake.sh
index 2f3d7846..3d7a21c0 100755
--- a/precommit/src/main/shell/plugins.d/checkmake.sh
+++ b/precommit/src/main/shell/plugins.d/checkmake.sh
@@ -58,6 +58,7 @@ function checkmake_precheck
   if ! verify_command checkmake "${CHECKMAKE}"; then
     add_vote_table_v2 0 checkmake "" "checkmake was not available."
     delete_test checkmake
+    return 0
   fi
 }
 
diff --git a/precommit/src/main/shell/plugins.d/codespell.sh b/precommit/src/main/shell/plugins.d/codespell.sh
index c267ae28..afddfde9 100755
--- a/precommit/src/main/shell/plugins.d/codespell.sh
+++ b/precommit/src/main/shell/plugins.d/codespell.sh
@@ -58,6 +58,7 @@ function codespell_precheck
   if ! verify_command "codespell" "${CODESPELL}"; then
     add_vote_table_v2 0 codespell "" "codespell was not available."
     delete_test codespell
+    return 0
   fi
 }
 
diff --git a/precommit/src/main/shell/plugins.d/detsecrets.sh b/precommit/src/main/shell/plugins.d/detsecrets.sh
index 0a9ebfc5..f97691c9 100755
--- a/precommit/src/main/shell/plugins.d/detsecrets.sh
+++ b/precommit/src/main/shell/plugins.d/detsecrets.sh
@@ -77,6 +77,7 @@ function detsecrets_precheck
   if ! verify_command "detect-secrets" "${DETSECRETS}"; then
     add_vote_table_v2 0 detsecrets "" "detect-secrets was not available."
     delete_test detsecrets
+    return 0
   fi
 
   # shellcheck disable=SC2016
diff --git a/precommit/src/main/shell/plugins.d/hadolint.sh b/precommit/src/main/shell/plugins.d/hadolint.sh
index 52e3e4f1..61a72814 100755
--- a/precommit/src/main/shell/plugins.d/hadolint.sh
+++ b/precommit/src/main/shell/plugins.d/hadolint.sh
@@ -43,6 +43,7 @@ function hadolint_precheck
   if ! verify_command "hadolint" "${HADOLINT}"; then
     add_vote_table_v2 0 hadolint "" "hadolint was not available."
     delete_test hadolint
+    return 0
   fi
 
   if [[ -z "${LANG}" ]]; then
diff --git a/precommit/src/main/shell/plugins.d/jshint.sh b/precommit/src/main/shell/plugins.d/jshint.sh
index bb0dbd2c..b41aefbe 100755
--- a/precommit/src/main/shell/plugins.d/jshint.sh
+++ b/precommit/src/main/shell/plugins.d/jshint.sh
@@ -61,6 +61,7 @@ function jshint_precheck
   if ! verify_command "jshint" "${JSHINT}"; then
     add_vote_table_v2 0 jshint "" "jshint was not available."
     delete_test jshint
+    return 0
   fi
 
   cat > "${PATCH_DIR}/jshintreporter.js" << EOF
diff --git a/precommit/src/main/shell/plugins.d/markdownlint.sh b/precommit/src/main/shell/plugins.d/markdownlint.sh
index 64453eb6..d865a419 100755
--- a/precommit/src/main/shell/plugins.d/markdownlint.sh
+++ b/precommit/src/main/shell/plugins.d/markdownlint.sh
@@ -40,6 +40,7 @@ function markdownlint_precheck
   if ! verify_command "markdownlint" "${MARKDOWNLINT}"; then
     add_vote_table_v2 0 markdownlint "" "markdownlint was not available."
     delete_test markdownlint
+    return 0
   fi
 }
 
diff --git a/precommit/src/main/shell/plugins.d/perlcritic.sh b/precommit/src/main/shell/plugins.d/perlcritic.sh
index 70853293..013d1eb8 100755
--- a/precommit/src/main/shell/plugins.d/perlcritic.sh
+++ b/precommit/src/main/shell/plugins.d/perlcritic.sh
@@ -55,6 +55,7 @@ function perlcritic_precheck
   if ! verify_command "Perl::Critic" "${PERLCRITIC}"; then
     add_vote_table_v2 0 perlcritic "" "Perl::Critic was not available."
     delete_test perlcritic
+    return 0
   fi
 }
 
diff --git a/precommit/src/main/shell/plugins.d/pylint.sh b/precommit/src/main/shell/plugins.d/pylint.sh
index e6391aae..2d9fe0bc 100755
--- a/precommit/src/main/shell/plugins.d/pylint.sh
+++ b/precommit/src/main/shell/plugins.d/pylint.sh
@@ -86,6 +86,7 @@ function pylint_precheck
   if ! verify_command "Pylint" "${PYLINT}"; then
     add_vote_table_v2 0 pylint "" "Pylint was not available."
     delete_test pylint
+    return 0
   fi
 
   if [[ "${PYLINT_REQUIREMENTS}" == true ]] && ! verify_command pip "${PYLINT_PIP_CMD}"; then
diff --git a/precommit/src/main/shell/plugins.d/revive.sh b/precommit/src/main/shell/plugins.d/revive.sh
index db1ed23b..d9d7cc4b 100755
--- a/precommit/src/main/shell/plugins.d/revive.sh
+++ b/precommit/src/main/shell/plugins.d/revive.sh
@@ -60,6 +60,7 @@ function revive_precheck
   if ! verify_command revive "${REVIVE}"; then
     add_vote_table_v2 0 revive "" "revive was not available."
     delete_test revive
+    return 0
   fi
 }
 
diff --git a/precommit/src/main/shell/plugins.d/rubocop.sh b/precommit/src/main/shell/plugins.d/rubocop.sh
index 00c9885a..b4216eac 100755
--- a/precommit/src/main/shell/plugins.d/rubocop.sh
+++ b/precommit/src/main/shell/plugins.d/rubocop.sh
@@ -60,6 +60,7 @@ function rubocop_precheck
   if ! verify_command rubocop "${RUBOCOP}"; then
     add_vote_table_v2 0 rubocop "" "rubocop was not available."
     delete_test rubocop
+    return 0
   fi
 }
 
diff --git a/precommit/src/main/shell/plugins.d/shellcheck.sh b/precommit/src/main/shell/plugins.d/shellcheck.sh
index fd771f5a..1d56a028 100755
--- a/precommit/src/main/shell/plugins.d/shellcheck.sh
+++ b/precommit/src/main/shell/plugins.d/shellcheck.sh
@@ -62,6 +62,7 @@ function shellcheck_precheck
   if ! verify_command "shellcheck" "${SHELLCHECK}"; then
     add_vote_table_v2 0 shellcheck "" "Shellcheck was not available."
     delete_test shellcheck
+    return 0
   else
     # shellcheck disable=SC2016
     SHELLCHECK_VERSION=$("${SHELLCHECK}" --version | "${GREP}" version: | "${AWK}" '{print $NF}')
diff --git a/precommit/src/main/shell/plugins.d/shelldocs.sh b/precommit/src/main/shell/plugins.d/shelldocs.sh
index b44117a6..1457c16b 100755
--- a/precommit/src/main/shell/plugins.d/shelldocs.sh
+++ b/precommit/src/main/shell/plugins.d/shelldocs.sh
@@ -76,6 +76,7 @@ function shelldocs_precheck
   if ! verify_command "shelldocs" "${SHELLDOCS}"; then
     add_vote_table_v2 0 shelldocs "" "Shelldocs was not available."
     delete_test shelldocs
+    return 0
   fi
 }
 
diff --git a/precommit/src/main/shell/plugins.d/spotbugs.sh b/precommit/src/main/shell/plugins.d/spotbugs.sh
index a43ab07f..1a4268ba 100755
--- a/precommit/src/main/shell/plugins.d/spotbugs.sh
+++ b/precommit/src/main/shell/plugins.d/spotbugs.sh
@@ -92,6 +92,7 @@ function spotbugs_precheck
   if [[ ${status} == 1 ]]; then
     add_vote_table_v2 0 "spotbugs" "" "spotbugs executables are not available."
     delete_test "spotbugs"
+    return 0
   fi
 }
 
diff --git a/precommit/src/main/shell/plugins.d/yamllint.sh b/precommit/src/main/shell/plugins.d/yamllint.sh
index 4e00ea56..0eb6daa9 100755
--- a/precommit/src/main/shell/plugins.d/yamllint.sh
+++ b/precommit/src/main/shell/plugins.d/yamllint.sh
@@ -41,6 +41,7 @@ function yamllint_precheck
   if ! verify_command "yamllint" "${YAMLLINT}"; then
     add_vote_table_v2 0 yamllint "" "yamllint was not available."
     delete_test yamllint
+    return 0
   fi
 }