Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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