File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 88
99 "github.com/fatih/color"
1010 "github.com/spf13/cobra"
11+ "golang.org/x/text/cases"
12+ "golang.org/x/text/language"
1113
1214 "github.com/golangci/golangci-lint/pkg/config"
1315 "github.com/golangci/golangci-lint/pkg/lint/linter"
@@ -131,6 +133,11 @@ func printLinters(lcs []*linter.Config) {
131133 linterDescription = linterDescription [:firstNewline ]
132134 }
133135
136+ // Capitalize the first word of the linter description
137+ if firstWord , remaining , ok := strings .Cut (linterDescription , " " ); ok {
138+ linterDescription = cases .Title (language .Und , cases .NoLower ).String (firstWord ) + " " + remaining
139+ }
140+
134141 deprecatedMark := ""
135142 if lc .IsDeprecated () {
136143 deprecatedMark = " [" + color .RedString ("deprecated" ) + "]"
You can’t perform that action at this time.
0 commit comments