diff --git a/.golangci.reference.yml b/.golangci.reference.yml index a6d6e2348720..efdcf4b76cf1 100644 --- a/.golangci.reference.yml +++ b/.golangci.reference.yml @@ -75,7 +75,7 @@ run: # output configuration options output: - # Format: colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions + # Format: colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions|teamcity # # Multiple can be specified by separating them by comma, output can be provided # for each of them by separating format name and path by colon symbol. diff --git a/test/testdata/configs/importas.yml b/test/testdata/configs/importas.yml index b76192f668e7..b06608500f7a 100644 --- a/test/testdata/configs/importas.yml +++ b/test/testdata/configs/importas.yml @@ -5,5 +5,5 @@ linters-settings: alias: fff - pkg: os alias: std_os - - pkg: github.com/pkg/errors - alias: pkgerr + - pkg: golang.org/x/tools/go/analysis + alias: ananas diff --git a/test/testdata/configs/importas_strict.yml b/test/testdata/configs/importas_strict.yml index 589f2c40d0fc..0f780f265787 100644 --- a/test/testdata/configs/importas_strict.yml +++ b/test/testdata/configs/importas_strict.yml @@ -6,5 +6,5 @@ linters-settings: alias: fff - pkg: os alias: std_os - - pkg: github.com/pkg/errors - alias: pkgerr + - pkg: golang.org/x/tools/go/analysis + alias: ananas diff --git a/test/testdata/fix/in/gci.go b/test/testdata/fix/in/gci.go index 2449e8bfb86d..4463b6cadb0b 100644 --- a/test/testdata/fix/in/gci.go +++ b/test/testdata/fix/in/gci.go @@ -5,12 +5,12 @@ package gci import ( "github.com/golangci/golangci-lint/pkg/config" - "github.com/pkg/errors" + "golang.org/x/tools/go/analysis" "fmt" ) func GoimportsLocalTest() { fmt.Print("x") _ = config.Config{} - _ = errors.New("") + _ = analysis.Analyzer{} } diff --git a/test/testdata/fix/out/gci.go b/test/testdata/fix/out/gci.go index 489adb5235fb..8e36e66b53ef 100644 --- a/test/testdata/fix/out/gci.go +++ b/test/testdata/fix/out/gci.go @@ -6,7 +6,7 @@ package gci import ( "fmt" - "github.com/pkg/errors" + "golang.org/x/tools/go/analysis" "github.com/golangci/golangci-lint/pkg/config" ) @@ -14,5 +14,5 @@ import ( func GoimportsLocalTest() { fmt.Print("x") _ = config.Config{} - _ = errors.New("") + _ = analysis.Analyzer{} } diff --git a/test/testdata/gci.go b/test/testdata/gci.go index ef2e1954ca44..db2e33103256 100644 --- a/test/testdata/gci.go +++ b/test/testdata/gci.go @@ -7,11 +7,11 @@ import ( "github.com/golangci/golangci-lint/pkg/config" // want "File is not \\`gci\\`-ed with --skip-generated -s standard,prefix\\(github.com/golangci/golangci-lint\\),default" - "github.com/pkg/errors" // want "File is not \\`gci\\`-ed with --skip-generated -s standard,prefix\\(github.com/golangci/golangci-lint\\),default" + "golang.org/x/tools/go/analysis" // want "File is not \\`gci\\`-ed with --skip-generated -s standard,prefix\\(github.com/golangci/golangci-lint\\),default" ) func GoimportsLocalTest() { fmt.Print("x") _ = config.Config{} - _ = errors.New("") + _ = analysis.Analyzer{} } diff --git a/test/testdata/goimports_local.go b/test/testdata/goimports_local.go index 8d9bd41b1f56..b89b4ded6045 100644 --- a/test/testdata/goimports_local.go +++ b/test/testdata/goimports_local.go @@ -6,11 +6,11 @@ import ( "fmt" "github.com/golangci/golangci-lint/pkg/config" // want "File is not `goimports`-ed with -local github.com/golangci/golangci-lint" - "github.com/pkg/errors" + "golang.org/x/tools/go/analysis" ) func GoimportsLocalPrefixTest() { fmt.Print("x") _ = config.Config{} - _ = errors.New("") + _ = analysis.Analyzer{} } diff --git a/test/testdata/importas.go b/test/testdata/importas.go index 20dfe1bcefb9..18a43c5e5bec 100644 --- a/test/testdata/importas.go +++ b/test/testdata/importas.go @@ -7,12 +7,12 @@ import ( "os" wrong_alias_again "os" // want `import "os" imported as "wrong_alias_again" but must be "std_os" according to config` - wrong "github.com/pkg/errors" // want `import "github.com/pkg/errors" imported as "wrong" but must be "pkgerr" according to config` + wrong "golang.org/x/tools/go/analysis" // want `import "golang.org/x/tools/go/analysis" imported as "wrong" but must be "ananas" according to config` ) func ImportAsWrongAlias() { wrong_alias.Println("foo") wrong_alias_again.Stdout.WriteString("bar") os.Stdout.WriteString("test") - _ = wrong.New("baz") + _ = wrong.Analyzer{} } diff --git a/test/testdata/importas_strict.go b/test/testdata/importas_strict.go index b381837c2743..76f7fefe5c9c 100644 --- a/test/testdata/importas_strict.go +++ b/test/testdata/importas_strict.go @@ -7,12 +7,12 @@ import ( "os" // want `import "os" imported without alias but must be with alias "std_os" according to config` wrong_alias_again "os" // want `import "os" imported as "wrong_alias_again" but must be "std_os" according to config` - wrong "github.com/pkg/errors" // want `import "github.com/pkg/errors" imported as "wrong" but must be "pkgerr" according to config` + wrong "golang.org/x/tools/go/analysis" // want `import "golang.org/x/tools/go/analysis" imported as "wrong" but must be "ananas" according to config` ) func ImportAsStrictWrongAlias() { wrong_alias.Println("foo") wrong_alias_again.Stdout.WriteString("bar") os.Stdout.WriteString("test") - _ = wrong.New("baz") + _ = wrong.Analyzer{} }