Preparing report...

Report for github.com/jenkins-x-plugins/jx-project

A+    Excellent!    Found 28 issues across 80 files

Tweet

gofmt98%

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!


gocyclo81%

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-project/pkg/cmd/root/quickstart.go
    • Line 140: warning: cyclomatic complexity 22 of function (*CreateQuickstartOptions).CreateQuickStart() is high (> 15) (gocyclo)
    • Line 267: warning: cyclomatic complexity 17 of function (*CreateQuickstartOptions).createQuickstart() is high (> 15) (gocyclo)
    • jx-project/pkg/jenkinsfile/pipeline.go
    • Line 213: warning: cyclomatic complexity 20 of function (*PipelineLifecycles).GetLifecycle() is high (> 15) (gocyclo)
    • Line 486: warning: cyclomatic complexity 18 of function LoadPipelineConfigAndMaybeValidate() is high (> 15) (gocyclo)
    • Line 704: warning: cyclomatic complexity 16 of function ExtendLifecycle() is high (> 15) (gocyclo)
    • jx-project/pkg/tekton/syntax/pipeline.go
    • Line 1701: warning: cyclomatic complexity 34 of function generateSteps() is high (> 15) (gocyclo)
    • Line 1410: warning: cyclomatic complexity 32 of function stageToTask() is high (> 15) (gocyclo)
    • Line 598: warning: cyclomatic complexity 27 of function validateStage() is high (> 15) (gocyclo)
    • Line 469: warning: cyclomatic complexity 18 of function MangleToRfc1035Label() is high (> 15) (gocyclo)
    • Line 2379: warning: cyclomatic complexity 18 of function ApplyNonStepOverridesToStage() is high (> 15) (gocyclo)
    • Line 697: warning: cyclomatic complexity 18 of function validateStep() is high (> 15) (gocyclo)
    • Line 2445: warning: cyclomatic complexity 17 of function ApplyStepOverridesToStage() is high (> 15) (gocyclo)
    • jx-project/pkg/cmd/importcmd/import.go
    • Line 335: warning: cyclomatic complexity 54 of function (*ImportOptions).Run() is high (> 15) (gocyclo)
    • Line 254: warning: cyclomatic complexity 25 of function (*ImportOptions).Validate() is high (> 15) (gocyclo)
    • Line 720: warning: cyclomatic complexity 18 of function (*ImportOptions).DiscoverGit() is high (> 15) (gocyclo)

golint76%

