Skip to content

Commit 1f4dbc1

Browse files
committed
chore: apply new staticheck rules.
1 parent db7060a commit 1f4dbc1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pkg/golinters/depguard.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"github.com/OpenPeeDeeP/depguard"
99
"golang.org/x/tools/go/analysis"
10-
"golang.org/x/tools/go/loader"
10+
"golang.org/x/tools/go/loader" //nolint:staticcheck // require changes in github.com/OpenPeeDeeP/depguard
1111

1212
"github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
1313
"github.com/golangci/golangci-lint/pkg/lint/linter"

pkg/golinters/goanalysis/adapters.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"go/types"
55

66
"golang.org/x/tools/go/analysis"
7-
"golang.org/x/tools/go/loader"
7+
"golang.org/x/tools/go/loader" //nolint:staticcheck // it's an adapter for golang.org/x/tools/go/packages
88
)
99

1010
func MakeFakeLoaderProgram(pass *analysis.Pass) *loader.Program {

test/testdata/staticcheck.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func StaticcheckNolintMegacheck() {
2323
}
2424

2525
func StaticcheckDeprecated() {
26-
_ = runtime.CPUProfile() // ERROR "SA1019: runtime.CPUProfile is deprecated"
26+
_ = runtime.CPUProfile() // ERROR "SA1019: runtime.CPUProfile has been deprecated .*"
2727
}
2828

2929
func StaticcheckPrintf() {

0 commit comments

Comments
 (0)