From 2931e0409edaa22b2d33d6278b5a7398407ed63f Mon Sep 17 00:00:00 2001 From: Manuel Fontan Date: Mon, 28 Aug 2023 12:23:37 +0100 Subject: [PATCH] Fix Issue #1739 (#1789) * Fix #1739 Signed-off-by: Manuel Fontan * remove commented lint config Signed-off-by: Manuel Fontan --------- Signed-off-by: Manuel Fontan --- .golangci.yml | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 7436123e9..8e0ab8645 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -22,10 +22,6 @@ issues: - linters: - stylecheck text: "ST1003: const StorageEngineRocksDbV1" - # TODO (johscheuer): Fix all go imports to make this check happy, https://github.com/FoundationDB/fdb-kubernetes-operator/issues/1739. - - linters: - - depguard - text: "is not allowed from list 'Main'" linters: disable-all: true @@ -76,7 +72,33 @@ linters-settings: go: "1.20" stylecheck: go: "1.20" - + depguard: + rules: + main: + allow: + - $gostd + - github.com/FoundationDB/fdb-kubernetes-operator + - github.com/apple/foundationdb + - github.com/google/go-cmp/cmp + - sigs.k8s.io/controller-runtime + - sigs.k8s.io/yaml + - k8s.io/kubectl + - k8s.io/apimachinery + - k8s.io/client-go + - k8s.io/cli-runtim + - k8s.io/api + - k8s.io/klog + - k8s.io/utils + - github.com/onsi/gomega + - github.com/onsi/ginkgo + - github.com/hashicorp + - github.com/spf13/cobra + - github.com/spf13/viper + - github.com/spf13/pflag + - github.com/fatih/color + - github.com/chaos-mesh + - github.com/prometheus + - github.com/go-logr run: timeout: 10m skip-files: