summaryrefslogtreecommitdiffhomepage
path: root/BUILD
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2019-07-09 16:42:54 -0700
committergVisor bot <gvisor-bot@google.com>2019-07-09 16:44:06 -0700
commitdea3cb92f2c9fffb604cedde6998b3209c91e716 (patch)
tree41f1ac37d1f8b80861cfb63da9bbaca6c6a1c9da /BUILD
parentcceef9d2cfbf72a7ae4feac2e53e46179c33155d (diff)
build: add nogo for static validation
PiperOrigin-RevId: 257297820
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD14
1 files changed, 13 insertions, 1 deletions
diff --git a/BUILD b/BUILD
index 6d5e800ca..60ed992c4 100644
--- a/BUILD
+++ b/BUILD
@@ -1,6 +1,6 @@
package(licenses = ["notice"]) # Apache 2.0
-load("@io_bazel_rules_go//go:def.bzl", "go_path")
+load("@io_bazel_rules_go//go:def.bzl", "go_path", "nogo")
load("@bazel_gazelle//:def.bzl", "gazelle")
# The sandbox filegroup is used for sandbox-internal dependencies.
@@ -29,3 +29,15 @@ go_path(
# To update the WORKSPACE from go.mod, use:
# bazel run //:gazelle -- update-repos -from_file=go.mod
gazelle(name = "gazelle")
+
+# nogo applies checks to all Go source in this repository, enforcing code
+# guidelines and restrictions. Note that the tool libraries themselves should
+# live in the tools subdirectory (unless they are standard).
+nogo(
+ name = "nogo",
+ config = "tools/nogo.js",
+ visibility = ["//visibility:public"],
+ deps = [
+ "//tools/checkunsafe",
+ ],
+)