You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@yetus.apache.org by aw...@apache.org on 2020/10/15 13:41:02 UTC
[yetus] branch main updated: YETUS-1025. bufcompat doesn't get
linecomments (#159)
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 62404a1 YETUS-1025. bufcompat doesn't get linecomments (#159)
62404a1 is described below
commit 62404a17167c606ea4845bbd2a6f486170876baa
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Thu Oct 15 06:38:51 2020 -0700
YETUS-1025. bufcompat doesn't get linecomments (#159)
---
.../in-progress/precommit/plugins/buf.html.md | 4 ++--
precommit/src/main/shell/test-patch.d/buf.sh | 14 +++-----------
2 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/asf-site-src/source/documentation/in-progress/precommit/plugins/buf.html.md b/asf-site-src/source/documentation/in-progress/precommit/plugins/buf.html.md
index 42d8717..2ce55fd 100644
--- a/asf-site-src/source/documentation/in-progress/precommit/plugins/buf.html.md
+++ b/asf-site-src/source/documentation/in-progress/precommit/plugins/buf.html.md
@@ -29,8 +29,8 @@ Test
# Description
-[buf](https://github.com/bufbuild/buf) is a protobuf linter (`buflint`) and backward compatibility checker (`bufcheck`).
-In order to use either `buflint` or `bufcheck`, `buf` must also be enabled.
+[buf](https://github.com/bufbuild/buf) is a protobuf linter (`buflint`) and backward compatibility checker (`bufcompat`).
+In order to use either `buflint` or `bufcompat`, `buf` must also be enabled.
# Environment Variables
diff --git a/precommit/src/main/shell/test-patch.d/buf.sh b/precommit/src/main/shell/test-patch.d/buf.sh
index 37960d9..b3b2aa9 100755
--- a/precommit/src/main/shell/test-patch.d/buf.sh
+++ b/precommit/src/main/shell/test-patch.d/buf.sh
@@ -189,10 +189,12 @@ function bufcompat_postapply
if [[ -s "${PATCH_DIR}/${repostatus}-bufcompat-result.txt" ]]; then
# shellcheck disable=SC2016
- incompatcount=$(wc -l "${PATCH_DIR}/${repostatus}-bufcompat-result.txt" | "${AWK}" '{print $1}')
+ incompatcount=$(wc -l "${PATCH_DIR}/${repostatus}-bufcompat-result.txt")
+ incompatcount=${incompatcount%% *}
add_vote_table_v2 -1 bufcompat \
"@@BASE@@/${repostatus}-bufcompat-result.txt" \
"${incompatcount} Incompatible protobuf changes"
+ bugsystem_linecomments_queue bufcompat "${PATCH_DIR}/${repostatus}-bufcompat-result.txt"
return 1
fi
return 0
@@ -301,22 +303,12 @@ function buflint_postapply
return 0
fi
- if [[ -s "${PATCH_DIR}/${repostatus}-buflint-result.txt" ]]; then
- add_vote_table_v2 -1 buflint \
- "@@BASE@@/${repostatus}-buflint-result.txt" \
- "Incompatible protobuf changes"
- fi
-
# shellcheck disable=SC2016
BUF_VERSION=$("${BUF}" version 2>/dev/null | "${GREP}" Version | "${AWK}" '{print $NF}')
add_version_data buf "${BUF_VERSION}"
buflint_executor patch
- calcdiffs "${PATCH_DIR}/branch-buflint-result.txt" \
- "${PATCH_DIR}/patch-buflint-result.txt" \
- buf > "${PATCH_DIR}/diff-patch-buflint.txt"
-
root_postlog_compare \
buflint \
"${PATCH_DIR}/branch-buflint-result.txt" \