Skip to content

Commit 868574a

Browse files
committed
add exclude-rules to be compatible with the previous golanci-lint version.
1 parent de3f2b5 commit 868574a

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.golangci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,18 @@ issues:
139139
- path: pkg/golinters/scopelint.go
140140
text: 'directive `//nolint:interfacer` is unused for linter interfacer'
141141

142+
# TODO temporary rule, must be removed
143+
# related to https://github.com/golangci/golangci-lint/pull/1756
144+
# must be replaced by '//nolint:staticcheck // require changes in github.com/OpenPeeDeeP/depguard'
145+
- path: pkg/golinters/depguard.go
146+
text: 'SA1019: package golang.org/x/tools/go/loader is deprecated'
147+
148+
# TODO temporary rule, must be removed
149+
# related to https://github.com/golangci/golangci-lint/pull/1756
150+
# must be replaced by '///nolint:staticcheck // it's an adapter for golang.org/x/tools/go/packages'
151+
- path: pkg/golinters/goanalysis/adapters.go
152+
text: 'SA1019: package golang.org/x/tools/go/loader is deprecated'
153+
142154
run:
143155
skip-dirs:
144156
- test/testdata_etc

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" //nolint:staticcheck // require changes in github.com/OpenPeeDeeP/depguard
10+
"golang.org/x/tools/go/loader"
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" //nolint:staticcheck // it's an adapter for golang.org/x/tools/go/packages
7+
"golang.org/x/tools/go/loader"
88
)
99

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

0 commit comments

Comments
 (0)