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 35f3eeb YETUS-1107. calcdiffs of cc raise false positive warnings.
(#227)
35f3eeb is described below
commit 35f3eebebcca9b2de5cb64476d288a5bf4dac4d5
Author: Masatake Iwasaki <[email protected]>
AuthorDate: Wed Oct 27 01:16:04 2021 +0900
YETUS-1107. calcdiffs of cc raise false positive warnings. (#227)
I'm +1 to merge. There are still bugs with cc_filter but I'll deal with
them in a separate JIRA. The asflicense errors are my fault and I'll fixed
those in another PR. Thanks!
---
precommit/src/main/shell/plugins.d/maven.sh | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/precommit/src/main/shell/plugins.d/maven.sh
b/precommit/src/main/shell/plugins.d/maven.sh
index c2d3ee1..5d4239a 100755
--- a/precommit/src/main/shell/plugins.d/maven.sh
+++ b/precommit/src/main/shell/plugins.d/maven.sh
@@ -834,3 +834,23 @@ function maven_reorder_modules
# shellcheck disable=SC2046
echo "Elapsed: $(clock_display $(stop_clock))"
}
+
+## @description process cc output from maven
+## @audience private
+## @stability evolving
+function maven_cc_logfilter
+{
+ declare input=$1
+ declare output=$2
+
+ # [WARNING] fullpath:linenum:column: message
+
+ "${GREP}" -i -E "^.*\.${CC_EXT_RE}\:[[:digit:]]*\:" "${input}" \
+ | "${SED}" -E -e 's,\[(ERROR|WARNING)\] ,,g' \
+ | "${GREP}" -i -E "^/" \
+ | "${SED}" -e "s,^${BASEDIR}/,," \
+ | sort \
+ > "${output}"
+
+ # shortpath:linenum:column: message
+}