Preparing report...

Report for github.com/jenkins-x/jx-gitops

A+    Excellent!    Found 74 issues across 200 files

Tweet

gofmt99%

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


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!


gocyclo87%

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.

    • jx-gitops/pkg/cmd/variables/variables.go
    • Line 121: warning: cyclomatic complexity 29 of function (*Options).Validate() is high (> 15) (gocyclo)
    • Line 327: warning: cyclomatic complexity 22 of function (*Options).Run() is high (> 15) (gocyclo)
    • Line 525: warning: cyclomatic complexity 20 of function (*Options).FindBuildNumber() is high (> 15) (gocyclo)
    • jx-gitops/pkg/cmd/helm/release/release.go
    • Line 357: warning: cyclomatic complexity 30 of function (*Options).ChartPageRegistry() is high (> 15) (gocyclo)
    • Line 137: warning: cyclomatic complexity 28 of function (*Options).Validate() is high (> 15) (gocyclo)
    • Line 232: warning: cyclomatic complexity 17 of function (*Options).Run() is high (> 15) (gocyclo)

golint70%

Golint is a linter for Go source code.

    • jx-gitops/pkg/apis/gitops/v1alpha1/source_config_types.go
    • Line 15: warning: comment on exported const DefaultSlackChannel should be of the form "DefaultSlackChannel ..." (golint)
    • Line 121: warning: comment on exported type RepositoryGroup should be of the form "RepositoryGroup ..." (with optional leading article) (golint)
    • Line 244: warning: comment on exported method Pattern.MatchesLabels should be of the form "MatchesLabels ..." (golint)
    • Line 270: warning: exported method Pattern.Inherit should have comment or be unexported (golint)
    • jx-gitops/pkg/cmd/annotate/annotate.go
    • Line 30: warning: comment on exported type Options should be of the form "Options ..." (with optional leading article) (golint)
    • Line 38: warning: comment on exported function NewCmdUpdateAnnotate should be of the form "NewCmdUpdateAnnotate ..." (golint)
    • jx-gitops/pkg/cmd/helmfile/structure/structure.go
    • Line 21: warning: exported const HelmfileFolder should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: comment on exported function NewCmdHelmfileStructure should be of the form "NewCmdHelmfileStructure ..." (golint)
    • Line 241: warning: should omit 2nd value from range; this loop is equivalent to `for ns := range ...` (golint)
    • jx-gitops/pkg/cmd/helm/step_helm_template.go
    • Line 35: warning: comment on exported type TemplateOptions should be of the form "TemplateOptions ..." (with optional leading article) (golint)
    • Line 84: warning: exported method TemplateOptions.AddFlags should have comment or be unexported (golint)
    • Line 281: warning: exported method TemplateOptions.GitCommit should have comment or be unexported (golint)
    • jx-gitops/pkg/cmd/patch/patch.go
    • Line 40: warning: comment on exported type Options should be of the form "Options ..." (with optional leading article) (golint)
    • Line 78: warning: exported method Options.Run should have comment or be unexported (golint)
    • Line 131: warning: exported method Options.ResourceKind should have comment or be unexported (golint)
    • Line 135: warning: exported method Options.GetGroupVersion should have comment or be unexported (golint)
    • Line 149: warning: exported method Options.GetPatchType should have comment or be unexported (golint)
    • jx-gitops/pkg/cmd/plugin/upgrade/upgrade.go
    • Line 35: warning: comment on exported type Options should be of the form "Options ..." (with optional leading article) (golint)
    • Line 41: warning: comment on exported function NewCmdUpgradePlugins should be of the form "NewCmdUpgradePlugins ..." (golint)
    • jx-gitops/pkg/tfupgrade/tfupgrade.go
    • Line 36: warning: exported type Options should have comment or be unexported (golint)
    • Line 65: warning: exported method Options.Run should have comment or be unexported (golint)
    • Line 119: warning: exported method Options.ReplaceValue should have comment or be unexported (golint)
    • jx-gitops/pkg/cmd/namespace/namespace.go
    • Line 43: warning: comment on exported type Options should be of the form "Options ..." (with optional leading article) (golint)
    • Line 52: warning: comment on exported function NewCmdUpdateNamespace should be of the form "NewCmdUpdateNamespace ..." (golint)
    • Line 96: warning: exported method Options.RunDirMode should have comment or be unexported (golint)
    • jx-gitops/pkg/filters/string_filter.go
    • Line 41: warning: exported function HasPrefix should have comment or be unexported (golint)
    • Line 48: warning: exported function HasSuffix should have comment or be unexported (golint)
    • Line 55: warning: exported function Contains should have comment or be unexported (golint)
    • jx-gitops/pkg/cmd/version/version.go
    • Line 28: warning: comment on exported type Options should be of the form "Options ..." (with optional leading article) (golint)
    • Line 55: warning: exported function GetVersion should have comment or be unexported (golint)
    • jx-gitops/pkg/cmd/yset/yset.go
    • Line 27: warning: comment on exported type Options should be of the form "Options ..." (with optional leading article) (golint)
    • Line 34: warning: comment on exported function NewCmdYSet should be of the form "NewCmdYSet ..." (golint)
    • Line 54: warning: exported method Options.Run should have comment or be unexported (golint)
    • jx-gitops/pkg/cmd/ingress/ingress.go
    • Line 35: warning: comment on exported type Options should be of the form "Options ..." (with optional leading article) (golint)
    • Line 43: warning: comment on exported function NewCmdUpdateIngress should be of the form "NewCmdUpdateIngress ..." (golint)
    • jx-gitops/pkg/cmd/helm/release/release.go
    • Line 136: warning: comment on exported method Options.Validate should be of the form "Validate ..." (golint)
    • Line 305: warning: exported method Options.OCIRegistry should have comment or be unexported (golint)
    • Line 357: warning: exported method Options.ChartPageRegistry should have comment or be unexported (golint)
    • Line 474: warning: comment on exported method Options.GitCloneGitHubPages should be of the form "GitCloneGitHubPages ..." (golint)
    • Line 479: warning: exported method Options.BasicRegistry should have comment or be unexported (golint)
    • Line 517: warning: exported method Options.BuildAndPackage should have comment or be unexported (golint)
    • jx-gitops/pkg/cmd/variables/variables.go
    • Line 120: warning: comment on exported method Options.Validate should be of the form "Validate ..." (golint)
    • Line 472: warning: exported method Options.GetGitBranch should have comment or be unexported (golint)
    • Line 652: warning: comment on exported method Options.GetDashboardURL should be of the form "GetDashboardURL ..." (golint)
    • jx-gitops/pkg/cmd/jenkins/jobs/jobs.go
    • Line 54: warning: comment on exported type Options should be of the form "Options ..." (with optional leading article) (golint)
    • Line 97: warning: exported method Options.Validate should have comment or be unexported (golint)
    • Line 135: warning: exported method Options.Run should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


misspell0%

Misspell Finds commonly misspelled English words

An error occurred while running this test (exit status 3)