Golint is a linter for Go source code.

    • jx-project/pkg/maven/archetype.go
    • Line 16: warning: exported const MavenArchetypePluginVersion should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type ArtifactVersions should have comment or be unexported (golint)
    • Line 26: warning: exported type GroupArchectypes should have comment or be unexported (golint)
    • Line 31: warning: exported type ArchetypeModel should have comment or be unexported (golint)
    • Line 35: warning: exported type ArtifactData should have comment or be unexported (golint)
    • Line 42: warning: exported type ArchetypeFilter should have comment or be unexported (golint)
    • Line 49: warning: exported type ArchetypeForm should have comment or be unexported (golint)
    • Line 60: warning: exported function NewArchetypeModel should have comment or be unexported (golint)
    • Line 66: warning: exported method ArchetypeModel.GroupIDs should have comment or be unexported (golint)
    • Line 77: warning: exported method ArchetypeModel.ArtifactIDs should have comment or be unexported (golint)
    • Line 91: warning: exported method ArchetypeModel.Versions should have comment or be unexported (golint)
    • Line 109: warning: exported method ArchetypeModel.AddArtifact should have comment or be unexported (golint)
    • Line 147: warning: exported method ArchetypeModel.CreateSurvey should have comment or be unexported (golint)
    • Line 147: warning: receiver name model should be consistent with previous receiver name m for ArchetypeModel (golint)
    • jx-project/pkg/config/project_config.go
    • Line 47: warning: exported type PreviewEnvironmentConfig should have comment or be unexported (golint)
    • Line 52: warning: exported type IssueTrackerConfig should have comment or be unexported (golint)
    • Line 58: warning: exported type WikiConfig should have comment or be unexported (golint)
    • Line 64: warning: exported type ChatConfig should have comment or be unexported (golint)
    • Line 71: warning: exported type AddonConfig should have comment or be unexported (golint)
    • jx-project/pkg/spring/model.go
    • Line 27: warning: exported const OptionGroupId should have comment (or a comment on this block) or be unexported (golint)
    • Line 41: warning: exported var DefaultDependencyKinds should have comment or be unexported (golint)
    • Line 44: warning: exported type SpringValue should have comment or be unexported (golint)
    • Line 49: warning: exported type SpringOption should have comment or be unexported (golint)
    • Line 56: warning: exported type SpringOptions should have comment or be unexported (golint)
    • Line 62: warning: exported type SpringTreeGroup should have comment or be unexported (golint)
    • Line 67: warning: exported type SpringTreeSelect should have comment or be unexported (golint)
    • Line 72: warning: exported type SpringBootModel should have comment or be unexported (golint)
    • Line 87: warning: exported type SpringBootForm should have comment or be unexported (golint)
    • Line 110: warning: exported function LoadSpringBoot should have comment or be unexported (golint)
    • Line 162: warning: exported method SpringBootModel.CreateSurvey should have comment or be unexported (golint)
    • Line 215: warning: exported method SpringOptions.StringArray should have comment or be unexported (golint)
    • Line 227: warning: exported method SpringTreeSelect.StringArray should have comment or be unexported (golint)
    • Line 241: warning: exported method SpringBootModel.ValidateInput should have comment or be unexported (golint)
    • Line 253: warning: exported method SpringBootModel.ValidateTreeInput should have comment or be unexported (golint)
    • Line 275: warning: exported function CreateValueSelect should have comment or be unexported (golint)
    • Line 288: warning: exported function CreateValueInput should have comment or be unexported (golint)
    • Line 299: warning: exported function CreateSpringTreeSelect should have comment or be unexported (golint)
    • Line 330: warning: exported method SpringBootForm.CreateProject should have comment or be unexported (golint)
    • Line 395: warning: exported method SpringBootForm.AddFormValues should have comment or be unexported (golint)
    • Line 408: warning: exported function AddFormValues should have comment or be unexported (golint)
    • Line 416: warning: exported function AddFormValue should have comment or be unexported (golint)
    • jx-project/pkg/cmd/importcmd/import.go
    • Line 208: warning: exported method ImportOptions.AddImportFlags should have comment or be unexported (golint)
    • Line 1253: warning: exported method ImportOptions.DefaultsFromTeamSettings should have comment or be unexported (golint)
    • Line 1296: warning: receiver name options should be consistent with previous receiver name o for ImportOptions (golint)
    • Line 1314: warning: receiver name options should be consistent with previous receiver name o for ImportOptions (golint)
    • Line 1549: warning: exported method ImportOptions.IsGitHubAppMode should have comment or be unexported (golint)
    • jx-project/pkg/quickstarts/types.go
    • Line 3: warning: exported type Quickstart should have comment or be unexported (golint)
    • Line 16: warning: exported type QuickstartModel should have comment or be unexported (golint)
    • Line 20: warning: exported type QuickstartFilter should have comment or be unexported (golint)
    • Line 30: warning: exported type QuickstartForm should have comment or be unexported (golint)
    • jx-project/pkg/cmd/importcmd/input.go
    • Line 16: warning: exported type CreateRepoData should have comment or be unexported (golint)
    • Line 88: warning: exported method ImportOptions.PickNewOrExistingGitRepository should have comment or be unexported (golint)
    • Line 297: warning: exported method ImportOptions.GetOwner should have comment or be unexported (golint)
    • jx-project/pkg/cmd/importcmd/pack.go
    • Line 26: warning: exported const ChartsDir should have comment (or a comment on this block) or be unexported (golint)
    • Line 156: warning: comment on exported function FromDir should be of the form "FromDir ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words