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

gci: fix options display #2989

Merged
merged 1 commit into from Jul 18, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/golinters/gci.go
Expand Up @@ -141,7 +141,7 @@ func getErrorTextForGci(settings config.GciSettings) string {
text += " with"

if settings.SkipGenerated {
text += " -skip-generated"
text += " --skip-generated"
}

if len(settings.Sections) > 0 {
Expand Down
4 changes: 2 additions & 2 deletions test/testdata/gci.go
Expand Up @@ -5,9 +5,9 @@ package testdata
import (
"fmt"

"github.com/golangci/golangci-lint/pkg/config" // ERROR "File is not \\`gci\\`-ed with -skip-generated -s standard,prefix\\(github.com/golangci/golangci-lint\\),default"
"github.com/golangci/golangci-lint/pkg/config" // ERROR "File is not \\`gci\\`-ed with --skip-generated -s standard,prefix\\(github.com/golangci/golangci-lint\\),default"

"github.com/pkg/errors" // ERROR "File is not \\`gci\\`-ed with -skip-generated -s standard,prefix\\(github.com/golangci/golangci-lint\\),default"
"github.com/pkg/errors" // ERROR "File is not \\`gci\\`-ed with --skip-generated -s standard,prefix\\(github.com/golangci/golangci-lint\\),default"
)

func GoimportsLocalTest() {
Expand Down