Skip to content

Commit

Permalink
dev: remove alternatives names from CLI help (#4641)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored Apr 14, 2024
1 parent 9522292 commit 5f9277d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pkg/commands/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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)
}
}

0 comments on commit 5f9277d

Please sign in to comment.