feat: improve 'no go files to analyze' message (#4536)

This commit is contained in:
Ludovic Fernandez 2024-03-19 14:25:28 +01:00 committed by GitHub
parent 69144471ca
commit cba35e1d53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,7 +43,7 @@ func (cl *ContextBuilder) Build(ctx context.Context, log logutils.Log, linters [
}
if len(deduplicatedPkgs) == 0 {
return nil, exitcodes.ErrNoGoFiles
return nil, fmt.Errorf("%w: running `go mod tidy` may solve the problem", exitcodes.ErrNoGoFiles)
}
ret := &linter.Context{