Preparing report...

Report for github.com/IBM/multicloud-operators-subscription

A+    Excellent!    Found 43 issues across 120 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!


gocyclo88%

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.

    • multicloud-operators-subscription/pkg/utils/gitrepo.go
    • Line 156: warning: cyclomatic complexity 19 of function CloneGitRepo() is high (> 15) (gocyclo)
    • Line 716: warning: cyclomatic complexity 17 of function IsClusterAdmin() is high (> 15) (gocyclo)
    • Line 546: warning: cyclomatic complexity 17 of function SortResources() is high (> 15) (gocyclo)
    • Line 637: warning: cyclomatic complexity 16 of function sortKubeResource() is high (> 15) (gocyclo)

golint68%

Golint is a linter for Go source code.

    • multicloud-operators-subscription/pkg/utils/gitrepo.go
    • Line 74: warning: comment on exported type KubeResource should be of the form "KubeResource ..." (with optional leading article) (golint)
    • Line 79: warning: exported type GitCloneOption should have comment or be unexported (golint)
    • Line 103: warning: exported type Kube should have comment or be unexported (golint)
    • Line 105: warning: exported function KubeResourceParser should have comment or be unexported (golint)
    • Line 440: warning: exported function GetSubscriptionBranchRef should have comment or be unexported (golint)
    • Line 485: warning: comment on exported function GetChannelConfigMap should be of the form "GetChannelConfigMap ..." (golint)
    • Line 505: warning: exported function ParseChannelSecret should have comment or be unexported (golint)
    • Line 543: warning: exported type SkipFunc should have comment or be unexported (golint)
    • Line 684: warning: exported function SkipHooksOnManaged should have comment or be unexported (golint)
    • Line 716: warning: exported function IsClusterAdmin should have comment or be unexported (golint)
    • Line 829: warning: exported function GetLatestCommitID should have comment or be unexported (golint)
    • Line 851: warning: exported function ParseYAML should have comment or be unexported (golint)
    • multicloud-operators-subscription/pkg/utils/subscription.go
    • Line 65: warning: exported function IsSubscriptionResourceChanged should have comment or be unexported (golint)
    • Line 91: warning: exported function IsSubscriptionBasicChanged should have comment or be unexported (golint)
    • Line 158: warning: comment on exported function FilterOutTimeRelatedFields should be of the form "FilterOutTimeRelatedFields ..." (golint)
    • Line 226: warning: exported function IsHubRelatedStatusChanged should have comment or be unexported (golint)
    • Line 487: warning: exported function IsEqualSubScriptionStatus should have comment or be unexported (golint)
    • Line 663: warning: exported function SkipOrUpdateSubscriptionStatus should have comment or be unexported (golint)
    • Line 780: warning: comment on exported function CanPassPackageFilter should be of the form "CanPassPackageFilter ..." (golint)
    • Line 966: warning: comment on exported function RemoveSubOwnerRef should be of the form "RemoveSubOwnerRef ..." (golint)
    • Line 986: warning: exported function IsSubscriptionBeDeleted should have comment or be unexported (golint)
    • Line 1099: warning: exported function SetPartOfLabel should have comment or be unexported (golint)
    • Line 1106: warning: exported function AddPartOfLabel should have comment or be unexported (golint)
    • multicloud-operators-subscription/pkg/controller/subscription/reference.go
    • Line 35: warning: exported var SecretKindStr should have comment or be unexported (golint)
    • Line 36: warning: exported var ConfigMapKindStr should have comment or be unexported (golint)
    • Line 37: warning: exported var SubscriptionGVK should have comment or be unexported (golint)
    • Line 60: warning: exported method ReconcileSubscription.ListAndDeployReferredObject should have comment or be unexported (golint)
    • Line 169: warning: exported method ReconcileSubscription.DeleteReferredObjects should have comment or be unexported (golint)
    • multicloud-operators-subscription/pkg/synchronizer/kubernetes/sync_client.go
    • Line 33: warning: exported type DplUnit should have comment or be unexported (golint)
    • Line 45: warning: exported type SyncSource should have comment or be unexported (golint)
    • Line 54: warning: exported method KubeSynchronizer.GetInterval should have comment or be unexported (golint)
    • Line 58: warning: exported method KubeSynchronizer.GetLocalClient should have comment or be unexported (golint)
    • Line 111: warning: exported method KubeSynchronizer.IsResourceNamespaced should have comment or be unexported (golint)
    • Line 115: warning: exported method KubeSynchronizer.AddTemplates should have comment or be unexported (golint)
    • multicloud-operators-subscription/pkg/controller/mcmhub/hub_git.go
    • Line 46: warning: exported type GitOps should have comment or be unexported (golint)
    • Line 86: warning: exported type RepoRegistery should have comment or be unexported (golint)
    • Line 91: warning: exported type GetCommitFunc should have comment or be unexported (golint)
    • Line 97: warning: exported type HubGitOps should have comment or be unexported (golint)
    • Line 111: warning: exported type HubGitOption should have comment or be unexported (golint)
    • Line 143: warning: exported function NewHookGit should have comment or be unexported (golint)
    • Line 162: warning: comment on exported method HubGitOps.Start should be of the form "Start ..." (golint)
    • Line 174: warning: exported method HubGitOps.GitWatch should have comment or be unexported (golint)
    • Line 247: warning: comment on exported method HubGitOps.GetSubRecords should be of the form "GetSubRecords ..." (golint)
    • Line 252: warning: comment on exported method HubGitOps.GetRepoRecords should be of the form "GetRepoRecords ..." (golint)
    • Line 346: warning: exported method HubGitOps.ResolveLocalGitFolder should have comment or be unexported (golint)
    • Line 350: warning: exported method HubGitOps.RegisterBranch should have comment or be unexported (golint)
    • Line 510: warning: exported method HubGitOps.DeregisterBranch should have comment or be unexported (golint)
    • Line 540: warning: exported function GetLatestRemoteGitCommitID should have comment or be unexported (golint)
    • Line 549: warning: exported method HubGitOps.GetLatestCommitID should have comment or be unexported (golint)
    • Line 567: warning: exported method HubGitOps.GetRepoRootDirctory should have comment or be unexported (golint)
    • Line 578: warning: exported method HubGitOps.DownloadAnsibleHookResource should have comment or be unexported (golint)
    • Line 701: warning: exported method HubGitOps.HasHookFolders should have comment or be unexported (golint)
    • multicloud-operators-subscription/pkg/controller/mcmhub/hook.go
    • Line 44: warning: exported const PrehookDirSuffix should have comment (or a comment on this block) or be unexported (golint)
    • Line 87: warning: exported type Hooks should have comment or be unexported (golint)
    • Line 96: warning: exported method Hooks.ConstructStatus should have comment or be unexported (golint)
    • Line 134: warning: exported type AnsibleHooks should have comment or be unexported (golint)
    • Line 149: warning: exported type HookOps should have comment or be unexported (golint)
    • Line 163: warning: exported function NewAnsibleHooks should have comment or be unexported (golint)
    • Line 179: warning: exported type AppliedInstance should have comment or be unexported (golint)
    • Line 184: warning: exported method AnsibleHooks.GetLastAppliedInstance should have comment or be unexported (golint)
    • Line 199: warning: exported method AnsibleHooks.ResetGitOps should have comment or be unexported (golint)
    • Line 203: warning: exported method AnsibleHooks.AppendStatusToSubscription should have comment or be unexported (golint)
    • Line 218: warning: exported method AnsibleHooks.AppendPreHookStatusToSubscription should have comment or be unexported (golint)
    • Line 233: warning: exported method AnsibleHooks.SetSuffixFunc should have comment or be unexported (golint)
    • Line 241: warning: exported method AnsibleHooks.DeregisterSubscription should have comment or be unexported (golint)
    • Line 250: warning: exported method AnsibleHooks.RegisterSubscription should have comment or be unexported (golint)
    • Line 304: warning: exported type SuffixFunc should have comment or be unexported (golint)
    • Line 398: warning: exported function GetReferenceString should have comment or be unexported (golint)
    • Line 483: warning: exported method AnsibleHooks.ApplyPreHooks should have comment or be unexported (golint)
    • Line 493: warning: exported type EqualSub should have comment or be unexported (golint)
    • Line 536: warning: exported method AnsibleHooks.IsPreHooksCompleted should have comment or be unexported (golint)
    • Line 550: warning: exported method AnsibleHooks.HasHooks should have comment or be unexported (golint)
    • Line 575: warning: exported method AnsibleHooks.ApplyPostHooks should have comment or be unexported (golint)
    • Line 584: warning: exported method AnsibleHooks.IsPostHooksCompleted should have comment or be unexported (golint)
    • Line 611: warning: comment on exported function GetClustersByPlacement should be of the form "GetClustersByPlacement ..." (golint)
    • multicloud-operators-subscription/pkg/utils/helmrepo.go
    • Line 47: warning: exported function GetPackageAlias should have comment or be unexported (golint)
    • Line 100: warning: exported function CreateOrUpdateHelmChart should have comment or be unexported (golint)
    • Line 220: warning: exported function Override should have comment or be unexported (golint)
    • Line 271: warning: exported function PkgToReleaseCRName should have comment or be unexported (golint)
    • Line 290: warning: exported function CreateHelmCRDeployable should have comment or be unexported (golint)
    • multicloud-operators-subscription/pkg/utils/aws/objectstore.go
    • Line 49: warning: comment on exported const DeployableGenerateNameMeta should be of the form "DeployableGenerateNameMeta ..." (golint)
    • Line 51: warning: comment on exported const DployableMateGenerateNameKey should be of the form "DployableMateGenerateNameKey ..." (golint)
    • Line 53: warning: comment on exported const DeployableVersionMeta should be of the form "DeployableVersionMeta ..." (golint)
    • Line 55: warning: comment on exported const DeployableMetaVersionKey should be of the form "DeployableMetaVersionKey ..." (golint)
    • Line 79: warning: exported type DeployableObject should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!