From 53619ac63e1369f889250e836136a9d28c646d8a Mon Sep 17 00:00:00 2001 From: Mario Rodriguez Molins Date: Mon, 25 Sep 2023 20:35:28 +0200 Subject: [PATCH] Return nil if there are no validation errors --- cmd/lint.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/lint.go b/cmd/lint.go index e38f5bb5a..f1e2a6867 100644 --- a/cmd/lint.go +++ b/cmd/lint.go @@ -69,5 +69,8 @@ func validateSourceCommandAction(cmd *cobra.Command, args []string) error { return fmt.Errorf("locating package root failed: %w", err) } err = validation.ValidateAndFilterFromPath(packageRootPath) - return fmt.Errorf("linting package failed: %w", err) + if err != nil { + return fmt.Errorf("linting package failed: %w", err) + } + return nil }