Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrades golangci-lint to v4 in IM #144

Merged
merged 6 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4.0.0
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.54.2
version: v1.56.2

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/find_last_sync_time_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package controller
import (
"time"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/ginkgo/v2" //nolint:revive
. "github.com/onsi/gomega" //nolint:revive
)

var _ = Describe("findLastSyncTime", func() {
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/gardener_cluster_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"time"

imv1 "github.com/kyma-project/infrastructure-manager/api/v1"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/ginkgo/v2" //nolint:revive
. "github.com/onsi/gomega" //nolint:revive
corev1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/next_requeue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package controller
import (
"time"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/ginkgo/v2" //nolint:revive
. "github.com/onsi/gomega" //nolint:revive
)

var _ = Describe("nextRequeueAfter", func() {
Expand Down
18 changes: 9 additions & 9 deletions internal/controller/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (

infrastructuremanagerv1 "github.com/kyma-project/infrastructure-manager/api/v1"
"github.com/kyma-project/infrastructure-manager/internal/controller/mocks"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/ginkgo/v2" //nolint:revive
. "github.com/onsi/gomega" //nolint:revive
"github.com/pkg/errors"
. "github.com/stretchr/testify/mock"
. "github.com/stretchr/testify/mock" //nolint:revive
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/rest"
ctrl "sigs.k8s.io/controller-runtime"
Expand All @@ -41,12 +41,12 @@ import (
// http://onsi.github.io/ginkgo/ to learn more about Ginkgo.

var (
cfg *rest.Config //nolint:gochecknoglobals
k8sClient client.Client //nolint:gochecknoglobals
testEnv *envtest.Environment //nolint:gochecknoglobals
suiteCtx context.Context //nolint:gochecknoglobals
cancelSuiteCtx context.CancelFunc //nolint:gochecknoglobals
anyContext = MatchedBy(func(ctx context.Context) bool { return true })
cfg *rest.Config //nolint:gochecknoglobals
k8sClient client.Client //nolint:gochecknoglobals
testEnv *envtest.Environment //nolint:gochecknoglobals
suiteCtx context.Context //nolint:gochecknoglobals
cancelSuiteCtx context.CancelFunc //nolint:gochecknoglobals
anyContext = MatchedBy(func(_ context.Context) bool { return true }) //nolint:gochecknoglobals
)

const TestKubeconfigValidityTime = 24 * time.Hour
Expand Down
Loading