diff --git a/.golangci.yaml b/.golangci.yaml index 0afea8c2..6c5d550f 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -7,13 +7,14 @@ linters: - revive - gosec - prealloc -run: - skip-files: +issues: + exclude-files: - /zz_generated_ - _generated - skip-dirs: + exclude-dirs: - generated - deadline: 5m +run: + timeout: 5m tests: true build-tags: - test diff --git a/Dockerfile.dapper b/Dockerfile.dapper index ce65c747..40ee8071 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -7,7 +7,7 @@ RUN zypper -n rm container-suseconnect && \ zypper -n install git curl docker gzip tar wget awk ## install golangci -RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.55.2 +RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.57.1 ## install controller-gen diff --git a/go.mod b/go.mod index 3062a146..0c2520f5 100644 --- a/go.mod +++ b/go.mod @@ -46,7 +46,6 @@ require ( github.com/stretchr/testify v1.8.2 github.com/urfave/cli/v2 v2.3.0 golang.org/x/crypto v0.17.0 - golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 k8s.io/api v0.27.1 k8s.io/apimachinery v0.27.1 k8s.io/client-go v0.27.1 @@ -98,6 +97,7 @@ require ( github.com/prometheus/procfs v0.9.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect + golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.19.0 // indirect golang.org/x/oauth2 v0.13.0 // indirect diff --git a/main.go b/main.go index 16ffd074..1e9147a2 100644 --- a/main.go +++ b/main.go @@ -142,7 +142,7 @@ func main() { }, } - app.Action = func(c *cli.Context) error { + app.Action = func(_ *cli.Context) error { initProfiling(&opt) initLogs(&opt) return run(&opt) diff --git a/pkg/controller/blockdevice/controller.go b/pkg/controller/blockdevice/controller.go index 51cc1d6a..ab8e09ab 100644 --- a/pkg/controller/blockdevice/controller.go +++ b/pkg/controller/blockdevice/controller.go @@ -7,6 +7,7 @@ import ( "os" "path/filepath" "reflect" + "slices" "sync" "time" @@ -14,7 +15,6 @@ import ( ghwutil "github.com/jaypipes/ghw/pkg/util" longhornv1 "github.com/longhorn/longhorn-manager/k8s/pkg/apis/longhorn/v1beta2" "github.com/sirupsen/logrus" - "golang.org/x/exp/slices" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"