Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: clarifies and homogenizes formatter descriptions #5265

Merged
merged 1 commit into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/golinters/gci/internal/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func NewAnalyzer() *analysis.Analyzer {

a := &analysis.Analyzer{
Name: "gci",
Doc: "A tool that control Go package import order and make it always deterministic.",
Doc: "Checks if code and import statements are formatted, it makes import statements always deterministic.",
Run: runAnalysis,
Requires: []*analysis.Analyzer{inspect.Analyzer},
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/golinters/gofmt/gofmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ func New(settings *config.GoFmtSettings) *goanalysis.Linter {

return goanalysis.NewLinter(
linterName,
"Gofmt checks whether code was gofmt-ed. By default "+
"this tool runs with -s option to check for code simplification",
"Checks if the code is formatted according to 'gofmt' command.",
[]*analysis.Analyzer{analyzer},
nil,
).WithContextSetter(func(lintCtx *linter.Context) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/golinters/gofumpt/gofumpt.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func New(settings *config.GofumptSettings) *goanalysis.Linter {

return goanalysis.NewLinter(
linterName,
"Gofumpt checks whether code was gofumpt-ed.",
"Checks if code and import statements are formatted, with additional rules.",
[]*analysis.Analyzer{analyzer},
nil,
).WithContextSetter(func(lintCtx *linter.Context) {
Expand Down
5 changes: 2 additions & 3 deletions pkg/golinters/goimports/goimports.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ func New(settings *config.GoImportsSettings) *goanalysis.Linter {

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

err = internal.ExtractDiagnosticFromPatch(pass, file, string(diff), lintCtx)
if err != nil {
return fmt.Errorf("can't extract issues from gofmt diff output %q: %w", string(diff), err)
return fmt.Errorf("can't extract issues from goimports diff output %q: %w", string(diff), err)
}
}

Expand Down
Loading