mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-28 22:28:43 -04:00
Show deprecated mark in the CLI linters help (#2350)
* Show deprecated mark in linters list * fix output deprecated mark in linters list
This commit is contained in:
parent
e788757b32
commit
ec58c48180
1 changed files with 7 additions and 2 deletions
|
@ -53,8 +53,13 @@ func printLinterConfigs(lcs []*linter.Config) {
|
|||
linterDescription = linterDescription[:firstNewline]
|
||||
}
|
||||
|
||||
fmt.Fprintf(logutils.StdOut, "%s%s: %s [fast: %t, auto-fix: %t]\n", color.YellowString(lc.Name()),
|
||||
altNamesStr, linterDescription, !lc.IsSlowLinter(), lc.CanAutoFix)
|
||||
deprecatedMark := ""
|
||||
if lc.IsDeprecated() {
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue