scott-the-programmer/terraform-provider-minikube

View on GitHub

Showing 5 of 11 total issues

Function addEntry has 52 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func addEntry(entries []SchemaEntry, currentEntry SchemaEntry) ([]SchemaEntry, error) {
    switch currentEntry.Type {
    case String:
        entries = append(entries, SchemaEntry{
            Parameter:        currentEntry.Parameter,
Severity: Minor
Found in minikube/generator/schema_builder.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

      Method MinikubeClient.Start has 6 return statements (exceeds 4 allowed).
      Open

      func (e *MinikubeClient) Start() (*kubeconfig.Settings, error) {
      
          // By nature, viper references (here and within the internals of minikube) are not thread safe.
          // To keep our sanity, let's mutex this call and defer subsequent cluster starts
          if e.TfCreationLock != nil {
      Severity: Major
      Found in minikube/lib/minikube_client.go - About 40 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
            Severity
            Category
            Status
            Source
            Language