From cba35e1d5317a00f2e2281fbe0acf6c669f6cda7 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Tue, 19 Mar 2024 14:25:28 +0100 Subject: [PATCH] feat: improve 'no go files to analyze' message (#4536) --- pkg/lint/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/lint/context.go b/pkg/lint/context.go index 48faaa12d322..22c95e08af86 100644 --- a/pkg/lint/context.go +++ b/pkg/lint/context.go @@ -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{