Preparing report...

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

A+    Excellent!    Found 58 issues across 163 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!


gocyclo93%

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.


golint71%

Golint is a linter for Go source code.

    • jx-helpers/pkg/files/unzip.go
    • Line 12: warning: comment on exported function Unzip should be of the form "Unzip ..." (golint)
    • Line 30: warning: comment on exported function UnzipSpecificFiles should be of the form "UnzipSpecificFiles ..." (golint)
    • jx-helpers/pkg/kube/constants.go
    • Line 18: warning: comment on exported const ChartPipelineEvent should be of the form "ChartPipelineEvent ..." (golint)
    • Line 26: warning: exported const ChartFlaggerGrafana should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: comment on exported const ChartKnativeBuild should be of the form "ChartKnativeBuild ..." (golint)
    • Line 59: warning: comment on exported const ChartSsoOperator should be of the form "ChartSsoOperator ..." (golint)
    • Line 69: warning: comment on exported const ChartOwnerExternalDNS should be of the form "ChartOwnerExternalDNS ..." (golint)
    • Line 201: warning: comment on exported const ValueKindPipelineEvent should be of the form "ValueKindPipelineEvent ..." (golint)
    • Line 210: warning: comment on exported const ValueKindRelease should be of the form "ValueKindRelease ..." (golint)
    • Line 267: warning: comment on exported const ValueJobKindPostPreview should be of the form "ValueJobKindPostPreview ..." (golint)
    • jx-helpers/pkg/helmer/fake.go
    • Line 20: warning: exported method FakeHelmer.SetCWD should have comment or be unexported (golint)
    • Line 24: warning: exported method FakeHelmer.HelmBinary should have comment or be unexported (golint)
    • Line 28: warning: exported method FakeHelmer.AddRepo should have comment or be unexported (golint)
    • Line 33: warning: exported method FakeHelmer.RemoveRepo should have comment or be unexported (golint)
    • Line 38: warning: exported method FakeHelmer.ListRepos should have comment or be unexported (golint)
    • Line 42: warning: exported method FakeHelmer.UpdateRepo should have comment or be unexported (golint)
    • Line 46: warning: exported method FakeHelmer.IsRepoMissing should have comment or be unexported (golint)
    • Line 55: warning: exported method FakeHelmer.RemoveRequirementsLock should have comment or be unexported (golint)
    • Line 59: warning: exported method FakeHelmer.BuildDependency should have comment or be unexported (golint)
    • Line 63: warning: exported method FakeHelmer.InstallChart should have comment or be unexported (golint)
    • Line 68: warning: exported method FakeHelmer.UpgradeChart should have comment or be unexported (golint)
    • Line 73: warning: exported method FakeHelmer.FetchChart should have comment or be unexported (golint)
    • Line 78: warning: exported method FakeHelmer.DeleteRelease should have comment or be unexported (golint)
    • Line 82: warning: exported method FakeHelmer.ListReleases should have comment or be unexported (golint)
    • Line 86: warning: exported method FakeHelmer.FindChart should have comment or be unexported (golint)
    • Line 90: warning: exported method FakeHelmer.PackageChart should have comment or be unexported (golint)
    • Line 94: warning: exported method FakeHelmer.StatusRelease should have comment or be unexported (golint)
    • Line 98: warning: exported method FakeHelmer.StatusReleaseWithOutput should have comment or be unexported (golint)
    • Line 102: warning: exported method FakeHelmer.Lint should have comment or be unexported (golint)
    • Line 106: warning: exported method FakeHelmer.Version should have comment or be unexported (golint)
    • Line 110: warning: exported method FakeHelmer.SearchCharts should have comment or be unexported (golint)
    • Line 117: warning: exported method FakeHelmer.Env should have comment or be unexported (golint)
    • Line 121: warning: exported method FakeHelmer.DecryptSecrets should have comment or be unexported (golint)
    • Line 125: warning: exported method FakeHelmer.Template should have comment or be unexported (golint)
    • jx-helpers/pkg/gitclient/loadcreds/loadcreds.go
    • Line 28: warning: exported const BootSecretName should have comment (or a comment on this block) or be unexported (golint)
    • Line 89: warning: comment on exported function LoadGitCredential should be of the form "LoadGitCredential ..." (golint)
    • Line 106: warning: comment on exported function LoadGitCredentialsFile should be of the form "LoadGitCredentialsFile ..." (golint)
    • jx-helpers/pkg/kube/activities/activity.go
    • Line 31: warning: exported type PipelineActivityKey should have comment or be unexported (golint)
    • Line 49: warning: exported method PipelineActivityKey.IsValid should have comment or be unexported (golint)
    • Line 61: warning: exported type PromoteStepActivityKey should have comment or be unexported (golint)
    • Line 68: warning: exported type PromotePullRequestFn should have comment or be unexported (golint)
    • Line 69: warning: exported type PromoteUpdateFn should have comment or be unexported (golint)
    • Line 71: warning: exported type PipelineDetails should have comment or be unexported (golint)
    • Line 240: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • jx-helpers/pkg/helmer/helpers.go
    • Line 353: warning: exported function LoadChartName should have comment or be unexported (golint)
    • Line 361: warning: exported function LoadChartNameAndVersion should have comment or be unexported (golint)
    • Line 395: warning: exported function AppendMyValues should have comment or be unexported (golint)
    • Line 524: warning: exported type InstallChartOptions should have comment or be unexported (golint)
    • jx-helpers/pkg/gitclient/giturl/token_urls.go
    • Line 21: warning: exported function ProviderAccessTokenURL should have comment or be unexported (golint)
    • Line 37: warning: exported function BitBucketCloudAccessTokenURL should have comment or be unexported (golint)
    • Line 64: warning: exported function GitHubAccessTokenURL should have comment or be unexported (golint)
    • jx-helpers/pkg/kube/jxenv/namespaces.go
    • Line 17: warning: exported function EnsureEnvironmentNamespaceSetup should have comment or be unexported (golint)
    • Line 183: warning: comment on exported function EnsureNamespaceCreated should be of the form "EnsureNamespaceCreated ..." (golint)
    • Line 230: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • jx-helpers/pkg/cobras/templates/templater.go
    • Line 31: warning: exported type FlagExposer should have comment or be unexported (golint)
    • Line 35: warning: exported function UseOptionsTemplates should have comment or be unexported (golint)
    • Line 132: warning: receiver name t should be consistent with previous receiver name templater for templater (golint)
    • Line 144: warning: receiver name t should be consistent with previous receiver name templater for templater (golint)
    • Line 189: warning: receiver name t should be consistent with previous receiver name templater for templater (golint)
    • Line 193: warning: receiver name t should be consistent with previous receiver name templater for templater (golint)
    • Line 197: warning: receiver name t should be consistent with previous receiver name templater for templater (golint)
    • Line 206: warning: receiver name t should be consistent with previous receiver name templater for templater (golint)
    • Line 216: warning: receiver name t should be consistent with previous receiver name templater for templater (golint)
    • Line 230: warning: receiver name t should be consistent with previous receiver name templater for templater (golint)
    • jx-helpers/pkg/scmhelpers/repo_factory.go
    • Line 17: warning: exported type CreateRepository should have comment or be unexported (golint)
    • Line 123: warning: exported method CreateRepository.FullName should have comment or be unexported (golint)
    • Line 127: warning: exported function IsScmNotFound should have comment or be unexported (golint)
    • Line 136: warning: exported function IsScmResponseNotFound should have comment or be unexported (golint)
    • jx-helpers/pkg/gitclient/giturl/repo.go
    • Line 10: warning: exported type GitRepository should have comment or be unexported (golint)
    • Line 33: warning: exported method GitRepository.IsGitHub should have comment or be unexported (golint)
    • Line 106: warning: exported method GitRepository.HostURLWithoutUser should have comment or be unexported (golint)
    • jx-helpers/pkg/kube/jxenv/env.go
    • Line 73: warning: exported function IsPreviewEnvironment should have comment or be unexported (golint)
    • Line 166: warning: comment on exported function GetEnvironmentNamespace should be of the form "GetEnvironmentNamespace ..." (golint)
    • Line 235: warning: exported type ByOrder should have comment or be unexported (golint)
    • Line 250: warning: exported function SortEnvironments should have comment or be unexported (golint)
    • Line 295: warning: comment on exported function NewPermanentEnvironmentWithGit should be of the form "NewPermanentEnvironmentWithGit ..." (golint)
    • jx-helpers/pkg/table/padding.go
    • Line 10: warning: exported const ALIGN_LEFT should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported function Pad should have comment or be unexported (golint)
    • Line 26: warning: exported function PadRight should have comment or be unexported (golint)
    • Line 34: warning: exported function PadLeft should have comment or be unexported (golint)
    • Line 42: warning: exported function PadCenter should have comment or be unexported (golint)
    • jx-helpers/pkg/files/tar.go
    • Line 12: warning: comment on exported function UnTargz should be of the form "UnTargz ..." (golint)
    • Line 58: warning: comment on exported function UnTargzAll should be of the form "UnTargzAll ..." (golint)
    • jx-helpers/pkg/downloads/downloads.go
    • Line 22: warning: comment on exported function DownloadFile should be of the form "DownloadFile ..." (golint)
    • Line 66: warning: comment on exported function UnTargz should be of the form "UnTargz ..." (golint)
    • Line 112: warning: comment on exported function UnTargzAll should be of the form "UnTargzAll ..." (golint)
    • jx-helpers/pkg/options/helpers.go
    • Line 26: warning: exported function InvalidOption should have comment or be unexported (golint)
    • Line 38: warning: exported function InvalidArg should have comment or be unexported (golint)
    • Line 50: warning: exported function InvalidArgError should have comment or be unexported (golint)
    • Line 54: warning: exported function InvalidArgf should have comment or be unexported (golint)
    • Line 99: warning: exported function SuggestionsFor should have comment or be unexported (golint)
    • jx-helpers/pkg/files/files.go
    • Line 26: warning: exported const MaximumNewDirectoryAttempts should have comment (or a comment on this block) or be unexported (golint)
    • Line 75: warning: exported function IsEmpty should have comment or be unexported (golint)
    • Line 113: warning: exported function RenameDir should have comment or be unexported (golint)
    • Line 125: warning: exported function RenameFile should have comment or be unexported (golint)
    • Line 152: warning: comment on exported function CopyDir should be of the form "CopyDir ..." (golint)
    • Line 212: warning: comment on exported function CopyFile should be of the form "CopyFile ..." (golint)
    • Line 359: warning: comment on exported function LoadBytes should be of the form "LoadBytes ..." (golint)
    • Line 428: warning: exported function DeleteDirContentsExcept should have comment or be unexported (golint)
    • Line 445: warning: comment on exported function RecreateDirs should be of the form "RecreateDirs ..." (golint)
    • jx-helpers/pkg/kube/activities/activity_functions.go
    • Line 11: warning: exported function StartPromote should have comment or be unexported (golint)
    • Line 23: warning: exported function CompletePromote should have comment or be unexported (golint)
    • Line 37: warning: exported function FailedPromote should have comment or be unexported (golint)
    • Line 51: warning: exported function StartPromotionPullRequest should have comment or be unexported (golint)
    • Line 70: warning: exported function StartPromotionUpdate should have comment or be unexported (golint)
    • Line 96: warning: exported function CompletePromotionPullRequest should have comment or be unexported (golint)
    • Line 111: warning: exported function FailedPromotionPullRequest should have comment or be unexported (golint)
    • Line 126: warning: exported function CompletePromotionUpdate should have comment or be unexported (golint)
    • Line 152: warning: exported function FailedPromotionUpdate should have comment or be unexported (golint)
    • jx-helpers/pkg/kube/runtime_objects.go
    • Line 12: warning: exported type ByName should have comment or be unexported (golint)
    • Line 27: warning: exported function SortRuntimeObjectsByName should have comment or be unexported (golint)
    • Line 31: warning: exported function SortListWatchByName should have comment or be unexported (golint)
    • jx-helpers/pkg/kube/services/services.go
    • Line 28: warning: exported const ExposeAnnotation should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported type ServiceURL should have comment or be unexported (golint)
    • Line 44: warning: exported function GetServices should have comment or be unexported (golint)
    • Line 75: warning: exported function GetServiceNames should have comment or be unexported (golint)
    • Line 91: warning: exported function GetServiceURLFromMap should have comment or be unexported (golint)
    • Line 95: warning: exported function FindServiceURL should have comment or be unexported (golint)
    • Line 134: warning: exported function FindIngressURL should have comment or be unexported (golint)
    • Line 216: warning: exported function FindServiceHostname should have comment or be unexported (golint)
    • Line 294: warning: exported function GetServiceURLFromName should have comment or be unexported (golint)
    • Line 298: warning: exported function FindServiceURLs should have comment or be unexported (golint)
    • Line 373: warning: exported function HasExternalAddress should have comment or be unexported (golint)
    • Line 382: warning: exported function CreateServiceLink should have comment or be unexported (golint)
    • Line 406: warning: exported function DeleteService should have comment or be unexported (golint)
    • Line 410: warning: exported function GetService should have comment or be unexported (golint)
    • Line 428: warning: exported function IsServicePresent should have comment or be unexported (golint)
    • Line 539: warning: exported function CleanServiceAnnotations should have comment or be unexported (golint)
    • jx-helpers/pkg/kube/pods/pod.go
    • Line 103: warning: comment on exported function IsPodReadyConditionTrue should be of the form "IsPodReadyConditionTrue ..." (golint)
    • Line 110: warning: exported function PodStatus should have comment or be unexported (golint)
    • Line 327: warning: exported function GetPodNames should have comment or be unexported (golint)
    • Line 343: warning: exported function GetPods should have comment or be unexported (golint)
    • Line 362: warning: exported function GetPodsWithLabels should have comment or be unexported (golint)
    • Line 429: warning: exported function GetFirstPodForService should have comment or be unexported (golint)
    • jx-helpers/pkg/table/table.go
    • Line 11: warning: exported type Table should have comment or be unexported (golint)
    • Line 19: warning: exported function CreateTable should have comment or be unexported (golint)
    • Line 36: warning: exported method Table.Render should have comment or be unexported (golint)
    • jx-helpers/pkg/input/fake/fake.go
    • Line 56: warning: exported method FakeInput.SelectNamesWithFilter should have comment or be unexported (golint)
    • Line 60: warning: exported method FakeInput.SelectNames should have comment or be unexported (golint)
    • Line 68: warning: exported method FakeInput.Confirm should have comment or be unexported (golint)
    • jx-helpers/pkg/cobras/templates/command_groups.go
    • Line 24: warning: exported type CommandGroup should have comment or be unexported (golint)
    • Line 29: warning: exported type CommandGroups should have comment or be unexported (golint)
    • Line 31: warning: exported method CommandGroups.Add should have comment or be unexported (golint)
    • Line 41: warning: exported method CommandGroups.Has should have comment or be unexported (golint)
    • Line 52: warning: exported function AddAdditionalCommands should have comment or be unexported (golint)
    • jx-helpers/pkg/cobras/templates/markdown.go
    • Line 100: warning: exported method ASCIIRenderer.GetFlags should have comment or be unexported (golint)
    • Line 101: warning: exported method ASCIIRenderer.HRule should have comment or be unexported (golint)
    • Line 104: warning: exported method ASCIIRenderer.LineBreak should have comment or be unexported (golint)
    • Line 105: warning: exported method ASCIIRenderer.TitleBlock should have comment or be unexported (golint)
    • Line 106: warning: exported method ASCIIRenderer.Header should have comment or be unexported (golint)
    • Line 107: warning: exported method ASCIIRenderer.BlockHtml should have comment or be unexported (golint)
    • Line 108: warning: exported method ASCIIRenderer.BlockQuote should have comment or be unexported (golint)
    • Line 109: warning: exported method ASCIIRenderer.TableRow should have comment or be unexported (golint)
    • Line 110: warning: exported method ASCIIRenderer.TableHeaderCell should have comment or be unexported (golint)
    • Line 111: warning: exported method ASCIIRenderer.TableCell should have comment or be unexported (golint)
    • Line 112: warning: exported method ASCIIRenderer.Footnotes should have comment or be unexported (golint)
    • Line 113: warning: exported method ASCIIRenderer.FootnoteItem should have comment or be unexported (golint)
    • Line 116: warning: exported method ASCIIRenderer.AutoLink should have comment or be unexported (golint)
    • Line 117: warning: exported method ASCIIRenderer.CodeSpan should have comment or be unexported (golint)
    • Line 118: warning: exported method ASCIIRenderer.DoubleEmphasis should have comment or be unexported (golint)
    • Line 119: warning: exported method ASCIIRenderer.Emphasis should have comment or be unexported (golint)
    • Line 120: warning: exported method ASCIIRenderer.RawHtmlTag should have comment or be unexported (golint)
    • Line 121: warning: exported method ASCIIRenderer.TripleEmphasis should have comment or be unexported (golint)
    • Line 122: warning: exported method ASCIIRenderer.StrikeThrough should have comment or be unexported (golint)
    • Line 123: warning: exported method ASCIIRenderer.FootnoteRef should have comment or be unexported (golint)
    • Line 124: warning: exported method ASCIIRenderer.Entity should have comment or be unexported (golint)
    • Line 125: warning: exported method ASCIIRenderer.Smartypants should have comment or be unexported (golint)
    • Line 126: warning: exported method ASCIIRenderer.DocumentHeader should have comment or be unexported (golint)
    • Line 127: warning: exported method ASCIIRenderer.DocumentFooter should have comment or be unexported (golint)
    • Line 128: warning: exported method ASCIIRenderer.TocHeaderWithAnchor should have comment or be unexported (golint)
    • Line 129: warning: exported method ASCIIRenderer.TocHeader should have comment or be unexported (golint)
    • Line 130: warning: exported method ASCIIRenderer.TocFinalize should have comment or be unexported (golint)
    • Line 132: warning: exported method ASCIIRenderer.Table should have comment or be unexported (golint)
    • Line 136: warning: exported method ASCIIRenderer.Link should have comment or be unexported (golint)
    • Line 140: warning: exported method ASCIIRenderer.Image should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words