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 2015/11/11 19:57:17 UTC
[1/6] yetus git commit: YETUS-161. fix spelling error in maven plugin
Repository: yetus
Updated Branches:
refs/heads/YETUS-83 ee5baeb74 -> 367bb4604
YETUS-161. fix spelling error in maven plugin
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/ca0fa9f5
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/ca0fa9f5
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/ca0fa9f5
Branch: refs/heads/YETUS-83
Commit: ca0fa9f5fe72d71051b7d60f35fc3709564b8152
Parents: b17912e
Author: Tony Kurc <tr...@gmail.com>
Authored: Tue Nov 3 21:19:56 2015 -0500
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Wed Nov 4 13:11:13 2015 -0800
----------------------------------------------------------------------
precommit/test-patch.d/maven.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/yetus/blob/ca0fa9f5/precommit/test-patch.d/maven.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/maven.sh b/precommit/test-patch.d/maven.sh
index 019b64d..1f9b35d 100755
--- a/precommit/test-patch.d/maven.sh
+++ b/precommit/test-patch.d/maven.sh
@@ -58,7 +58,7 @@ function maven_parse_args
if [[ -f ${MAVEN_SETTINGS} ]]; then
MAVEN_ARGS=("${MAVEN_ARGS[@]}" "--settings=${MAVEN_SETTINGS}")
else
- yetus_error "WARNING: ${MAVEN_SETTINGS} not found. Ignorning."
+ yetus_error "WARNING: ${MAVEN_SETTINGS} not found. Ignoring."
fi
;;
esac
[2/6] yetus git commit: YETUS-142. compile gets limited to 'warning'
in generic log handler
Posted by aw...@apache.org.
YETUS-142. compile gets limited to 'warning' in generic log handler
Signed-off-by: Chris Nauroth <cn...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/f2fefdb2
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/f2fefdb2
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/f2fefdb2
Branch: refs/heads/YETUS-83
Commit: f2fefdb23ede6942e2aa3b228108a20421e717fe
Parents: ca0fa9f
Author: Allen Wittenauer <aw...@apache.org>
Authored: Mon Nov 2 22:13:46 2015 -0800
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Wed Nov 4 13:36:38 2015 -0800
----------------------------------------------------------------------
precommit/test-patch.d/ant.sh | 32 +++++++----------
precommit/test-patch.d/cc.sh | 30 +++++++++-------
precommit/test-patch.d/gradle.sh | 37 +++++++++++--------
precommit/test-patch.d/java.sh | 26 ++++++++++++++
precommit/test-patch.d/maven.sh | 21 +++++------
precommit/test-patch.d/scala.sh | 26 ++++++++++++++
precommit/test-patch.sh | 67 ++++++++++++++++++-----------------
7 files changed, 146 insertions(+), 93 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/yetus/blob/f2fefdb2/precommit/test-patch.d/ant.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/ant.sh b/precommit/test-patch.d/ant.sh
index 9d931a5..6fc9e2f 100755
--- a/precommit/test-patch.d/ant.sh
+++ b/precommit/test-patch.d/ant.sh
@@ -108,36 +108,30 @@ function ant_modules_worker
esac
}
-function ant_javac_count_probs
+## @description Helper for generic_logfilter
+## @audience private
+## @stability evolving
+## @replaceable no
+function ant_javac_logfilter
{
- declare warningfile=$1
- declare val1
- declare val2
+ declare input=$1
+ declare output=$2
#shellcheck disable=SC2016
- val1=$(${GREP} -E "\[javac\] [0-9]+ errors?$" "${warningfile}" | ${AWK} '{sum+=$2} END {print sum}')
- #shellcheck disable=SC2016
- val2=$(${GREP} -E "\[javac\] [0-9]+ warnings?$" "${warningfile}" | ${AWK} '{sum+=$2} END {print sum}')
- echo $((val1+val2))
+ ${GREP} "\[javac\] /" "${input}" > "${output}"
}
-## @description Helper for check_patch_javadoc
+## @description Helper for generic_logfilter
## @audience private
## @stability evolving
## @replaceable no
-## @return 0 on success
-## @return 1 on failure
-function ant_javadoc_count_probs
+function ant_javadoc_logfilter
{
- local warningfile=$1
- local val1
- local val2
+ declare input=$1
+ declare output=$2
#shellcheck disable=SC2016
- val1=$(${GREP} -E "\[javadoc\] [0-9]+ errors?$" "${warningfile}" | ${AWK} '{sum+=$2} END {print sum}')
- #shellcheck disable=SC2016
- val2=$(${GREP} -E "\[javadoc\] [0-9]+ warnings?$" "${warningfile}" | ${AWK} '{sum+=$2} END {print sum}')
- echo $((val1+val2))
+ ${GREP} "\[javadoc\] /" "${input}" > "${output}"
}
function ant_builtin_personality_modules
http://git-wip-us.apache.org/repos/asf/yetus/blob/f2fefdb2/precommit/test-patch.d/cc.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/cc.sh b/precommit/test-patch.d/cc.sh
index cae91d3..eb8ce4e 100755
--- a/precommit/test-patch.d/cc.sh
+++ b/precommit/test-patch.d/cc.sh
@@ -16,21 +16,20 @@
add_test_type cc
+CC_EXT_RE='(c|cc|cpp|cxx|c\+\+|h|hh|hpp|hxx|h\+\+)'
+
function cc_filefilter
{
declare filename=$1
- if [[ ${filename} =~ \.c$
- || ${filename} =~ \.cc$
- || ${filename} =~ \.cpp$
- || ${filename} =~ \.cxx$
- || ${filename} =~ \.h$
- || ${filename} =~ \.hh$
- ]]; then
- yetus_debug "tests/cc: ${filename}"
- add_test cc
- add_test compile
+ shopt -s nocasematch
+ if [[ ${filename} =~ \.${CC_EXT_RE}$ ]]; then
+ shopt -u nocasematch
+ yetus_debug "tests/cc: ${filename}"
+ add_test cc
+ add_test compile
fi
+ shopt -u nocasematch
}
## @description check for C/C++ compiler errors
@@ -54,10 +53,15 @@ function cc_compile
fi
}
-function cc_count_probs
+## @description Helper for generic_logfilter
+## @audience private
+## @stability evolving
+## @replaceable no
+function cc_logfilter
{
- declare warningfile=$1
+ declare input=$1
+ declare output=$2
#shellcheck disable=SC2016,SC2046
- ${GREP} -E '^.*\.(c|cc|h|hh)\:[[:digit:]]*\:' "${warningfile}" | ${AWK} '{sum+=1} END {print sum}'
+ ${GREP} -i -E "^.*\.${CC_EXT_RE}\:[[:digit:]]*\:" "${input}" > "${output}"
}
http://git-wip-us.apache.org/repos/asf/yetus/blob/f2fefdb2/precommit/test-patch.d/gradle.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/gradle.sh b/precommit/test-patch.d/gradle.sh
index 56da8d5..2a5fb42 100755
--- a/precommit/test-patch.d/gradle.sh
+++ b/precommit/test-patch.d/gradle.sh
@@ -114,36 +114,43 @@ function gradle_precompile
return 0
}
-function gradle_scalac_count_probs
+## @description Helper for generic_logfilter
+## @audience private
+## @stability evolving
+## @replaceable no
+function gradle_javac_logfilter
{
- local warningfile=$1
+ declare input=$1
+ declare output=$2
#shellcheck disable=SC2016,SC2046
- ${GREP} "^/.*.scala:[0-9]*:" "${warningfile}" | wc -l
+ ${GREP} "\.java" "${input}" > "${output}"
}
-function gradle_javac_count_probs
+## @description Helper for generic_logfilter
+## @audience private
+## @stability evolving
+## @replaceable no
+function gradle_javadoc_logfilter
{
- echo 0
-}
+ declare input=$1
+ declare output=$2
-function gradle_javadoc_count_probs
-{
- echo 0
+ #shellcheck disable=SC2016,SC2046
+ ${GREP} "javadoc.*\.java" "${input}" > "${output}"
}
-## @description Helper for check_patch_javadoc
+## @description Helper for generic_logfilter
## @audience private
## @stability evolving
## @replaceable no
-## @return 0 on success
-## @return 1 on failure
-function gradle_scaladoc_count_probs
+function gradle_scaladoc_logfilter
{
- local warningfile=$1
+ declare input=$1
+ declare output=$2
#shellcheck disable=SC2016,SC2046
- ${GREP} "^\[ant:scaladoc\]" "${warningfile}" | wc -l
+ ${GREP} "^\[ant:scaladoc\] /.*\.scala" "${input}" > "${output}"
}
function gradle_modules_worker
http://git-wip-us.apache.org/repos/asf/yetus/blob/f2fefdb2/precommit/test-patch.d/java.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/java.sh b/precommit/test-patch.d/java.sh
index 49a220f..ff66150 100755
--- a/precommit/test-patch.d/java.sh
+++ b/precommit/test-patch.d/java.sh
@@ -184,3 +184,29 @@ function javadoc_rebuild
generic_post_handler javadoc javadoc "${multijdkmode}" true
fi
}
+
+## @description Helper for generic_logfilter
+## @audience private
+## @stability evolving
+## @replaceable no
+function javac_logfilter
+{
+ declare input=$1
+ declare output=$2
+
+ #shellcheck disable=SC2016,SC2046
+ ${GREP} "^.*.java:[0-9]*:" "${input}" > "${output}"
+}
+
+## @description Helper for generic_logfilter
+## @audience private
+## @stability evolving
+## @replaceable no
+function javadoc_logfilter
+{
+ declare input=$1
+ declare output=$2
+
+ #shellcheck disable=SC2016,SC2046
+ ${GREP} "^.*.java:[0-9]*:" "${input}" > "${output}"
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/yetus/blob/f2fefdb2/precommit/test-patch.d/maven.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/maven.sh b/precommit/test-patch.d/maven.sh
index 1f9b35d..43e2b0b 100755
--- a/precommit/test-patch.d/maven.sh
+++ b/precommit/test-patch.d/maven.sh
@@ -212,17 +212,12 @@ function maven_modules_worker
esac
}
-function maven_javac_count_probs
+function maven_javac_logfilter
{
- local warningfile=$1
+ declare input=$1
+ declare output=$2
- #shellcheck disable=SC2016,SC2046
- ${GREP} '\[WARNING\]' "${warningfile}" | ${AWK} '{sum+=1} END {print sum}'
-}
-
-function maven_scalac_count_probs
-{
- echo 0
+ ${GREP} -E '\[(ERROR|WARNING)\] /.*\.java:' "${input}" > "${output}"
}
## @description Helper for check_patch_javadoc
@@ -231,12 +226,12 @@ function maven_scalac_count_probs
## @replaceable no
## @return 0 on success
## @return 1 on failure
-function maven_javadoc_count_probs
+function maven_javadoc_logfilter
{
- local warningfile=$1
+ declare input=$1
+ declare output=$2
- #shellcheck disable=SC2016,SC2046
- ${GREP} -E "^[0-9]+ warnings?$" "${warningfile}" | ${AWK} '{sum+=$1} END {print sum}'
+ ${GREP} -E '\[(ERROR|WARNING)\] /.*\.java:' "${input}" > "${output}"
}
function maven_builtin_personality_modules
http://git-wip-us.apache.org/repos/asf/yetus/blob/f2fefdb2/precommit/test-patch.d/scala.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/scala.sh b/precommit/test-patch.d/scala.sh
index 06aa86f..dee2bd2 100755
--- a/precommit/test-patch.d/scala.sh
+++ b/precommit/test-patch.d/scala.sh
@@ -74,4 +74,30 @@ function scaladoc_rebuild
else
generic_post_handler scaladoc scaladoc false true
fi
+}
+
+## @description Helper for generic_logfilter
+## @audience private
+## @stability evolving
+## @replaceable no
+function scalac_logfilter
+{
+ declare input=$1
+ declare output=$2
+
+ #shellcheck disable=SC2016,SC2046
+ ${GREP} "^/.*.scala:[0-9]*:" "${input}" > "${output}"
+}
+
+## @description Helper for generic_logfilter
+## @audience private
+## @stability evolving
+## @replaceable no
+function scaladoc_logfilter
+{
+ declare input=$1
+ declare output=$2
+
+ #shellcheck disable=SC2016,SC2046
+ ${GREP} "^/.*.scala:[0-9]*:" "${input}" > "${output}"
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/yetus/blob/f2fefdb2/precommit/test-patch.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.sh b/precommit/test-patch.sh
index 6b398ad..5cd5912 100755
--- a/precommit/test-patch.sh
+++ b/precommit/test-patch.sh
@@ -2107,19 +2107,20 @@ function calcdiffs
## @stability evolving
## @replaceable no
## @return number of issues
-function generic_count_probs
+function generic_logfilter
{
declare testtype=$1
declare input=$2
-
- if declare -f ${PROJECT_NAME}_${testtype}_count_probs >/dev/null; then
- "${PROJECT_NAME}_${testtype}_count_probs" "${input}"
- elif declare -f ${BUILDTOOL}_${testtype}_count_probs >/dev/null; then
- "${BUILDTOOL}_${testtype}_count_probs" "${input}"
- elif declare -f ${testtype}_count_probs >/dev/null; then
- "${testtype}_count_probs" "${input}"
+ declare output=$3
+
+ if declare -f ${PROJECT_NAME}_${testtype}_logfilter >/dev/null; then
+ "${PROJECT_NAME}_${testtype}_logfilter" "${input}" "${output}"
+ elif declare -f ${BUILDTOOL}_${testtype}_logfilter >/dev/null; then
+ "${BUILDTOOL}_${testtype}_logfilter" "${input}" "${output}"
+ elif declare -f ${testtype}_logfilter >/dev/null; then
+ "${testtype}_logfilter" "${input}" "${output}"
else
- yetus_error "ERROR: ${testtype}: No function defined to count problems."
+ yetus_error "ERROR: ${testtype}: No function defined to filter problems."
echo 0
fi
}
@@ -2192,6 +2193,9 @@ function generic_postlog_compare
declare fn
declare jdk
declare statusjdk
+ declare numbranch
+ declare numpatch
+ declare diffpatch
if [[ ${multijdk} == true ]]; then
jdk=$(report_jvm_version "${JAVA_HOME}")
@@ -2218,39 +2222,36 @@ function generic_postlog_compare
yetus_debug "${testtype}: branch-${origlog}-${fn}.txt vs. patch-${origlog}-${fn}.txt"
# if it was a new module, this won't exist.
- if [[ -f "${PATCH_DIR}/branch-${origlog}-${fn}.txt" ]]; then
- ${GREP} -i warning "${PATCH_DIR}/branch-${origlog}-${fn}.txt" \
- > "${PATCH_DIR}/branch-${testtype}-${fn}-warning.txt"
- else
- touch "${PATCH_DIR}/branch-${origlog}-${fn}.txt" \
- "${PATCH_DIR}/branch-${testtype}-${fn}-warning.txt"
+ if [[ ! -f "${PATCH_DIR}/branch-${origlog}-${fn}.txt" ]]; then
+ touch "${PATCH_DIR}/branch-${origlog}-${fn}.txt"
fi
- if [[ -f "${PATCH_DIR}/patch-${origlog}-${fn}.txt" ]]; then
- ${GREP} -i warning "${PATCH_DIR}/patch-${origlog}-${fn}.txt" \
- > "${PATCH_DIR}/patch-${testtype}-${fn}-warning.txt"
- else
- touch "${PATCH_DIR}/patch-${origlog}-${fn}.txt" \
- "${PATCH_DIR}/patch-${testtype}-${fn}-warning.txt"
+ if [[ ! -f "${PATCH_DIR}/patch-${origlog}-${fn}.txt" ]]; then
+ touch "${PATCH_DIR}/patch-${origlog}-${fn}.txt"
fi
- numbranch=$("generic_count_probs" "${testtype}" "${PATCH_DIR}/branch-${testtype}-${fn}-warning.txt")
- numpatch=$("generic_count_probs" "${testtype}" "${PATCH_DIR}/patch-${testtype}-${fn}-warning.txt")
+ generic_logfilter "${testtype}" "${PATCH_DIR}/branch-${origlog}-${fn}.txt" "${PATCH_DIR}/branch-${origlog}-${testtype}-${fn}.txt"
+ generic_logfilter "${testtype}" "${PATCH_DIR}/patch-${origlog}-${fn}.txt" "${PATCH_DIR}/patch-${origlog}-${testtype}-${fn}.txt"
- yetus_debug "${testtype}: old: ${numbranch} vs new: ${numpatch}"
+ numbranch=$(wc -l "${PATCH_DIR}/branch-${origlog}-${testtype}-${fn}.txt" | ${AWK} '{print $1}')
+ numpatch=$(wc -l "${PATCH_DIR}/patch-${origlog}-${testtype}-${fn}.txt" | ${AWK} '{print $1}')
- if [[ -n ${numbranch}
- && -n ${numpatch}
- && ${numpatch} -gt ${numbranch} ]]; then
+ calcdiffs \
+ "${PATCH_DIR}/branch-${origlog}-${testtype}-${fn}.txt" \
+ "${PATCH_DIR}/patch-${origlog}-${testtype}-${fn}.txt" \
+ > "${PATCH_DIR}/diff-${origlog}-${testtype}-${fn}.txt"
- ${DIFF} -u "${PATCH_DIR}/branch-${testtype}-${fn}-warning.txt" \
- "${PATCH_DIR}/patch-${testtype}-${fn}-warning.txt" \
- > "${PATCH_DIR}/${testtype}-${fn}-diff.txt"
+ diffpatch=$(wc -l "${PATCH_DIR}/diff-${origlog}-${testtype}-${fn}.txt" | ${AWK} '{print $1}')
- add_vote_table -1 "${testtype}" "${fn}${statusjdk} has problems."
- add_footer_table "${testtype}" "${fn}: @@BASE@@/${testtype}-${fn}-diff.txt"
+ echo ""
+ echo "${module_suffix}/${testtype}: ${diffpatch} new issues (was ${numbranch}, now ${numpatch})."
- ((result=result+1))
+ if [[ ${diffpatch} -gt 0 ]] ; then
+ ((result = result + 1))
+
+ add_vote_table -1 "${testtype}" "${fn}${statusjdk} generated " \
+ "${diffpatch} new issues (was ${numbranch}, now ${numpatch}). "
+ add_footer_table "${testtype}" "${fn}: @@BASE@@/diff-${origlog}-${testtype}-${fn}.txt"
fi
((i=i+1))
done
[6/6] yetus git commit: Merge branch 'master' into YETUS-83
Posted by aw...@apache.org.
Merge branch 'master' into YETUS-83
Project: http://git-wip-us.apache.org/repos/asf/yetus/repo
Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/367bb460
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/367bb460
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/367bb460
Branch: refs/heads/YETUS-83
Commit: 367bb460459205983db7a0a7bf95cfa696884707
Parents: ee5baeb a2f7e4d
Author: Allen Wittenauer <aw...@apache.org>
Authored: Wed Nov 11 10:37:12 2015 -0800
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Wed Nov 11 10:37:12 2015 -0800
----------------------------------------------------------------------
precommit/test-patch.d/asflicense.sh | 7 ++++++
precommit/test-patch.d/checkstyle.sh | 38 +++++++++++++++++++++++++++++--
precommit/test-patch.d/whitespace.sh | 2 +-
3 files changed, 44 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[5/6] yetus git commit: YETUS-87 whitespace console message is
misleading
Posted by aw...@apache.org.
YETUS-87 whitespace console message is misleading
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/a2f7e4dc
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/a2f7e4dc
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/a2f7e4dc
Branch: refs/heads/YETUS-83
Commit: a2f7e4dc884bf9e4202f40ca793083b710053a82
Parents: 32ac5ca
Author: Marco Zuehlke <mz...@gmail.com>
Authored: Wed Nov 11 16:37:48 2015 +0100
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Wed Nov 11 08:16:55 2015 -0800
----------------------------------------------------------------------
precommit/test-patch.d/whitespace.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/yetus/blob/a2f7e4dc/precommit/test-patch.d/whitespace.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/whitespace.sh b/precommit/test-patch.d/whitespace.sh
index 32c5f42..a613d81 100755
--- a/precommit/test-patch.d/whitespace.sh
+++ b/precommit/test-patch.d/whitespace.sh
@@ -45,7 +45,7 @@ function whitespace_postcompile
return 0
fi
- big_console_header "Checking for whitespace at the end of lines"
+ big_console_header "Checking for whitespace issues."
start_clock
pushd "${BASEDIR}" >/dev/null
[3/6] yetus git commit: YETUS-116. add checkstyle option for maven
goal
Posted by aw...@apache.org.
YETUS-116. add checkstyle option for maven goal
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/e26177a0
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/e26177a0
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/e26177a0
Branch: refs/heads/YETUS-83
Commit: e26177a03d7629e28464dc3a1687e6ef73bfb7fa
Parents: f2fefdb
Author: Tony Kurc <tr...@gmail.com>
Authored: Tue Nov 3 20:52:03 2015 -0500
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Fri Nov 6 09:07:12 2015 -0800
----------------------------------------------------------------------
precommit/test-patch.d/checkstyle.sh | 38 +++++++++++++++++++++++++++++--
1 file changed, 36 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/yetus/blob/e26177a0/precommit/test-patch.d/checkstyle.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/checkstyle.sh b/precommit/test-patch.d/checkstyle.sh
index 24b9ffc..236664a 100755
--- a/precommit/test-patch.d/checkstyle.sh
+++ b/precommit/test-patch.d/checkstyle.sh
@@ -17,6 +17,10 @@
add_test_type checkstyle
CHECKSTYLE_TIMER=0
+CHECKSTYLE_GOAL_DEFAULT="checkstyle"
+CHECKSTYLE_GOAL="${CHECKSTYLE_GOAL_DEFAULT}"
+CHECKSTYLE_OPTIONS_DEFAULT="-Dcheckstyle.consoleOutput=true"
+CHECKSTYLE_OPTIONS="${CHECKSTYLE_OPTIONS_DEFAULT}"
function checkstyle_filefilter
{
@@ -30,6 +34,36 @@ function checkstyle_filefilter
fi
}
+function checkstyle_usage
+{
+ echo "Checkstyle options:"
+ echo "--checkstyle-goal=<goal> Checkstyle maven plugin goal to use, 'check' and 'checkstyle' supported. Defaults to '${CHECKSTYLE_GOAL_DEFAULT}'."
+}
+
+function checkstyle_parse_args
+{
+ local i
+
+ for i in "$@"; do
+ case ${i} in
+ --checkstyle-goal=*)
+ CHECKSTYLE_GOAL=${i#*=}
+ case ${CHECKSTYLE_GOAL} in
+ check)
+ CHECKSTYLE_OPTIONS="-Dcheckstyle.consoleOutput=true -Dcheckstyle.failOnViolation=false"
+ ;;
+ checkstyle)
+ ;;
+ *)
+ yetus_error "Warning: checkstyle goal ${CHECKSTYLE_GOAL} not supported. It may have unexpected behavior"
+ ;;
+ esac
+ ;;
+ esac
+ done
+}
+
+
function checkstyle_runner
{
local repostatus=$1
@@ -74,8 +108,8 @@ function checkstyle_runner
;;
maven)
cmd="${MAVEN} ${MAVEN_ARGS[*]} \
- checkstyle:checkstyle \
- -Dcheckstyle.consoleOutput=true \
+ checkstyle:${CHECKSTYLE_GOAL} \
+ ${CHECKSTYLE_OPTIONS} \
${MODULEEXTRAPARAM[${i}]//@@@MODULEFN@@@/${fn}} -Ptest-patch"
;;
*)
[4/6] yetus git commit: YETUS-155. add usage for asflicense plugin
Posted by aw...@apache.org.
YETUS-155. add usage for asflicense plugin
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/32ac5cac
Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/32ac5cac
Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/32ac5cac
Branch: refs/heads/YETUS-83
Commit: 32ac5cac261901adb4391678ebf3f573896dee78
Parents: e26177a
Author: Marco Zuehlke <mz...@gmail.com>
Authored: Tue Nov 10 18:27:19 2015 +0100
Committer: Allen Wittenauer <aw...@apache.org>
Committed: Wed Nov 11 08:16:11 2015 -0800
----------------------------------------------------------------------
precommit/test-patch.d/asflicense.sh | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/yetus/blob/32ac5cac/precommit/test-patch.d/asflicense.sh
----------------------------------------------------------------------
diff --git a/precommit/test-patch.d/asflicense.sh b/precommit/test-patch.d/asflicense.sh
index a88c510..e69db9f 100755
--- a/precommit/test-patch.d/asflicense.sh
+++ b/precommit/test-patch.d/asflicense.sh
@@ -17,6 +17,13 @@
add_test_type asflicense
+function asflicense_usage
+{
+ echo "ASF License Options:"
+ echo "--asflicense-rat-excludes=<path> path to file containing exclusion patterns"
+ echo "--asflicense-rat-jar=<path> path to Apache Creadur Rat jar file"
+}
+
function asflicense_parse_args
{
declare i