You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2022/05/02 15:26:27 UTC

[hbase] branch HBASE-26892 updated (b69e4eff463 -> 14b22ede407)

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

zhangduo pushed a change to branch HBASE-26892
in repository https://gitbox.apache.org/repos/asf/hbase.git


    omit b69e4eff463 HBASE-26892 Add spotless:check in our pre commit general check
     new 14b22ede407 HBASE-26892 Add spotless:check in our pre commit general check

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (b69e4eff463)
            \
             N -- N -- N   refs/heads/HBASE-26892 (14b22ede407)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 dev-support/hbase-personality.sh | 9 +++++++++
 1 file changed, 9 insertions(+)


[hbase] 01/01: HBASE-26892 Add spotless:check in our pre commit general check

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch HBASE-26892
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 14b22ede407ed53cc2d2464cc1ba6314ba4c6a9f
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Mon May 2 23:26:10 2022 +0800

    HBASE-26892 Add spotless:check in our pre commit general check
---
 dev-support/hbase-personality.sh | 49 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/dev-support/hbase-personality.sh b/dev-support/hbase-personality.sh
index 20600d52e10..dcfdab691fc 100755
--- a/dev-support/hbase-personality.sh
+++ b/dev-support/hbase-personality.sh
@@ -869,6 +869,55 @@ function hbaseanti_patchfile
   return 0
 }
 
+######################################
+
+add_test_type spotless
+
+## @description  spotless file filter
+## @audience     private
+## @stability    evolving
+## @param        filename
+function spotless_filefilter
+{
+  # always add spotless check as it can format almost all types of files
+  add_test spotless
+}
+## @description run spotless:check to check format issues
+## @audience private
+## @stability evolving
+## @param repostatus
+function spotless_rebuild
+{
+  local repostatus=$1
+  local logfile="${PATCH_DIR}/${repostatus}-spotless.txt"
+
+  if ! verify_needed_test spotless; then
+    return 0
+  fi
+
+  big_console_header "Checking spotless on ${repostatus}"
+
+  start_clock
+
+  local -a maven_args=('spotless:check')
+
+  # disabled because "maven_executor" needs to return both command and args
+  # shellcheck disable=2046
+  echo_and_redirect "${logfile}" $(maven_executor) "${maven_args[@]}"
+
+  count=$(${GREP} -c '\[ERROR\]' "${logfile}")
+  if [[ ${count} -gt 0 ]]; then
+    add_vote_table -1 spotless "${repostatus} has ${count} errors when running spotless:check, run spotless:apply to fix."
+    add_footer_table spotless "@@BASE@@/${repostatus}-spotless.txt"
+    return 1
+  fi
+
+  add_vote_table +1 spotless "${repostatus} has no errors when running spotless:check."
+  return 0
+}
+
+######################################
+
 ## @description  process the javac output for generating WARNING/ERROR
 ## @audience     private
 ## @stability    evolving