Skip to content

Commit 2a06dcb

Browse files
authored
dev: clarifies and homogenizes formatter descriptions (#5265)
1 parent 30f4265 commit 2a06dcb

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

pkg/golinters/gci/internal/analyzer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func NewAnalyzer() *analysis.Analyzer {
4444

4545
a := &analysis.Analyzer{
4646
Name: "gci",
47-
Doc: "A tool that control Go package import order and make it always deterministic.",
47+
Doc: "Checks if code and import statements are formatted, it makes import statements always deterministic.",
4848
Run: runAnalysis,
4949
Requires: []*analysis.Analyzer{inspect.Analyzer},
5050
}

pkg/golinters/gofmt/gofmt.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ func New(settings *config.GoFmtSettings) *goanalysis.Linter {
2323

2424
return goanalysis.NewLinter(
2525
linterName,
26-
"Gofmt checks whether code was gofmt-ed. By default "+
27-
"this tool runs with -s option to check for code simplification",
26+
"Checks if the code is formatted according to 'gofmt' command.",
2827
[]*analysis.Analyzer{analyzer},
2928
nil,
3029
).WithContextSetter(func(lintCtx *linter.Context) {

pkg/golinters/gofumpt/gofumpt.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func New(settings *config.GofumptSettings) *goanalysis.Linter {
4444

4545
return goanalysis.NewLinter(
4646
linterName,
47-
"Gofumpt checks whether code was gofumpt-ed.",
47+
"Checks if code and import statements are formatted, with additional rules.",
4848
[]*analysis.Analyzer{analyzer},
4949
nil,
5050
).WithContextSetter(func(lintCtx *linter.Context) {

pkg/golinters/goimports/goimports.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ func New(settings *config.GoImportsSettings) *goanalysis.Linter {
2424

2525
return goanalysis.NewLinter(
2626
linterName,
27-
"Check import statements are formatted according to the 'goimport' command. "+
28-
"Reformat imports in autofix mode.",
27+
"Checks if the code and import statements are formatted according to the 'goimports' command.",
2928
[]*analysis.Analyzer{analyzer},
3029
nil,
3130
).WithContextSetter(func(lintCtx *linter.Context) {
@@ -56,7 +55,7 @@ func runGoImports(lintCtx *linter.Context, pass *analysis.Pass) error {
5655

5756
err = internal.ExtractDiagnosticFromPatch(pass, file, string(diff), lintCtx)
5857
if err != nil {
59-
return fmt.Errorf("can't extract issues from gofmt diff output %q: %w", string(diff), err)
58+
return fmt.Errorf("can't extract issues from goimports diff output %q: %w", string(diff), err)
6059
}
6160
}
6261

0 commit comments

Comments
 (0)