From b4af0d4b64aeecefcff6c54fbe96e1ba9269bce7 Mon Sep 17 00:00:00 2001 From: Emil Rowland Date: Fri, 18 Apr 2025 00:57:01 +0200 Subject: [PATCH] docs: added note about x/tools when using vet with nogo If golang.org/x/tools is not in the go.mod file, then you get import errors on the standard library when using nogo. --- go/nogo.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/go/nogo.rst b/go/nogo.rst index e150afc3b7..49b5ae68b5 100644 --- a/go/nogo.rst +++ b/go/nogo.rst @@ -355,6 +355,8 @@ Setting ``vet = True`` is equivalent to adding the ``atomic``, ``bools``, ``@org_golang_x_tools//go/analysis/passes`` to the ``deps`` list of your ``nogo`` rule. +**NOTE**: When using vet you must ensure that the package ``golang.org/x/tools`` is in the go.mod file. + See the full list of available nogo checks: