From 1f4dbc161a58f8cb73af5d69b59bcf3ae1f97923 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Thu, 31 Dec 2020 16:16:43 +0100 Subject: [PATCH] chore: apply new staticheck rules. --- pkg/golinters/depguard.go | 2 +- pkg/golinters/goanalysis/adapters.go | 2 +- test/testdata/staticcheck.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/golinters/depguard.go b/pkg/golinters/depguard.go index 3bd854811009..aa372e9568c0 100644 --- a/pkg/golinters/depguard.go +++ b/pkg/golinters/depguard.go @@ -7,7 +7,7 @@ import ( "github.com/OpenPeeDeeP/depguard" "golang.org/x/tools/go/analysis" - "golang.org/x/tools/go/loader" + "golang.org/x/tools/go/loader" //nolint:staticcheck // require changes in github.com/OpenPeeDeeP/depguard "github.com/golangci/golangci-lint/pkg/golinters/goanalysis" "github.com/golangci/golangci-lint/pkg/lint/linter" diff --git a/pkg/golinters/goanalysis/adapters.go b/pkg/golinters/goanalysis/adapters.go index 830c4d8822da..b702d1660bac 100644 --- a/pkg/golinters/goanalysis/adapters.go +++ b/pkg/golinters/goanalysis/adapters.go @@ -4,7 +4,7 @@ import ( "go/types" "golang.org/x/tools/go/analysis" - "golang.org/x/tools/go/loader" + "golang.org/x/tools/go/loader" //nolint:staticcheck // it's an adapter for golang.org/x/tools/go/packages ) func MakeFakeLoaderProgram(pass *analysis.Pass) *loader.Program { diff --git a/test/testdata/staticcheck.go b/test/testdata/staticcheck.go index 5ab2d78cba4c..d20f26efdb8c 100644 --- a/test/testdata/staticcheck.go +++ b/test/testdata/staticcheck.go @@ -23,7 +23,7 @@ func StaticcheckNolintMegacheck() { } func StaticcheckDeprecated() { - _ = runtime.CPUProfile() // ERROR "SA1019: runtime.CPUProfile is deprecated" + _ = runtime.CPUProfile() // ERROR "SA1019: runtime.CPUProfile has been deprecated .*" } func StaticcheckPrintf() {