Skip to content

Commit

Permalink
Show deprecated mark in the CLI linters help (#2350)
Browse files Browse the repository at this point in the history
* Show deprecated mark in linters list

* fix output deprecated mark in linters list
  • Loading branch information
Danil42Russia committed Nov 14, 2021
1 parent e788757 commit ec58c48
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/commands/help.go
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit ec58c48

Please sign in to comment.