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 8
8
9
9
"github.com/fatih/color"
10
10
"github.com/spf13/cobra"
11
+ "golang.org/x/text/cases"
12
+ "golang.org/x/text/language"
11
13
12
14
"github.com/golangci/golangci-lint/pkg/config"
13
15
"github.com/golangci/golangci-lint/pkg/lint/linter"
@@ -131,6 +133,11 @@ func printLinters(lcs []*linter.Config) {
131
133
linterDescription = linterDescription [:firstNewline ]
132
134
}
133
135
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
+
134
141
deprecatedMark := ""
135
142
if lc .IsDeprecated () {
136
143
deprecatedMark = " [" + color .RedString ("deprecated" ) + "]"
You can’t perform that action at this time.
0 commit comments