Preparing report...

Report for github.com/thestormforge/optimize-controller

A+    Excellent!    Found 70 issues across 202 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo91%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • optimize-controller/api/v1alpha1/zz_generated.conversion.go
    • Line 37: warning: cyclomatic complexity 65 of function RegisterConversions() is high (> 15) (gocyclo)
    • Line 563: warning: cyclomatic complexity 18 of function autoConvert_v1alpha1_ExperimentSpec_To_v1beta1_ExperimentSpec() is high (> 15) (gocyclo)
    • Line 635: warning: cyclomatic complexity 18 of function autoConvert_v1beta1_ExperimentSpec_To_v1alpha1_ExperimentSpec() is high (> 15) (gocyclo)

golint71%

Golint is a linter for Go source code.

    • optimize-controller/redskyctl/internal/commands/run/choiceinput/choiceinput.go
    • Line 28: warning: exported type Model should have comment or be unexported (golint)
    • Line 46: warning: exported function NewModel should have comment or be unexported (golint)
    • Line 59: warning: exported method Model.Update should have comment or be unexported (golint)
    • Line 94: warning: exported method Model.IsSelected should have comment or be unexported (golint)
    • Line 98: warning: exported method Model.Select should have comment or be unexported (golint)
    • Line 116: warning: exported method Model.SelectOnly should have comment or be unexported (golint)
    • Line 122: warning: exported method Model.View should have comment or be unexported (golint)
    • optimize-controller/redskyctl/internal/commands/run/form/multichoicefield.go
    • Line 24: warning: exported type MultiChoiceFieldValidator should have comment or be unexported (golint)
    • Line 28: warning: exported type MultiChoiceField should have comment or be unexported (golint)
    • Line 36: warning: exported function NewMultiChoiceField should have comment or be unexported (golint)
    • Line 51: warning: exported method MultiChoiceField.Update should have comment or be unexported (golint)
    • Line 68: warning: exported method MultiChoiceField.View should have comment or be unexported (golint)
    • Line 78: warning: exported method MultiChoiceField.Validate should have comment or be unexported (golint)
    • optimize-controller/redskyctl/internal/commands/run/form/textfield.go
    • Line 24: warning: exported type TextFieldValidator should have comment or be unexported (golint)
    • Line 28: warning: exported type TextField should have comment or be unexported (golint)
    • Line 37: warning: exported function NewTextField should have comment or be unexported (golint)
    • Line 52: warning: exported method TextField.Update should have comment or be unexported (golint)
    • Line 76: warning: exported method TextField.View should have comment or be unexported (golint)
    • Line 86: warning: exported method TextField.Validate should have comment or be unexported (golint)
    • optimize-controller/redskyctl/internal/commands/run/pager/pager.go
    • Line 26: warning: exported type ExitMsg should have comment or be unexported (golint)
    • Line 28: warning: exported type Model should have comment or be unexported (golint)
    • Line 39: warning: exported function NewModel should have comment or be unexported (golint)
    • Line 43: warning: exported method Model.Update should have comment or be unexported (golint)
    • Line 79: warning: exported method Model.View should have comment or be unexported (golint)
    • Line 89: warning: exported method Model.Focus should have comment or be unexported (golint)
    • Line 93: warning: exported method Model.Focused should have comment or be unexported (golint)
    • Line 97: warning: exported method Model.Blur should have comment or be unexported (golint)
    • optimize-controller/internal/experiment/generation/prometheus.go
    • Line 29: warning: exported type PrometheusMetricsSource should have comment or be unexported (golint)
    • Line 35: warning: exported method PrometheusMetricsSource.Metrics should have comment or be unexported (golint)
    • Line 49: warning: exported type BuiltInPrometheus should have comment or be unexported (golint)
    • Line 61: warning: exported method BuiltInPrometheus.Update should have comment or be unexported (golint)
    • optimize-controller/api/v1alpha1/experiment_conversion.go
    • Line 40: warning: exported method Experiment.ConvertTo should have comment or be unexported (golint)
    • Line 48: warning: exported method Experiment.ConvertFrom should have comment or be unexported (golint)
    • Line 56: warning: exported function Convert_v1alpha1_ExperimentSpec_To_v1beta1_ExperimentSpec should have comment or be unexported (golint)
    • Line 56: warning: don't use underscores in Go names; func Convert_v1alpha1_ExperimentSpec_To_v1beta1_ExperimentSpec should be ConvertV1alpha1ExperimentSpecToV1beta1ExperimentSpec (golint)
    • Line 66: warning: exported function Convert_v1beta1_ExperimentSpec_To_v1alpha1_ExperimentSpec should have comment or be unexported (golint)
    • Line 66: warning: don't use underscores in Go names; func Convert_v1beta1_ExperimentSpec_To_v1alpha1_ExperimentSpec should be ConvertV1beta1ExperimentSpecToV1alpha1ExperimentSpec (golint)
    • Line 76: warning: exported function Convert_v1alpha1_Parameter_To_v1beta1_Parameter should have comment or be unexported (golint)
    • Line 76: warning: don't use underscores in Go names; func Convert_v1alpha1_Parameter_To_v1beta1_Parameter should be ConvertV1alpha1ParameterToV1beta1Parameter (golint)
    • Line 91: warning: exported function Convert_v1beta1_Parameter_To_v1alpha1_Parameter should have comment or be unexported (golint)
    • Line 91: warning: don't use underscores in Go names; func Convert_v1beta1_Parameter_To_v1alpha1_Parameter should be ConvertV1beta1ParameterToV1alpha1Parameter (golint)
    • Line 105: warning: exported function Convert_v1beta1_Metric_To_v1alpha1_Metric should have comment or be unexported (golint)
    • Line 105: warning: don't use underscores in Go names; func Convert_v1beta1_Metric_To_v1alpha1_Metric should be ConvertV1beta1MetricToV1alpha1Metric (golint)
    • Line 134: warning: exported function Convert_v1alpha1_Metric_To_v1beta1_Metric should have comment or be unexported (golint)
    • Line 134: warning: don't use underscores in Go names; func Convert_v1alpha1_Metric_To_v1beta1_Metric should be ConvertV1alpha1MetricToV1beta1Metric (golint)
    • optimize-controller/api/apps/v1alpha1/application_defaults.go
    • Line 35: warning: exported const StormForgerAccessTokenSecretName should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: comment on exported function RegisterDefaults should be of the form "RegisterDefaults ..." (golint)
    • Line 45: warning: exported method Application.Default should have comment or be unexported (golint)
    • Line 55: warning: exported method Scenario.Default should have comment or be unexported (golint)
    • Line 70: warning: exported method Objective.Default should have comment or be unexported (golint)
    • Line 87: warning: exported method Goal.Default should have comment or be unexported (golint)
    • optimize-controller/api/v1alpha1/trial_conversion.go
    • Line 27: warning: exported method Trial.ConvertTo should have comment or be unexported (golint)
    • Line 35: warning: exported method Trial.ConvertFrom should have comment or be unexported (golint)
    • Line 43: warning: exported function Convert_v1alpha1_Trial_To_v1beta1_Trial should have comment or be unexported (golint)
    • Line 43: warning: don't use underscores in Go names; func Convert_v1alpha1_Trial_To_v1beta1_Trial should be ConvertV1alpha1TrialToV1beta1Trial (golint)
    • Line 74: warning: exported function Convert_v1beta1_Trial_To_v1alpha1_Trial should have comment or be unexported (golint)
    • Line 74: warning: don't use underscores in Go names; func Convert_v1beta1_Trial_To_v1alpha1_Trial should be ConvertV1beta1TrialToV1alpha1Trial (golint)
    • Line 105: warning: exported function Convert_v1alpha1_TrialSpec_To_v1beta1_TrialSpec should have comment or be unexported (golint)
    • Line 105: warning: don't use underscores in Go names; func Convert_v1alpha1_TrialSpec_To_v1beta1_TrialSpec should be ConvertV1alpha1TrialSpecToV1beta1TrialSpec (golint)
    • Line 113: warning: exported function Convert_v1beta1_TrialSpec_To_v1alpha1_TrialSpec should have comment or be unexported (golint)
    • Line 113: warning: don't use underscores in Go names; func Convert_v1beta1_TrialSpec_To_v1alpha1_TrialSpec should be ConvertV1beta1TrialSpecToV1alpha1TrialSpec (golint)
    • Line 121: warning: exported function Convert_v1beta1_TrialStatus_To_v1alpha1_TrialStatus should have comment or be unexported (golint)
    • Line 121: warning: don't use underscores in Go names; func Convert_v1beta1_TrialStatus_To_v1alpha1_TrialStatus should be ConvertV1beta1TrialStatusToV1alpha1TrialStatus (golint)
    • optimize-controller/redskyctl/internal/commands/check/version.go
    • Line 35: warning: exported var GitHubReleasesURL should have comment or be unexported (golint)
    • Line 113: warning: exported type ReleaseList should have comment or be unexported (golint)
    • Line 115: warning: exported type Release should have comment or be unexported (golint)
    • Line 123: warning: exported type Asset should have comment or be unexported (golint)
    • Line 128: warning: exported type APIError should have comment or be unexported (golint)
    • Line 134: warning: exported method ReleaseList.Latest should have comment or be unexported (golint)
    • Line 144: warning: exported method Release.AssetByName should have comment or be unexported (golint)
    • optimize-controller/redskyctl/internal/kustomize/options.go
    • Line 35: warning: exported type Option should have comment or be unexported (golint)
    • Line 42: warning: comment on exported var BuildImage should be of the form "BuildImage ..." (golint)
    • Line 233: warning: exported function WithImagePullPolicy should have comment or be unexported (golint)
    • Line 258: warning: exported function WithFS should have comment or be unexported (golint)
    • Line 267: warning: exported function WithResourceNames should have comment or be unexported (golint)
    • optimize-controller/api/apps/v1alpha1/application_types.go
    • Line 203: warning: exported const LatencyMinimum should have comment (or a comment on this block) or be unexported (golint)
    • Line 226: warning: exported const ErrorRateRequests should have comment (or a comment on this block) or be unexported (golint)
    • Line 244: warning: exported const DurationTrial should have comment (or a comment on this block) or be unexported (golint)
    • optimize-controller/redskyctl/internal/commands/run/form/exitfield.go
    • Line 23: warning: exported type ExitField should have comment or be unexported (golint)
    • Line 31: warning: exported function NewExitField should have comment or be unexported (golint)
    • Line 35: warning: exported method ExitField.Update should have comment or be unexported (golint)
    • Line 43: warning: exported method ExitField.Focus should have comment or be unexported (golint)
    • Line 47: warning: exported method ExitField.Focused should have comment or be unexported (golint)
    • Line 51: warning: exported method ExitField.Blur should have comment or be unexported (golint)
    • Line 55: warning: exported method ExitField.View should have comment or be unexported (golint)
    • Line 59: warning: exported method ExitField.Validate should have comment or be unexported (golint)
    • optimize-controller/redskyctl/internal/commands/run/form/validation.go
    • Line 39: warning: exported type Required should have comment or be unexported (golint)
    • Line 46: warning: exported method Required.ValidateTextField should have comment or be unexported (golint)
    • Line 58: warning: exported method Required.ValidateChoiceField should have comment or be unexported (golint)
    • Line 70: warning: exported method Required.ValidateMultiChoiceField should have comment or be unexported (golint)
    • Line 78: warning: exported type URL should have comment or be unexported (golint)
    • Line 84: warning: exported method URL.ValidateTextField should have comment or be unexported (golint)
    • Line 98: warning: exported type File should have comment or be unexported (golint)
    • Line 105: warning: exported method File.ValidateTextField should have comment or be unexported (golint)
    • optimize-controller/redskyctl/internal/commands/run/multichoiceinput/multichoiceinput.go
    • Line 28: warning: exported type Model should have comment or be unexported (golint)
    • Line 47: warning: exported function NewModel should have comment or be unexported (golint)
    • Line 59: warning: exported method Model.Update should have comment or be unexported (golint)
    • Line 95: warning: exported method Model.IsSelected should have comment or be unexported (golint)
    • Line 104: warning: exported method Model.Select should have comment or be unexported (golint)
    • Line 114: warning: exported method Model.Unselect should have comment or be unexported (golint)
    • Line 125: warning: exported method Model.SelectOnly should have comment or be unexported (golint)
    • Line 131: warning: exported method Model.Toggle should have comment or be unexported (golint)
    • Line 139: warning: exported method Model.IsHighlighted should have comment or be unexported (golint)
    • Line 143: warning: exported method Model.Highlight should have comment or be unexported (golint)
    • Line 154: warning: exported method Model.Values should have comment or be unexported (golint)
    • Line 162: warning: exported method Model.View should have comment or be unexported (golint)
    • optimize-controller/redskyctl/internal/commands/run/form/choicefield.go
    • Line 24: warning: exported type ChoiceFieldValidator should have comment or be unexported (golint)
    • Line 28: warning: exported type ChoiceField should have comment or be unexported (golint)
    • Line 36: warning: exported function NewChoiceField should have comment or be unexported (golint)
    • Line 51: warning: exported method ChoiceField.Update should have comment or be unexported (golint)
    • Line 68: warning: exported method ChoiceField.View should have comment or be unexported (golint)
    • Line 78: warning: exported method ChoiceField.Validate should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell99%

Misspell Finds commonly misspelled English words