You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2022/12/27 11:46:24 UTC

[beam] 01/01: Make go vet and go staticcheck output visible in CI

This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a commit to branch users/damccorm/vetstaticcheck
in repository https://gitbox.apache.org/repos/asf/beam.git

commit e6030b517d1c6a4ce1463629276670f055e64795
Author: Danny McCormick <da...@google.com>
AuthorDate: Tue Dec 27 06:46:16 2022 -0500

    Make go vet and go staticcheck output visible in CI
---
 .github/workflows/go_tests.yml | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/go_tests.yml b/.github/workflows/go_tests.yml
index 6a5ab4450b1..4521c274e58 100644
--- a/.github/workflows/go_tests.yml
+++ b/.github/workflows/go_tests.yml
@@ -59,19 +59,9 @@ jobs:
       - name: Run vet
         run: | 
           cd sdks/go/pkg/beam 
-          VOUT=$(go vet --copylocks=false --unsafeptr=false ./...)
-          if [ -n "$VOUT" ]; then 
-            echo -e "Run go vet and fix warnings before checking in changes\n"
-            echo -e "Vet Warnings:\n"
-            echo -e "$VOUT" && exit 1
-          fi
+          go vet --copylocks=false --unsafeptr=false ./...
       - name: Run Staticcheck
         run: |
           go install "honnef.co/go/tools/cmd/staticcheck@2022.1"
           cd sdks/go/pkg/beam
-          RESULTS=$($(go env GOPATH)/bin/staticcheck ./...)
-          if [ -n "$RESULTS" ]; then 
-            echo -e "Please address Staticcheck warnings before checking in changes\n"
-            echo -e "Staticcheck Warnings:\n"
-            echo -e "$RESULTS" && exit 1
-          fi
+          $(go env GOPATH)/bin/staticcheck ./...