File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ require (
131
131
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0
132
132
golang.org/x/mod v0.22.0
133
133
golang.org/x/sys v0.28.0
134
+ golang.org/x/text v0.20.0
134
135
golang.org/x/tools v0.28.0
135
136
gopkg.in/yaml.v3 v3.0.1
136
137
honnef.co/go/tools v0.5.1
@@ -199,7 +200,6 @@ require (
199
200
go.uber.org/zap v1.24.0 // indirect
200
201
golang.org/x/exp/typeparams v0.0.0-20241108190413-2d47ceb2692f // indirect
201
202
golang.org/x/sync v0.10.0 // indirect
202
- golang.org/x/text v0.20.0 // indirect
203
203
google.golang.org/protobuf v1.34.2 // indirect
204
204
gopkg.in/ini.v1 v1.67.0 // indirect
205
205
gopkg.in/yaml.v2 v2.4.0 // indirect
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