-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Description
Using package flag's global flagset is convenient, but shouldn't happen in packages like singlechecker and unitchecker which may be used in many different ways.
In particular, lots of packages like to abuse the same global flagset, such as testing and net/http/pprof, among many others outside the standard library.
Granted that a linter should generally not import those packages to begin with. But sometimes you just can't control your dependencies. And there's the case which I hit - I'm running my tool as part of a test, so testing is in the build import graph. So one of my tests is failing as the testing flags are getting mixed into the usage output.
I presume we could have unitchecker export a global flagset, and singlechecker could use it too.