scott-the-programmer/terraform-provider-minikube

View on GitHub
minikube/resource_cluster.go

Summary

Maintainability
A
1 hr
Test Coverage
A
90%

Function initialiseMinikubeClient has 178 lines of code (exceeds 50 allowed). Consider refactoring.
Invalid

func initialiseMinikubeClient(d *schema.ResourceData, m interface{}) (lib.ClusterClient, error) {

    clusterClientFactory := m.(func() (lib.ClusterClient, error))
    clusterClient, err := clusterClientFactory()
    if err != nil {
Severity: Major
Found in minikube/resource_cluster.go - About 6 hrs to fix

    Function setClusterState has 61 lines of code (exceeds 50 allowed). Consider refactoring.
    Invalid

    func setClusterState(d *schema.ResourceData, cc *config.ClusterConfig, tfc lib.MinikubeClientConfig, ports []int, addons []string) {
    
        d.Set("addons", addons)
        d.Set("apiserver_ips", state_utils.SliceOrNil(cc.KubernetesConfig.APIServerIPs))
        d.Set("apiserver_name", cc.KubernetesConfig.APIServerName)
    Severity: Minor
    Found in minikube/resource_cluster.go - About 1 hr to fix

      Function initialiseMinikubeClient has 7 return statements (exceeds 4 allowed).
      Open

      func initialiseMinikubeClient(d *schema.ResourceData, m interface{}) (lib.ClusterClient, error) {
      
          clusterClientFactory := m.(func() (lib.ClusterClient, error))
          clusterClient, err := clusterClientFactory()
          if err != nil {
      Severity: Major
      Found in minikube/resource_cluster.go - About 45 mins to fix

        Function setClusterState has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        func setClusterState(d *schema.ResourceData, cc *config.ClusterConfig, tfc lib.MinikubeClientConfig, ports []int, addons []string) {
        Severity: Minor
        Found in minikube/resource_cluster.go - About 35 mins to fix

          Function getClusterOutputs has 5 return statements (exceeds 4 allowed).
          Open

          func getClusterOutputs(kc *kubeconfig.Settings) (string, string, string, string, error) {
              key, err := state_utils.ReadContents(kc.ClientKey)
              if err != nil {
                  return "", "", "", "", err
              }
          Severity: Major
          Found in minikube/resource_cluster.go - About 35 mins to fix

            There are no issues that match your filters.

            Category
            Status