Skip to content

Commit

Permalink
cmd: do not print success with silent enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
akupila committed Sep 13, 2024
1 parent 902e846 commit eb4841a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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!")

Expand Down

0 comments on commit eb4841a

Please sign in to comment.