[
https://issues.apache.org/jira/browse/HBASE-22100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16801297#comment-16801297
]
Duo Zhang commented on HBASE-22100:
-----------------------------------
{quote}
If you think this is a thing we can fix by updating the default javac output
diff set up in yetus, then yeah a yetus jira makes sense.
{quote}
No sure how yetus works but I found something maybe related in yetus
{code:maven.sh}
## @description process javac output from maven
## @audience private
## @stability evolving
function maven_javac_logfilter
{
declare input=$1
declare output=$2
${GREP} -E '\[(ERROR|WARNING)\] /.*\.java:' "${input}" > "${output}"
}
## @description handle diffing maven javac errors
## @audience private
## @stability evolving
## @replaceable no
## @param branchlog
## @param patchlog
## @return differences
function maven_javac_calcdiffs
{
declare orig=$1
declare new=$2
declare tmp=${PATCH_DIR}/pl.$$.${RANDOM}
# first, strip :[line
# this keeps file,column in an attempt to increase
# accuracy in case of multiple, repeated errors
# since the column number shouldn't change
# if the line of code hasn't been touched
"${SED}" -e 's#:\[[0-9]*,#:#' "${orig}" > "${tmp}.branch"
"${SED}" -e 's#:\[[0-9]*,#:#' "${new}" > "${tmp}.patch"
# compare the errors, generating a string of line
# numbers. Sorry portability: GNU diff makes this too easy
${DIFF} --unchanged-line-format="" \
--old-line-format="" \
--new-line-format="%dn " \
"${tmp}.branch" \
"${tmp}.patch" > "${tmp}.lined"
# now, pull out those lines of the raw output
# shellcheck disable=SC2013
for j in $(cat "${tmp}.lined"); do
head -"${j}" "${new}" | tail -1
done
rm "${tmp}.branch" "${tmp}.patch" "${tmp}.lined" 2>/dev/null
}
{code}
Is it possible to customize these two functions? Maybe just add a sort on the
output...
> False positive for error prone warnings in pre commit job
> ---------------------------------------------------------
>
> Key: HBASE-22100
> URL: https://issues.apache.org/jira/browse/HBASE-22100
> Project: HBase
> Issue Type: Bug
> Components: build
> Reporter: Duo Zhang
> Priority: Major
>
> https://builds.apache.org/job/PreCommit-HBASE-Build/16516/artifact/patchprocess/branch-compile-javac-hbase-client.txt
> {noformat}
> [WARNING]
> /testptch/hbase/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRpcRetryingCaller.java:[125,69]
> [UnusedVariable] The parameter 'updateCachedLocation' is never read.
> [WARNING]
> /testptch/hbase/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRpcRetryingCaller.java:[125,42]
> [UnusedVariable] The parameter 'error' is never read.
> {noformat}
> https://builds.apache.org/job/PreCommit-HBASE-Build/16516/artifact/patchprocess/patch-compile-javac-hbase-client.txt
> {noformat}
> [WARNING]
> /testptch/hbase/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRpcRetryingCaller.java:[125,42]
> [UnusedVariable] The parameter 'error' is never read.
> [WARNING]
> /testptch/hbase/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRpcRetryingCaller.java:[125,69]
> [UnusedVariable] The parameter 'updateCachedLocation' is never read.
> {noformat}
> And the output is 1 new and 1 fixed, the new one is
> {noformat}
> [WARNING]
> /testptch/hbase/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRpcRetryingCaller.java:[125,69]
> [UnusedVariable] The parameter 'updateCachedLocation' is never read.
> {noformat}
> I think here we should report nothing, as it is just an order change...
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)