You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 9, 2020. It is now read-only.
We should add a question to the FAQ to clarify how to add cli tools like staticcheck (from honnef.co/go/tools) ... etc.
If someone attempts to add honnef.co/go/tools to their required packages they will get the following error:
master: Could not introduce honnef.co/go/tools@master, as its subpackage honnef.co/go/tools does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
since dep expect the required package to contain some Go code.
The solution is to require a package that contains the actual code (e.g. honnef.co/go/tools/cmd/staticcheck or honnef.co/go/tools/cmd/megacheck).
Note: we should clearly state that all tools should be added to required, as prune might remove packages that are not required.
AFAIK, required is combined with the imported packages and the whole projects are downloaded. So if you say honnef.co/go/tools/cmd/staticcheck, it would download the whole source of honnef.co/go/tools/, which comes with honnef.co/go/tools/cmd/megacheck and all other packages. And then you can build those tools individually, the usual way.
Uh oh!
There was an error while loading. Please reload this page.
We should add a question to the FAQ to clarify how to add cli tools like
staticcheck
(fromhonnef.co/go/tools
) ... etc.If someone attempts to add
honnef.co/go/tools
to theirrequired
packages they will get the following error:since dep expect the required package to contain some Go code.
The solution is to require a package that contains the actual code (e.g.
honnef.co/go/tools/cmd/staticcheck
orhonnef.co/go/tools/cmd/megacheck
).Note: we should clearly state that all tools should be added to
required
, as prune might remove packages that are not required.See #1263.
The text was updated successfully, but these errors were encountered: