dev: remove alternatives names from CLI help (#4641)

This commit is contained in:
Ludovic Fernandez 2024-04-14 14:38:02 +02:00 committed by GitHub
parent 9522292271
commit 5f9277dbc9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -111,11 +111,6 @@ func printLinters(lcs []*linter.Config) {
})
for _, lc := range lcs {
altNamesStr := ""
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')
@ -128,7 +123,7 @@ func printLinters(lcs []*linter.Config) {
deprecatedMark = " [" + color.RedString("deprecated") + "]"
}
_, _ = fmt.Fprintf(logutils.StdOut, "%s%s%s: %s [fast: %t, auto-fix: %t]\n",
color.YellowString(lc.Name()), altNamesStr, deprecatedMark, linterDescription, !lc.IsSlowLinter(), lc.CanAutoFix)
_, _ = fmt.Fprintf(logutils.StdOut, "%s%s: %s [fast: %t, auto-fix: %t]\n",
color.YellowString(lc.Name()), deprecatedMark, linterDescription, !lc.IsSlowLinter(), lc.CanAutoFix)
}
}