dev: clean configuration and code (#1830)
This commit is contained in:
parent
714bd288df
commit
2ebc9d7202
@ -133,35 +133,9 @@ issues:
|
||||
- gocritic
|
||||
text: "unnecessaryDefer:"
|
||||
|
||||
# TODO temporary rule, must be removed
|
||||
# seems related to v0.34.1, but I was not able to reproduce locally,
|
||||
# I was also not able to reproduce in the CI of a fork,
|
||||
# only the golangci-lint CI seems to be affected by this invalid analysis.
|
||||
- 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
|
||||
- internal/cache
|
||||
- internal/renameio
|
||||
- internal/robustio
|
||||
|
||||
# golangci.com configuration
|
||||
# https://github.com/golangci/golangci/wiki/Configuration
|
||||
service:
|
||||
golangci-lint-version: 1.23.x # use the fixed version to not introduce new linters unexpectedly
|
||||
prepare:
|
||||
- echo "here I can run custom commands, but no preparation needed for this repo"
|
||||
|
@ -5,11 +5,10 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
_ "github.com/go-critic/go-critic/checkers" // this import register checkers
|
||||
"github.com/go-critic/go-critic/framework/linter"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
_ "github.com/go-critic/go-critic/checkers" // this import register checkers
|
||||
|
||||
"github.com/golangci/golangci-lint/pkg/logutils"
|
||||
)
|
||||
|
||||
|
@ -5,9 +5,9 @@ import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/golangci/golangci-lint/pkg/logutils"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/golangci/golangci-lint/pkg/logutils"
|
||||
)
|
||||
|
||||
func TestUtils(t *testing.T) {
|
||||
|
@ -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"
|
||||
|
@ -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 {
|
||||
|
@ -1,9 +1,8 @@
|
||||
package golinters
|
||||
|
||||
import (
|
||||
"golang.org/x/tools/go/analysis"
|
||||
|
||||
"4d63.com/gochecknoglobals/checknoglobals"
|
||||
"golang.org/x/tools/go/analysis"
|
||||
|
||||
"github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
|
||||
)
|
||||
|
@ -3,10 +3,9 @@ package golinters
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"golang.org/x/tools/go/packages"
|
||||
|
||||
"golang.org/x/tools/go/analysis"
|
||||
"golang.org/x/tools/go/analysis/passes/buildssa"
|
||||
"golang.org/x/tools/go/packages"
|
||||
"mvdan.cc/unparam/check"
|
||||
|
||||
"github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
|
||||
|
@ -4,7 +4,6 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/golangci/golangci-lint/pkg/config"
|
||||
|
||||
"github.com/golangci/golangci-lint/pkg/logutils"
|
||||
)
|
||||
|
||||
|
@ -4,9 +4,9 @@ import (
|
||||
"go/token"
|
||||
"testing"
|
||||
|
||||
"github.com/golangci/golangci-lint/pkg/result"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/golangci/golangci-lint/pkg/result"
|
||||
)
|
||||
|
||||
type issueTestCase struct {
|
||||
|
@ -17,7 +17,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/golangci/golangci-lint/internal/renameio"
|
||||
|
||||
"github.com/golangci/golangci-lint/pkg/lint/linter"
|
||||
"github.com/golangci/golangci-lint/pkg/lint/lintersdb"
|
||||
)
|
||||
|
2
test/testdata/fix/in/gofumpt.go
vendored
2
test/testdata/fix/in/gofumpt.go
vendored
@ -1,6 +1,6 @@
|
||||
//args: -Egofumpt
|
||||
//config: linters-settings.gofumpt.extra-rules=true
|
||||
package testdata
|
||||
package p
|
||||
|
||||
import "fmt"
|
||||
|
||||
|
2
test/testdata/fix/out/gofumpt.go
vendored
2
test/testdata/fix/out/gofumpt.go
vendored
@ -1,6 +1,6 @@
|
||||
// args: -Egofumpt
|
||||
// config: linters-settings.gofumpt.extra-rules=true
|
||||
package testdata
|
||||
package p
|
||||
|
||||
import "fmt"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user