Closed howardjohn closed 5 years ago
Nevermind I misunderstood includeGoRoot
Thanks for responding back with the solution. Just for interest of making it better, is there a better term/config I could use as an alias to help clarify what it does?
I somehow thought that this meant it would be running against the actual standard lib code (not sure why that would ever make sense :slightly_smiling_face:) rather than including the std lib as part of the imports. includeGoStdLib
maybe slightly more understandable (to me, at least), but probably not worth it.
I wonder if its possible to just fail if they provide something in the stdlib and have includeGoRoot
set to false?
I don't like the failing bit, but a warning message may be nice. I'll change this to a feature request then. And adding an alias for includeGoStdLib
to do what includeGoRoot
should not be too hard to do.
I want the following config:
To block users from importing testing packages into our main code, which bloats the flags we have in our binaries. However depguard seems to ignore these blacklists. If I put any builtins like
testing
orstrings
, depguard will not reject them, but other packages likegithub.com/davecgh/go-spew/spew
are accepted