File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -869,6 +869,55 @@ function hbaseanti_patchfile
869869 return 0
870870}
871871
872+ # #####################################
873+
874+ add_test_type spotless
875+
876+ # # @description spotless file filter
877+ # # @audience private
878+ # # @stability evolving
879+ # # @param filename
880+ function spotless_filefilter
881+ {
882+ # always add spotless check as it can format almost all types of files
883+ add_test spotless
884+ }
885+ # # @description run spotless:check to check format issues
886+ # # @audience private
887+ # # @stability evolving
888+ # # @param repostatus
889+ function spotless_rebuild
890+ {
891+ local repostatus=$1
892+ local logfile=" ${PATCH_DIR} /${repostatus} -spotless.txt"
893+
894+ if ! verify_needed_test spotless; then
895+ return 0
896+ fi
897+
898+ big_console_header " Checking spotless on ${repostatus} "
899+
900+ start_clock
901+
902+ local -a maven_args=(' spotless:check' )
903+
904+ # disabled because "maven_executor" needs to return both command and args
905+ # shellcheck disable=2046
906+ echo_and_redirect " ${logfile} " $( maven_executor) " ${maven_args[@]} "
907+
908+ count=$( ${GREP} -c ' \[ERROR\]' " ${logfile} " )
909+ if [[ ${count} -gt 0 ]]; then
910+ add_vote_table -1 spotless " ${repostatus} has ${count} errors when running spotless:check, run spotless:apply to fix."
911+ add_footer_table spotless " @@BASE@@/${repostatus} -spotless.txt"
912+ return 1
913+ fi
914+
915+ add_vote_table +1 spotless " ${repostatus} has no errors when running spotless:check."
916+ return 0
917+ }
918+
919+ # #####################################
920+
872921# # @description process the javac output for generating WARNING/ERROR
873922# # @audience private
874923# # @stability evolving
Original file line number Diff line number Diff line change 27562756 <include >**/*.txt</include >
27572757 <include >*.txt</include >
27582758 </includes >
2759+ <excludes >
2760+ <exclude >**/target/**</exclude >
2761+ <exclude >**/dependency-reduced-pom.xml</exclude >
2762+ </excludes >
27592763 <!-- define the steps to apply to those files -->
27602764 <trimTrailingWhitespace />
27612765 <endWithNewline />
You can’t perform that action at this time.
0 commit comments