Skip to content

Commit

Permalink
add exclude-rules to be compatible with the previous golanci-lint ver…
Browse files Browse the repository at this point in the history
…sion.
  • Loading branch information
ldez committed Feb 21, 2021
1 parent 1f4dbc1 commit 4040b48
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .golangci.yml
Expand Up @@ -139,6 +139,18 @@ issues:
- path: pkg/golinters/scopelint.go
text: 'directive `//nolint:interfacer` is unused for linter interfacer'

# TODO temporary rule, must be removed
# related to https://github.com/golangci/golangci-lint/pull/1756
# must be replaced by '//nolint:staticcheck // require changes in github.com/OpenPeeDeeP/depguard'
- path: pkg/golinters/depguard.go
text: 'SA1019: package golang.org/x/tools/go/loader is deprecated'

# TODO temporary rule, must be removed
# related to https://github.com/golangci/golangci-lint/pull/1756
# must be replaced by '///nolint:staticcheck // it's an adapter for golang.org/x/tools/go/packages'
- path: pkg/golinters/goanalysis/adapters.go
text: 'SA1019: package golang.org/x/tools/go/loader is deprecated'

run:
skip-dirs:
- test/testdata_etc
Expand Down
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" //nolint:staticcheck // require changes in github.com/OpenPeeDeeP/depguard
"golang.org/x/tools/go/loader"

"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" //nolint:staticcheck // it's an adapter for golang.org/x/tools/go/packages
"golang.org/x/tools/go/loader"
)

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

0 comments on commit 4040b48

Please sign in to comment.