Skip to content

Commit

Permalink
chore: apply new staticheck rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Feb 21, 2021
1 parent 29248ee commit ffa93a2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/golinters/depguard.go
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/golinters/goanalysis/adapters.go
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion test/testdata/staticcheck.go
Expand Up @@ -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() {
Expand Down

0 comments on commit ffa93a2

Please sign in to comment.