dev: remove alternatives names from CLI help (#4641)
This commit is contained in:
parent
9522292271
commit
5f9277dbc9
@ -111,11 +111,6 @@ func printLinters(lcs []*linter.Config) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
for _, lc := range lcs {
|
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
|
// If the linter description spans multiple lines, truncate everything following the first newline
|
||||||
linterDescription := lc.Linter.Desc()
|
linterDescription := lc.Linter.Desc()
|
||||||
firstNewline := strings.IndexRune(linterDescription, '\n')
|
firstNewline := strings.IndexRune(linterDescription, '\n')
|
||||||
@ -128,7 +123,7 @@ func printLinters(lcs []*linter.Config) {
|
|||||||
deprecatedMark = " [" + color.RedString("deprecated") + "]"
|
deprecatedMark = " [" + color.RedString("deprecated") + "]"
|
||||||
}
|
}
|
||||||
|
|
||||||
_, _ = fmt.Fprintf(logutils.StdOut, "%s%s%s: %s [fast: %t, auto-fix: %t]\n",
|
_, _ = fmt.Fprintf(logutils.StdOut, "%s%s: %s [fast: %t, auto-fix: %t]\n",
|
||||||
color.YellowString(lc.Name()), altNamesStr, deprecatedMark, linterDescription, !lc.IsSlowLinter(), lc.CanAutoFix)
|
color.YellowString(lc.Name()), deprecatedMark, linterDescription, !lc.IsSlowLinter(), lc.CanAutoFix)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user