Please sign in to comment.
default to -tests=false
First, this makes the tool way faster, as most developers write tests within the same package. This greatly slows down package loading, as we must load each package twice. If golang/go#29258 is ever accepted and implemented, that cost might be reduced. Second, most warnings within test files are not very useful. Even if most aren't false positives, it's common for developers to not care as much about test code quality. Finally, loading the tests can lead to different results, as test files can also use the functions which may or may not give warnings. More often than not, the developer cares about how non-test functions are used from within non-test code. For all these reasons, disable test loading by default. It can still be enabled manually.
- Loading branch information...
Showing with 6 additions and 6 deletions.