From 66a14d91c5851db1ae5c028a6e9d4c165e4b7440 Mon Sep 17 00:00:00 2001 From: Gero Posmyk-Leinemann Date: Thu, 16 Jan 2025 15:25:51 +0000 Subject: [PATCH] [golangci] Remove superfluous notlint and checks --- WORKSPACE.yaml | 2 +- gitpod-ws.code-workspace | 1 + install/installer/pkg/components/agent-smith/daemonset.go | 1 - install/installer/pkg/components/blobserve/deployment.go | 1 - install/installer/pkg/components/content-service/deployment.go | 1 - install/installer/pkg/components/docker-registry/secret.go | 1 - install/installer/pkg/components/ide-metrics/deployment.go | 1 - install/installer/pkg/components/ide-service/deployment.go | 1 - .../installer/pkg/components/image-builder-mk3/deployment.go | 1 - install/installer/pkg/components/openvsx-proxy/statefulset.go | 1 - install/installer/pkg/components/proxy/deployment.go | 1 - .../installer/pkg/components/public-api-server/deployment.go | 1 - install/installer/pkg/components/registry-facade/daemonset.go | 1 - install/installer/pkg/components/server/deployment.go | 1 - install/installer/pkg/components/spicedb/deployment.go | 1 - install/installer/pkg/components/usage/deployment.go | 1 - install/installer/pkg/components/ws-daemon/daemonset.go | 1 - .../installer/pkg/components/ws-manager-bridge/deployment.go | 1 - install/installer/pkg/components/ws-manager-mk2/deployment.go | 1 - install/installer/pkg/components/ws-proxy/deployment.go | 1 - 20 files changed, 2 insertions(+), 19 deletions(-) diff --git a/WORKSPACE.yaml b/WORKSPACE.yaml index eeaebf0f978731..0973d755d0ee71 100644 --- a/WORKSPACE.yaml +++ b/WORKSPACE.yaml @@ -44,4 +44,4 @@ defaultVariant: - "**/node_modules/**" config: go: - lintCommand: ["sh", "-c", "golangci-lint run --disable govet,errcheck,typecheck,staticcheck,structcheck -e '.*declared but not used.*' --allow-parallel-runners --timeout 15m"] + lintCommand: ["sh", "-c", "golangci-lint run --disable govet,errcheck,staticcheck --allow-parallel-runners --timeout 15m"] diff --git a/gitpod-ws.code-workspace b/gitpod-ws.code-workspace index 4c5d17a66dec77..9cb0715180f369 100644 --- a/gitpod-ws.code-workspace +++ b/gitpod-ws.code-workspace @@ -160,6 +160,7 @@ "**/.git": true }, "go.lintTool": "golangci-lint", + "go.lintFlags": ["-disable", "govet,errcheck,staticcheck", "--allow-parallel-runners", "--timeout", "15m"], "gopls": { "allowModfileModifications": true }, diff --git a/install/installer/pkg/components/agent-smith/daemonset.go b/install/installer/pkg/components/agent-smith/daemonset.go index 7ca8ce68b00e68..c771363a20220b 100644 --- a/install/installer/pkg/components/agent-smith/daemonset.go +++ b/install/installer/pkg/components/agent-smith/daemonset.go @@ -20,7 +20,6 @@ import ( func daemonset(ctx *common.RenderContext) ([]runtime.Object, error) { labels := common.CustomizeLabel(ctx, Component, common.TypeMetaDaemonset) - //nolint:typecheck configHash, err := common.ObjectHash(configmap(ctx)) if err != nil { return nil, err diff --git a/install/installer/pkg/components/blobserve/deployment.go b/install/installer/pkg/components/blobserve/deployment.go index 51f12c360a5e16..a644944b8aa274 100644 --- a/install/installer/pkg/components/blobserve/deployment.go +++ b/install/installer/pkg/components/blobserve/deployment.go @@ -47,7 +47,6 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { hashObj = append(hashObj, objs...) } - //nolint:typecheck configHash, err := common.ObjectHash(hashObj, nil) if err != nil { return nil, err diff --git a/install/installer/pkg/components/content-service/deployment.go b/install/installer/pkg/components/content-service/deployment.go index d90f0e5c95e363..e77ae276cc784e 100644 --- a/install/installer/pkg/components/content-service/deployment.go +++ b/install/installer/pkg/components/content-service/deployment.go @@ -20,7 +20,6 @@ import ( func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { labels := common.CustomizeLabel(ctx, Component, common.TypeMetaDeployment) - //nolint:typecheck configHash, err := common.ObjectHash(configmap(ctx)) if err != nil { return nil, err diff --git a/install/installer/pkg/components/docker-registry/secret.go b/install/installer/pkg/components/docker-registry/secret.go index 8c830aba0ca4d8..c515ba47b2c287 100644 --- a/install/installer/pkg/components/docker-registry/secret.go +++ b/install/installer/pkg/components/docker-registry/secret.go @@ -5,7 +5,6 @@ package dockerregistry import ( - //nolint:typecheck "encoding/base64" "encoding/json" "fmt" diff --git a/install/installer/pkg/components/ide-metrics/deployment.go b/install/installer/pkg/components/ide-metrics/deployment.go index d1d61a5f371c6c..5edb8551e2ffbd 100644 --- a/install/installer/pkg/components/ide-metrics/deployment.go +++ b/install/installer/pkg/components/ide-metrics/deployment.go @@ -20,7 +20,6 @@ import ( func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { labels := common.CustomizeLabel(ctx, Component, common.TypeMetaDeployment) - //nolint:typecheck configHash, err := common.ObjectHash(configmap(ctx)) if err != nil { return nil, err diff --git a/install/installer/pkg/components/ide-service/deployment.go b/install/installer/pkg/components/ide-service/deployment.go index 22fdedf7d3806c..e79b4ada370abc 100644 --- a/install/installer/pkg/components/ide-service/deployment.go +++ b/install/installer/pkg/components/ide-service/deployment.go @@ -36,7 +36,6 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { return nil, fmt.Errorf("%s: invalid container registry config", Component) } - //nolint:typecheck configHash, err := common.ObjectHash(configmap(ctx)) if err != nil { return nil, err diff --git a/install/installer/pkg/components/image-builder-mk3/deployment.go b/install/installer/pkg/components/image-builder-mk3/deployment.go index 908d58bd1b9bb5..3055b18f9ee75c 100644 --- a/install/installer/pkg/components/image-builder-mk3/deployment.go +++ b/install/installer/pkg/components/image-builder-mk3/deployment.go @@ -55,7 +55,6 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { hashObj = append(hashObj, objs...) } - //nolint:typecheck configHash, err := common.ObjectHash(hashObj, nil) if err != nil { return nil, err diff --git a/install/installer/pkg/components/openvsx-proxy/statefulset.go b/install/installer/pkg/components/openvsx-proxy/statefulset.go index 2ec56c22783c19..4061e24a376096 100644 --- a/install/installer/pkg/components/openvsx-proxy/statefulset.go +++ b/install/installer/pkg/components/openvsx-proxy/statefulset.go @@ -25,7 +25,6 @@ func statefulset(ctx *common.RenderContext) ([]runtime.Object, error) { labels := common.CustomizeLabel(ctx, Component, common.TypeMetaStatefulSet) // todo(sje): add redis - //nolint:typecheck configHash, err := common.ObjectHash(configmap(ctx)) if err != nil { return nil, err diff --git a/install/installer/pkg/components/proxy/deployment.go b/install/installer/pkg/components/proxy/deployment.go index 063bc61f700c39..2d586e52bbb382 100644 --- a/install/installer/pkg/components/proxy/deployment.go +++ b/install/installer/pkg/components/proxy/deployment.go @@ -96,7 +96,6 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { } } - //nolint:typecheck configHash, err := common.ObjectHash(hashObj, nil) if err != nil { return nil, err diff --git a/install/installer/pkg/components/public-api-server/deployment.go b/install/installer/pkg/components/public-api-server/deployment.go index 14cb5453c1d967..5d23bc91b3dde2 100644 --- a/install/installer/pkg/components/public-api-server/deployment.go +++ b/install/installer/pkg/components/public-api-server/deployment.go @@ -30,7 +30,6 @@ const ( ) func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { - //nolint:typecheck configHash, err := common.ObjectHash(configmap(ctx)) if err != nil { return nil, err diff --git a/install/installer/pkg/components/registry-facade/daemonset.go b/install/installer/pkg/components/registry-facade/daemonset.go index 351ee0f28239ea..c2d057eee54d1f 100644 --- a/install/installer/pkg/components/registry-facade/daemonset.go +++ b/install/installer/pkg/components/registry-facade/daemonset.go @@ -72,7 +72,6 @@ func daemonset(ctx *common.RenderContext) ([]runtime.Object, error) { hashObj = append(hashObj, objs...) } - //nolint:typecheck configHash, err := common.ObjectHash(hashObj, nil) if err != nil { return nil, err diff --git a/install/installer/pkg/components/server/deployment.go b/install/installer/pkg/components/server/deployment.go index 40832b5cda3007..a99064cd4ca8c7 100644 --- a/install/installer/pkg/components/server/deployment.go +++ b/install/installer/pkg/components/server/deployment.go @@ -66,7 +66,6 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { }, }) - //nolint:typecheck configHash, err := common.ObjectHash(hashObj, nil) if err != nil { return nil, err diff --git a/install/installer/pkg/components/spicedb/deployment.go b/install/installer/pkg/components/spicedb/deployment.go index fa95308a2535bb..502135843168b9 100644 --- a/install/installer/pkg/components/spicedb/deployment.go +++ b/install/installer/pkg/components/spicedb/deployment.go @@ -35,7 +35,6 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { return nil, errors.New("missing configuration for spicedb.secretRef") } - //nolint:typecheck//nolint:typecheck bootstrapVolume, bootstrapVolumeMount, bootstrapFiles, contentHash, err := getBootstrapConfig(ctx) if err != nil { return nil, fmt.Errorf("failed to get bootstrap config: %w", err) diff --git a/install/installer/pkg/components/usage/deployment.go b/install/installer/pkg/components/usage/deployment.go index 4f20fe5a4a1ebb..802b711cb6005a 100644 --- a/install/installer/pkg/components/usage/deployment.go +++ b/install/installer/pkg/components/usage/deployment.go @@ -64,7 +64,6 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { return nil }) - //nolint:typecheck configHash, err := common.ObjectHash(configmap(ctx)) if err != nil { return nil, err diff --git a/install/installer/pkg/components/ws-daemon/daemonset.go b/install/installer/pkg/components/ws-daemon/daemonset.go index c43d5632741df5..2661b20e8fc673 100644 --- a/install/installer/pkg/components/ws-daemon/daemonset.go +++ b/install/installer/pkg/components/ws-daemon/daemonset.go @@ -23,7 +23,6 @@ func daemonset(ctx *common.RenderContext) ([]runtime.Object, error) { cfg := ctx.Config labels := common.CustomizeLabel(ctx, Component, common.TypeMetaDaemonset) - //nolint:typecheck configHash, err := common.ObjectHash(configmap(ctx)) if err != nil { return nil, err diff --git a/install/installer/pkg/components/ws-manager-bridge/deployment.go b/install/installer/pkg/components/ws-manager-bridge/deployment.go index d6769763443bac..0116159e0500cc 100644 --- a/install/installer/pkg/components/ws-manager-bridge/deployment.go +++ b/install/installer/pkg/components/ws-manager-bridge/deployment.go @@ -76,7 +76,6 @@ func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { }, }) - //nolint:typecheck configHash, err := common.ObjectHash(hashObj, nil) if err != nil { return nil, err diff --git a/install/installer/pkg/components/ws-manager-mk2/deployment.go b/install/installer/pkg/components/ws-manager-mk2/deployment.go index e8139b23d23533..ae6e5c417bc927 100644 --- a/install/installer/pkg/components/ws-manager-mk2/deployment.go +++ b/install/installer/pkg/components/ws-manager-mk2/deployment.go @@ -22,7 +22,6 @@ import ( func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { labels := common.DefaultLabels(Component) - //nolint:typecheck configHash, err := common.ObjectHash(configmap(ctx)) if err != nil { return nil, err diff --git a/install/installer/pkg/components/ws-proxy/deployment.go b/install/installer/pkg/components/ws-proxy/deployment.go index 46244ee02efe0c..065a0353fc8c81 100644 --- a/install/installer/pkg/components/ws-proxy/deployment.go +++ b/install/installer/pkg/components/ws-proxy/deployment.go @@ -23,7 +23,6 @@ import ( func deployment(ctx *common.RenderContext) ([]runtime.Object, error) { labels := common.CustomizeLabel(ctx, Component, common.TypeMetaDeployment) - //nolint:typecheck configHash, err := common.ObjectHash(configmap(ctx)) if err != nil { return nil, err