Skip to content

Commit 0b58eb6

Browse files
sebastien-rossetSeigeC
authored andcommitted
doc: improve documentation for goimport local-prefixes (golangci#3349)
1 parent 121dea7 commit 0b58eb6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.golangci.reference.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -654,8 +654,8 @@ linters-settings:
654654
template-path: /path/to/my/template.tmpl
655655

656656
goimports:
657-
# Put imports beginning with prefix after 3rd-party packages.
658-
# It's a comma-separated list of prefixes.
657+
# A comma-separated list of prefixes, which, if set, checks import paths
658+
# with the given prefixes are grouped after 3rd-party packages.
659659
# Default: ""
660660
local-prefixes: github.com/org/project
661661

pkg/golinters/goimports.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ func NewGoimports(settings *config.GoImportsSettings) *goanalysis.Linter {
2727

2828
return goanalysis.NewLinter(
2929
goimportsName,
30-
"In addition to fixing imports, goimports also formats your code in the same style as gofmt.",
30+
"Check import statements are formatted according to the 'goimport' command. "+
31+
"Reformat imports in autofix mode.",
3132
[]*analysis.Analyzer{analyzer},
3233
nil,
3334
).WithContextSetter(func(lintCtx *linter.Context) {

0 commit comments

Comments
 (0)