scott-the-programmer/terraform-provider-minikube

View on GitHub
minikube/generator/schema_builder.go

Summary

Maintainability
A
1 hr
Test Coverage
A
93%

Function constructSchema has 96 lines of code (exceeds 50 allowed). Consider refactoring.
Wontfix

func constructSchema(entries []SchemaEntry) string {

    header := `//go:generate go run ../generate/main.go -target $GOFILE
// THIS FILE IS GENERATED DO NOT EDIT
package minikube
Severity: Major
Found in minikube/generator/schema_builder.go - About 2 hrs to fix

    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

      Avoid deeply nested control flow statements.
      Invalid

                  if ok {
                      currentEntry.Description = val.Description
                  }
      Severity: Major
      Found in minikube/generator/schema_builder.go - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Invalid

                    if err != nil {
                        return "", err
                    }
        Severity: Major
        Found in minikube/generator/schema_builder.go - About 45 mins to fix

          There are no issues that match your filters.

          Category
          Status