diff --git a/pkg/commands/help.go b/pkg/commands/help.go index 16fef33e..ef276481 100644 --- a/pkg/commands/help.go +++ b/pkg/commands/help.go @@ -45,8 +45,16 @@ func printLinterConfigs(lcs []*linter.Config) { if len(lc.AlternativeNames) != 0 { altNamesStr = fmt.Sprintf(" (%s)", strings.Join(lc.AlternativeNames, ", ")) } + + // If the linter description spans multiple lines, truncate everything following the first newline + linterDescription := lc.Linter.Desc() + firstNewline := strings.IndexRune(linterDescription, '\n') + if firstNewline > 0 { + linterDescription = linterDescription[:firstNewline] + } + fmt.Fprintf(logutils.StdOut, "%s%s: %s [fast: %t, auto-fix: %t]\n", color.YellowString(lc.Name()), - altNamesStr, lc.Linter.Desc(), !lc.IsSlowLinter(), lc.CanAutoFix) + altNamesStr, linterDescription, !lc.IsSlowLinter(), lc.CanAutoFix) } }