diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49d76d9a..661a9800 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,8 +69,10 @@ jobs: - name: Vet run: make vet - - name: Lint - run: make lint + - name: lint + uses: golangci/golangci-lint-action@v6 + with: + version: latest - name: Helm Lint run: make helm-lint diff --git a/cloud/linode/cloud.go b/cloud/linode/cloud.go index b85f6191..e9ac261b 100644 --- a/cloud/linode/cloud.go +++ b/cloud/linode/cloud.go @@ -117,7 +117,7 @@ func newCloud() (cloudprovider.Interface, error) { if len(Options.IpHolderSuffix) > 23 { msg := fmt.Sprintf("ip-holder-suffix must be 23 characters or less: %s is %d characters\n", Options.IpHolderSuffix, len(Options.IpHolderSuffix)) klog.Error(msg) - return nil, fmt.Errorf(msg) + return nil, fmt.Errorf("%s", msg) } // create struct that satisfies cloudprovider.Interface diff --git a/main.go b/main.go index dde9feb8..53b5b2ab 100644 --- a/main.go +++ b/main.go @@ -113,7 +113,7 @@ func main() { linode.Options.KubeconfigFlag = command.Flags().Lookup("kubeconfig") if linode.Options.KubeconfigFlag == nil { msg := "kubeconfig missing from CCM flag set" - sentry.CaptureError(ctx, fmt.Errorf(msg)) + sentry.CaptureError(ctx, fmt.Errorf("%s", msg)) fmt.Fprintf(os.Stderr, "kubeconfig missing from CCM flag set"+"\n") os.Exit(1) } @@ -122,7 +122,7 @@ func main() { _, network, err := net.ParseCIDR(externalSubnet) if err != nil { msg := fmt.Sprintf("Unable to parse %s as network subnet: %v", externalSubnet, err) - sentry.CaptureError(ctx, fmt.Errorf(msg)) + sentry.CaptureError(ctx, fmt.Errorf("%s", msg)) fmt.Fprintf(os.Stderr, "%v\n", msg) os.Exit(1) }