From a3ee67d35879de2533bbd3451ee0383bb1a45d86 Mon Sep 17 00:00:00 2001 From: Danil Ovchinnikov Date: Sat, 6 Nov 2021 18:49:11 +0700 Subject: [PATCH 1/2] Show deprecated mark in linters list --- pkg/commands/help.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/commands/help.go b/pkg/commands/help.go index dc3bb47319ee..f882d7c83f17 100644 --- a/pkg/commands/help.go +++ b/pkg/commands/help.go @@ -53,6 +53,10 @@ func printLinterConfigs(lcs []*linter.Config) { linterDescription = linterDescription[:firstNewline] } + if lc.IsDeprecated() { + altNamesStr += " (deprecated)" + } + fmt.Fprintf(logutils.StdOut, "%s%s: %s [fast: %t, auto-fix: %t]\n", color.YellowString(lc.Name()), altNamesStr, linterDescription, !lc.IsSlowLinter(), lc.CanAutoFix) } From 03fb7d51025ae48f9d35f9a66922958bfa8e8863 Mon Sep 17 00:00:00 2001 From: Danil Ovchinnikov Date: Mon, 15 Nov 2021 00:44:33 +0700 Subject: [PATCH 2/2] fix output deprecated mark in linters list --- pkg/commands/help.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/commands/help.go b/pkg/commands/help.go index f882d7c83f17..78fd5b9dbc05 100644 --- a/pkg/commands/help.go +++ b/pkg/commands/help.go @@ -53,12 +53,13 @@ func printLinterConfigs(lcs []*linter.Config) { linterDescription = linterDescription[:firstNewline] } + deprecatedMark := "" if lc.IsDeprecated() { - altNamesStr += " (deprecated)" + deprecatedMark = " [" + color.RedString("deprecated") + "]" } - fmt.Fprintf(logutils.StdOut, "%s%s: %s [fast: %t, auto-fix: %t]\n", color.YellowString(lc.Name()), - altNamesStr, linterDescription, !lc.IsSlowLinter(), lc.CanAutoFix) + 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) } }