Files
Michael PrattandgVisor bot 2e15a085fe nogo: plumb SDK version as language version
Rather than hard-coding the language version, plumb the version from the
rules_go GoSDK provider.

The end result is a no-op: we analyze everything with the GoVersion
matching the language version from go.mod. This is slightly different
from go vet / go build. For dependencies, those would use the language
version from their go.mod, which may be older.

Surprisingly, this seems to be how rules_go works for all builds: it
never passes -lang to the compiler, effectively building everything at
the language version of the toolchain.

The printf analyzer has a stricter check on uses of %q gated behind
language version 1.26:
https://cs.opensource.google/go/x/tools/+/master:go/analysis/passes/printf/printf.go;l=892;drc=a54c8a428f1496d97a2c4e795b4300e8985649e1.
Fix the new findings in gVisor and suppress them in dependencies.

PiperOrigin-RevId: 885633196
2026-03-18 09:21:28 -07:00

33 lines
687 B
Python

load("//tools:defs.bzl", "bzl_library", "go_binary", "select_goarch", "select_goos")
load("//tools/nogo:defs.bzl", "nogo_stdlib", "nogo_target")
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)
nogo_target(
name = "target",
goarch = select_goarch(),
goos = select_goos(),
visibility = ["//visibility:public"],
)
nogo_stdlib(
name = "stdlib",
visibility = ["//visibility:public"],
)
go_binary(
name = "nogo",
srcs = ["main.go"],
visibility = ["//visibility:public"],
deps = ["//tools/nogo/cli"],
)
bzl_library(
name = "defs_bzl",
srcs = ["defs.bzl"],
visibility = ["//visibility:private"],
)