From 9496485a5abdf10dddfdb80b7caad920d42d7b3a Mon Sep 17 00:00:00 2001 From: Dominik Roos Date: Wed, 15 Jul 2020 11:24:13 +0200 Subject: [PATCH] nogo: enable checks again (#3834) Enable checks that were disabled due to misconfiguration --- go/lib/sigjson/BUILD.bazel | 8 +++++++- go/lib/sigjson/config.go | 1 - go/tools/udpproxy/udpproxy.go | 10 ++++++++-- nogo.json | 6 +++--- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/go/lib/sigjson/BUILD.bazel b/go/lib/sigjson/BUILD.bazel index cb677d9d43..9df717b5aa 100644 --- a/go/lib/sigjson/BUILD.bazel +++ b/go/lib/sigjson/BUILD.bazel @@ -14,10 +14,16 @@ go_library( ], ) +filegroup( + name = "testdata", + srcs = glob(["testdata/**"]), + visibility = ["//visibility:public"], +) + go_test( name = "go_default_test", srcs = ["config_test.go"], - data = glob(["testdata/**"]), + data = [":testdata"], embed = [":go_default_library"], deps = [ "//go/lib/addr:go_default_library", diff --git a/go/lib/sigjson/config.go b/go/lib/sigjson/config.go index ed5a30c8c1..75222dc8a3 100644 --- a/go/lib/sigjson/config.go +++ b/go/lib/sigjson/config.go @@ -14,7 +14,6 @@ // Package sigjson is responsible for parsing the SIG json config file into a // set of simple intermediate data-structures. - package sigjson import ( diff --git a/go/tools/udpproxy/udpproxy.go b/go/tools/udpproxy/udpproxy.go index aefc4cb6b1..e51d3ab69a 100644 --- a/go/tools/udpproxy/udpproxy.go +++ b/go/tools/udpproxy/udpproxy.go @@ -74,8 +74,14 @@ func Proxy(localX, remoteX, localY, remoteY string) error { ), ) - go redirect(xConn, yConn, ryAddr) - go redirect(yConn, xConn, rxAddr) + go func() { + defer log.HandlePanic() + redirect(xConn, yConn, ryAddr) + }() + go func() { + defer log.HandlePanic() + redirect(yConn, xConn, rxAddr) + }() select {} } diff --git a/nogo.json b/nogo.json index 0621195c37..e3a797497d 100644 --- a/nogo.json +++ b/nogo.json @@ -13,7 +13,7 @@ }, "nilness": { "only_files": { - "//go/": "https://github.com/bazelbuild/rules_go/issues/2172" + "/go/": "https://github.com/bazelbuild/rules_go/issues/2172" }, "exclude_files": { "gazelle/cmd/gazelle/diff.go": "", @@ -40,7 +40,7 @@ }, "unsafeptr": { "only_files": { - "//go/": "https://github.com/bazelbuild/rules_go/issues/2172" + "/go/": "https://github.com/bazelbuild/rules_go/issues/2172" }, "exclude_files": { "/com_github_mattn_go_sqlite3/": "", @@ -64,7 +64,7 @@ }, "gocall": { "only_files": { - "//go/": "https://github.com/bazelbuild/rules_go/issues/2172" + "/go/": "https://github.com/bazelbuild/rules_go/issues/2172" }, "exclude_files": { "(vendor|external)/*": "Only applies to internal files",