Preparing report...

Report for github.com/jenkins-x/jx

(v1.3.1119)

A+    Excellent!    Found 202 issues across 848 files

Tweet

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!


gofmt91%

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


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo83%

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.

    • pkg/builds/build_info.go
    • Line 57: warning: cyclomatic complexity 42 of function CreateBuildPodInfo() is high (> 15) (gocyclo)
    • Line 196: warning: cyclomatic complexity 16 of function (*BuildPodInfoFilter).BuildMatches() is high (> 15) (gocyclo)
    • pkg/jx/cmd/create_git_api_token.go
    • Line 81: warning: cyclomatic complexity 17 of function (*CreateGitTokenOptions).Run() is high (> 15) (gocyclo)
    • Line 159: warning: cyclomatic complexity 16 of function (*CreateGitTokenOptions).tryFindAPITokenFromBrowser() is high (> 15) (gocyclo)
    • pkg/jx/cmd/controller_workflow.go
    • Line 455: warning: cyclomatic complexity 52 of function (*ControllerWorkflowOptions).pollGitStatusforPipeline() is high (> 15) (gocyclo)
    • Line 260: warning: cyclomatic complexity 29 of function (*ControllerWorkflowOptions).onActivity() is high (> 15) (gocyclo)
    • pkg/jx/cmd/controller_commitstatus.go
    • Line 205: warning: cyclomatic complexity 38 of function (*ControllerCommitStatusOptions).onPod() is high (> 15) (gocyclo)
    • Line 338: warning: cyclomatic complexity 18 of function (*ControllerCommitStatusOptions).UpsertCommitStatusCheck() is high (> 15) (gocyclo)
    • pkg/pipelinescheduler/builder.go
    • Line 381: warning: cyclomatic complexity 28 of function applyToPresubmits() is high (> 15) (gocyclo)
    • Line 8: warning: cyclomatic complexity 27 of function Build() is high (> 15) (gocyclo)
    • Line 335: warning: cyclomatic complexity 17 of function applyToPostSubmits() is high (> 15) (gocyclo)
    • pkg/jx/cmd/step_create_task.go
    • Line 182: warning: cyclomatic complexity 57 of function (*StepCreateTaskOptions).Run() is high (> 15) (gocyclo)
    • Line 1120: warning: cyclomatic complexity 36 of function (*StepCreateTaskOptions).modifyEnvVars() is high (> 15) (gocyclo)
    • Line 416: warning: cyclomatic complexity 30 of function (*StepCreateTaskOptions).GenerateTektonCRDs() is high (> 15) (gocyclo)
    • Line 1421: warning: cyclomatic complexity 17 of function (*StepCreateTaskOptions).setVersionOnReleasePipelines() is high (> 15) (gocyclo)
    • Line 854: warning: cyclomatic complexity 16 of function (*StepCreateTaskOptions).writeOutput() is high (> 15) (gocyclo)
    • pkg/spring/model.go
    • Line 157: warning: cyclomatic complexity 19 of function (*SpringBootModel).CreateSurvey() is high (> 15) (gocyclo)
    • pkg/jx/cmd/upgrade_ingress.go
    • Line 101: warning: cyclomatic complexity 27 of function (*UpgradeIngressOptions).Run() is high (> 15) (gocyclo)
    • Line 423: warning: cyclomatic complexity 26 of function (*UpgradeIngressOptions).confirmExposecontrollerConfig() is high (> 15) (gocyclo)
    • Line 337: warning: cyclomatic complexity 22 of function (*UpgradeIngressOptions).getExistingIngressRules() is high (> 15) (gocyclo)
    • pkg/surveyutils/jsonschema.go
    • Line 199: warning: cyclomatic complexity 51 of function (*JSONSchemaOptions).recurse() is high (> 15) (gocyclo)
    • Line 543: warning: cyclomatic complexity 38 of function (*JSONSchemaOptions).handleBasicProperty() is high (> 15) (gocyclo)
    • Line 413: warning: cyclomatic complexity 24 of function (*JSONSchemaOptions).handleArrayProperty() is high (> 15) (gocyclo)
    • pkg/jx/cmd/create_jenkins_token.go
    • Line 105: warning: cyclomatic complexity 28 of function (*CreateJenkinsUserOptions).Run() is high (> 15) (gocyclo)
    • Line 221: warning: cyclomatic complexity 17 of function (*CreateJenkinsUserOptions).saveJenkinsAuthInSecret() is high (> 15) (gocyclo)
    • pkg/jx/cmd/get_applications.go
    • Line 147: warning: cyclomatic complexity 26 of function (*GetApplicationsOptions).generateTable() is high (> 15) (gocyclo)
    • Line 245: warning: cyclomatic complexity 24 of function (*GetApplicationsOptions).getAppData() is high (> 15) (gocyclo)
    • pkg/maven/archetype.go
    • Line 217: warning: cyclomatic complexity 22 of function (*ArchetypeModel).CreateSurvey() is high (> 15) (gocyclo)
    • Line 152: warning: cyclomatic complexity 16 of function LoadArchetypes() is high (> 15) (gocyclo)
    • pkg/prow/prow.go
    • Line 242: warning: cyclomatic complexity 19 of function (*Options).AddProwConfig() is high (> 15) (gocyclo)
    • pkg/jx/cmd/opts/git.go
    • Line 84: warning: cyclomatic complexity 18 of function (*CommonOptions).UpdatePipelineGitCredentialsSecret() is high (> 15) (gocyclo)
    • pkg/tekton/pipeline_info.go
    • Line 124: warning: cyclomatic complexity 42 of function CreatePipelineRunInfo() is high (> 15) (gocyclo)
    • Line 306: warning: cyclomatic complexity 17 of function (*StageInfo).SetPodsForStageInfo() is high (> 15) (gocyclo)
    • pkg/jx/cmd/sync.go
    • Line 179: warning: cyclomatic complexity 17 of function (*SyncOptions).CreateKsync() is high (> 15) (gocyclo)
    • pkg/jx/cmd/clients/factory.go
    • Line 181: warning: cyclomatic complexity 21 of function (*factory).CreateJenkinsAuthConfigService() is high (> 15) (gocyclo)
    • Line 321: warning: cyclomatic complexity 16 of function (*factory).AuthMergePipelineSecrets() is high (> 15) (gocyclo)
    • pkg/environments/gitops.go
    • Line 520: warning: cyclomatic complexity 52 of function CreateNestedRequirementDir() is high (> 15) (gocyclo)
    • Line 237: warning: cyclomatic complexity 39 of function (*EnvironmentPullRequestOptions).PullEnvironmentRepo() is high (> 15) (gocyclo)
    • Line 403: warning: cyclomatic complexity 17 of function CreateUpgradeRequirementsFn() is high (> 15) (gocyclo)
    • pkg/jx/cmd/step_bdd.go
    • Line 500: warning: cyclomatic complexity 19 of function (*StepBDDOptions).createCluster() is high (> 15) (gocyclo)
    • Line 172: warning: cyclomatic complexity 16 of function (*StepBDDOptions).runOnCurrentCluster() is high (> 15) (gocyclo)
    • pkg/jx/cmd/delete_application.go
    • Line 134: warning: cyclomatic complexity 16 of function (*DeleteApplicationOptions).deleteProwApplication() is high (> 15) (gocyclo)
    • Line 198: warning: cyclomatic complexity 16 of function (*DeleteApplicationOptions).deleteJenkinsApplication() is high (> 15) (gocyclo)
    • pkg/cve/anchore.go
    • Line 74: warning: cyclomatic complexity 18 of function (AnchoreProvider).GetImageVulnerabilityTable() is high (> 15) (gocyclo)
    • pkg/jx/cmd/controller_build.go
    • Line 709: warning: cyclomatic complexity 53 of function updateForStage() is high (> 15) (gocyclo)
    • Line 438: warning: cyclomatic complexity 40 of function (*ControllerBuildOptions).updatePipelineActivity() is high (> 15) (gocyclo)
    • Line 592: warning: cyclomatic complexity 30 of function (*ControllerBuildOptions).updatePipelineActivityForRun() is high (> 15) (gocyclo)
    • Line 236: warning: cyclomatic complexity 18 of function (*ControllerBuildOptions).onPipelinePod() is high (> 15) (gocyclo)
    • pkg/jx/cmd/controller_workflow_integration_test.go
    • Line 363: warning: cyclomatic complexity 22 of function TestParallelWorkflow() is high (> 15) (gocyclo)
    • Line 26: warning: cyclomatic complexity 17 of function TestSequentialWorkflow() is high (> 15) (gocyclo)
    • Line 558: warning: cyclomatic complexity 17 of function TestNewVersionWhileExistingWorkflow() is high (> 15) (gocyclo)
    • pkg/jx/cmd/preview.go
    • Line 145: warning: cyclomatic complexity 93 of function (*PreviewOptions).Run() is high (> 15) (gocyclo)
    • Line 692: warning: cyclomatic complexity 30 of function (*PreviewOptions).defaultValues() is high (> 15) (gocyclo)
    • pkg/jx/cmd/import.go
    • Line 200: warning: cyclomatic complexity 57 of function (*ImportOptions).Run() is high (> 15) (gocyclo)
    • Line 463: warning: cyclomatic complexity 20 of function (*ImportOptions).DraftCreate() is high (> 15) (gocyclo)
    • Line 620: warning: cyclomatic complexity 18 of function (*ImportOptions).CreateNewRemoteRepository() is high (> 15) (gocyclo)
    • Line 746: warning: cyclomatic complexity 17 of function (*ImportOptions).DiscoverGit() is high (> 15) (gocyclo)
    • Line 1295: warning: cyclomatic complexity 16 of function (*ImportOptions).fixMaven() is high (> 15) (gocyclo)
    • pkg/jx/cmd/upgrade_extensions.go
    • Line 83: warning: cyclomatic complexity 43 of function (*UpgradeExtensionsOptions).Run() is high (> 15) (gocyclo)
    • Line 271: warning: cyclomatic complexity 19 of function (*UpgradeExtensionsOptions).UpsertExtension() is high (> 15) (gocyclo)
    • pkg/jx/cmd/upgrade_extensions_repository.go
    • Line 198: warning: cyclomatic complexity 29 of function (*UpgradeExtensionsRepositoryOptions).walkRemote() is high (> 15) (gocyclo)
    • Line 98: warning: cyclomatic complexity 23 of function (*UpgradeExtensionsRepositoryOptions).Run() is high (> 15) (gocyclo)
    • pkg/kube/metrics.go
    • Line 24: warning: cyclomatic complexity 16 of function (*HeapterConfig).GetPodMetrics() is high (> 15) (gocyclo)
    • pkg/jx/cmd/install.go
    • Line 397: warning: cyclomatic complexity 52 of function (*InstallOptions).Run() is high (> 15) (gocyclo)
    • Line 1142: warning: cyclomatic complexity 29 of function (*InstallOptions).configureGitAuth() is high (> 15) (gocyclo)
    • Line 2072: warning: cyclomatic complexity 23 of function (*InstallOptions).createSystemVault() is high (> 15) (gocyclo)
    • Line 703: warning: cyclomatic complexity 22 of function (*InstallOptions).init() is high (> 15) (gocyclo)
    • Line 842: warning: cyclomatic complexity 21 of function (*InstallOptions).installPlatformGitOpsMode() is high (> 15) (gocyclo)
    • Line 1527: warning: cyclomatic complexity 20 of function (*InstallOptions).generateGitOpsDevEnvironmentConfig() is high (> 15) (gocyclo)
    • Line 2015: warning: cyclomatic complexity 17 of function (*InstallOptions).configureKaniko() is high (> 15) (gocyclo)
    • pkg/tekton/syntax/pipeline.go
    • Line 793: warning: cyclomatic complexity 30 of function stageToTask() is high (> 15) (gocyclo)
    • Line 969: warning: cyclomatic complexity 19 of function generateSteps() is high (> 15) (gocyclo)
    • Line 317: warning: cyclomatic complexity 19 of function validateStage() is high (> 15) (gocyclo)
    • Line 231: warning: cyclomatic complexity 17 of function MangleToRfc1035Label() is high (> 15) (gocyclo)
    • pkg/jx/cmd/opts/helm.go
    • Line 77: warning: cyclomatic complexity 29 of function (*CommonOptions).InitHelm() is high (> 15) (gocyclo)
    • Line 591: warning: cyclomatic complexity 17 of function (*CommonOptions).AddChartRepos() is high (> 15) (gocyclo)
    • pkg/jx/cmd/create_env.go
    • Line 125: warning: cyclomatic complexity 28 of function (*CreateEnvOptions).Run() is high (> 15) (gocyclo)
    • Line 256: warning: cyclomatic complexity 19 of function (*CreateEnvOptions).RegisterEnvironment() is high (> 15) (gocyclo)
    • pkg/kube/env.go
    • Line 35: warning: cyclomatic complexity 45 of function CreateEnvironmentSurvey() is high (> 15) (gocyclo)
    • Line 349: warning: cyclomatic complexity 37 of function createEnvironmentGitRepo() is high (> 15) (gocyclo)
    • Line 514: warning: cyclomatic complexity 24 of function ModifyNamespace() is high (> 15) (gocyclo)
    • Line 260: warning: cyclomatic complexity 21 of function CreateEnvGitRepository() is high (> 15) (gocyclo)
    • pkg/jx/cmd/opts/pod.go
    • Line 44: warning: cyclomatic complexity 17 of function (*CommonOptions).WaitForReadyKnativeBuildPod() is high (> 15) (gocyclo)
    • Line 98: warning: cyclomatic complexity 17 of function (*CommonOptions).WaitForReadyPodForSelector() is high (> 15) (gocyclo)
    • pkg/gits/github.go
    • Line 500: warning: cyclomatic complexity 24 of function (*GitHubProvider).updatePullRequest() is high (> 15) (gocyclo)
    • Line 884: warning: cyclomatic complexity 17 of function (*GitHubProvider).UpdateRelease() is high (> 15) (gocyclo)
    • pkg/jx/cmd/promote.go
    • Line 574: warning: cyclomatic complexity 41 of function (*PromoteOptions).waitForGitOpsPullRequest() is high (> 15) (gocyclo)
    • Line 902: warning: cyclomatic complexity 34 of function (*PromoteOptions).commentOnIssues() is high (> 15) (gocyclo)
    • Line 164: warning: cyclomatic complexity 29 of function (*PromoteOptions).Run() is high (> 15) (gocyclo)
    • Line 328: warning: cyclomatic complexity 29 of function (*PromoteOptions).Promote() is high (> 15) (gocyclo)
    • Line 802: warning: cyclomatic complexity 26 of function (*PromoteOptions).createPromoteKey() is high (> 15) (gocyclo)
    • pkg/jx/cmd/opts/install.go
    • Line 256: warning: cyclomatic complexity 30 of function (*CommonOptions).InstallOrUpdateBinary() is high (> 15) (gocyclo)
    • Line 87: warning: cyclomatic complexity 30 of function (*CommonOptions).DoInstallMissingDependencies() is high (> 15) (gocyclo)
    • Line 1587: warning: cyclomatic complexity 27 of function (*CommonOptions).InstallProw() is high (> 15) (gocyclo)
    • Line 1111: warning: cyclomatic complexity 26 of function (*CommonOptions).InstallJx() is high (> 15) (gocyclo)
    • Line 479: warning: cyclomatic complexity 18 of function (*CommonOptions).InstallOc() is high (> 15) (gocyclo)
    • pkg/jx/cmd/step_changelog.go
    • Line 191: warning: cyclomatic complexity 71 of function (*StepChangelogOptions).Run() is high (> 15) (gocyclo)
    • Line 562: warning: cyclomatic complexity 19 of function (*StepChangelogOptions).addIssuesAndPullRequests() is high (> 15) (gocyclo)
    • pkg/jx/cmd/init.go
    • Line 407: warning: cyclomatic complexity 39 of function (*InitOptions).initIngress() is high (> 15) (gocyclo)
    • pkg/jx/cmd/create_terraform.go
    • Line 790: warning: cyclomatic complexity 36 of function (*CreateTerraformOptions).configureGKECluster() is high (> 15) (gocyclo)
    • Line 501: warning: cyclomatic complexity 30 of function (*CreateTerraformOptions).createOrganisationGitRepo() is high (> 15) (gocyclo)
    • Line 108: warning: cyclomatic complexity 21 of function (GKECluster).CreateTfVarsFile() is high (> 15) (gocyclo)
    • Line 1005: warning: cyclomatic complexity 20 of function (*CreateTerraformOptions).applyTerraformGKE() is high (> 15) (gocyclo)
    • pkg/gits/git_repo.go
    • Line 44: warning: cyclomatic complexity 28 of function PickNewOrExistingGitRepository() is high (> 15) (gocyclo)
    • pkg/kube/crds.go
    • Line 28: warning: cyclomatic complexity 18 of function RegisterAllCRDs() is high (> 15) (gocyclo)
    • pkg/jx/cmd/get_build_logs.go
    • Line 230: warning: cyclomatic complexity 49 of function (*GetBuildLogsOptions).getProwBuildLog() is high (> 15) (gocyclo)
    • Line 109: warning: cyclomatic complexity 18 of function (*GetBuildLogsOptions).Run() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!