From 03647826f45010a1dd55e5f9814475e02ef10e21 Mon Sep 17 00:00:00 2001 From: Elizabeth Myers Date: Tue, 24 Oct 2023 17:18:57 -0700 Subject: [PATCH] Improve linter diagnostic output Signed-off-by: Elizabeth Myers --- pkg/cli/lint.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cli/lint.go b/pkg/cli/lint.go index 2516abcc1..a8203b9b3 100644 --- a/pkg/cli/lint.go +++ b/pkg/cli/lint.go @@ -107,9 +107,9 @@ func (o LintOpts) run(ctx context.Context, pkg string) error { innerErr = err }, o.linters) if err != nil { - return fmt.Errorf("package linter error: %w", err) + return fmt.Errorf("package linter error in %s: %w\n", pkg, err) } else if innerErr != nil { - fmt.Printf("package linter warning: %v", innerErr) + fmt.Printf("package linter warning in %s: %v\n", pkg, innerErr) } return nil }