Fix staticcheck panic on packages that do not compile

The bug was introduced in golangci-lint when migrating staticcheck to go/packages.
Also, thanks to pkg.IllTyped we can analyze as max as we can by
staticcheck.

Relates: , , , 
This commit is contained in:
Denis Isaev 2019-04-21 10:33:39 +03:00 committed by Isaev Denis
parent 09677d574e
commit 39f46be460
4 changed files with 17 additions and 79 deletions

View file

@ -32,7 +32,7 @@ func TestEmptyDirRun(t *testing.T) {
func TestNotExistingDirRun(t *testing.T) {
testshared.NewLintRunner(t).Run(getTestDataDir("no_such_dir")).
ExpectExitCode(exitcodes.WarningInTest).
ExpectExitCode(exitcodes.Failure).
ExpectOutputContains(`cannot find package \"./testdata/no_such_dir\"`)
}