From eb4841abc4f1a378d36c47e18d6c18307b6bdf9a Mon Sep 17 00:00:00 2001 From: Antti Kupila Date: Fri, 13 Sep 2024 09:07:29 +0300 Subject: [PATCH] cmd: do not print success with silent enabled --- cmd/lint.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/lint.go b/cmd/lint.go index bf4c0594..0edf7761 100644 --- a/cmd/lint.go +++ b/cmd/lint.go @@ -255,7 +255,7 @@ func GetLintCommand() *cobra.Command { completed++ } - if !detailsFlag { + if !detailsFlag && !silent { pterm.Println() pterm.Info.Println("To see full details of linting report, use the '-d' flag.") pterm.Println() @@ -617,6 +617,10 @@ func RenderSummary(rs *model.RuleResultSet, silent bool, totalFiles, fileIndex i return } + if silent { + return + } + pterm.DefaultHeader.WithBackgroundStyle(pterm.NewStyle(pterm.BgGreen)).WithMargin(10).Println( "Linting passed, A perfect score! well done!")