Run go vet using nogo during build step
See https://github.com/bazelbuild/rules_go/blob/master/go/nogo.rst
These are correctness checks, not coding style linters, such that
compilation will fail if they do not pass.
They are also ran for external dependencies, with more or less
fine-grained exclusions.
Test Plan: Ran gazelle.sh and tests.
Bug: T472
X-Origin-Diff: phab/D269
GitOrigin-RevId: f932555ec8cbb9d0c09f2a3c6a0df94a0f6724a8
diff --git a/nogo_config.json b/nogo_config.json
new file mode 100644
index 0000000..5c9b28c
--- /dev/null
+++ b/nogo_config.json
@@ -0,0 +1,43 @@
+{
+ "composites": {
+ "exclude_files": {
+ "external/kubernetes/": "third_party",
+ "external/bazel_gazelle/language/go/": "third_party",
+ "external/com_github_golang_protobuf/": "third_party"
+ }
+ },
+ "copylocks": {
+ "exclude_files": {
+ "external/kubernetes/": "third_party"
+ }
+ },
+ "lostcancel": {
+ "exclude_files": {
+ "external/com_github_golang_protobuf/": "third_party",
+ "external/com_github_grpc_ecosystem_grpc_gateway/runtime/": "third_party",
+ "external/kubernetes/staging/src/k8s.io/legacy-cloud-providers/vsphere/": "third_party"
+ }
+ },
+ "unreachable": {
+ "exclude_files": {
+ "external/kubernetes/vendor/gopkg.in/gcfg.v1": "third_party",
+ "external/bazel_gazelle/pathtools": "third_party"
+ }
+ },
+ "assign": {
+ "exclude_files": {
+ "external/bazel_gazelle/walk": "third_party"
+ }
+ },
+ "unsafeptr": {
+ "exclude_files": {
+ "external/kubernetes/vendor/github.com/modern-go/reflect2/": "third_party",
+ "external/com_github_modern_go_reflect2/": "third_party"
+ }
+ },
+ "unusedresult": {
+ "exclude_files": {
+ "external/kubernetes/vendor/github.com/docker/spdystream": "third_party"
+ }
+ }
+}