Preparing report...

Report for github.com/bitgrip/cattlectl

A+    Excellent!    Found 47 issues across 141 files

Tweet

gofmt80%

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!


gocyclo98%

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.


golint89%

Golint is a linter for Go source code.

    • cattlectl/internal/pkg/rancher/descriptor/converger.go
    • Line 21: warning: exported type Converger should have comment or be unexported (golint)
    • Line 25: warning: exported type ConvergeResult should have comment or be unexported (golint)
    • Line 30: warning: exported type ResourceDescriptor should have comment or be unexported (golint)
    • Line 35: warning: exported type ResourceClientConverger should have comment or be unexported (golint)
    • Line 40: warning: exported method ResourceClientConverger.Converge should have comment or be unexported (golint)
    • cattlectl/internal/pkg/rancher/cluster/project/model/workload_model.go
    • Line 17: warning: exported type WorkloadMetadata should have comment or be unexported (golint)
    • Line 156: warning: exported type NodeScheduling should have comment or be unexported (golint)
    • Line 198: warning: exported type Scheduling should have comment or be unexported (golint)
    • Line 230: warning: exported type Volume should have comment or be unexported (golint)
    • Line 261: warning: exported type AWSElasticBlockStoreVolumeSource should have comment or be unexported (golint)
    • Line 268: warning: exported type AzureDiskVolumeSource should have comment or be unexported (golint)
    • Line 277: warning: exported type AzureFileVolumeSource should have comment or be unexported (golint)
    • Line 283: warning: exported type CephFSVolumeSource should have comment or be unexported (golint)
    • Line 292: warning: exported type CinderVolumeSource should have comment or be unexported (golint)
    • Line 299: warning: exported type ConfigMapProjection should have comment or be unexported (golint)
    • Line 305: warning: exported type ConfigMapVolumeSource should have comment or be unexported (golint)
    • Line 312: warning: exported type DownwardAPIVolumeSource should have comment or be unexported (golint)
    • Line 317: warning: exported type DownwardAPIProjection should have comment or be unexported (golint)
    • Line 321: warning: exported type DownwardAPIVolumeFile should have comment or be unexported (golint)
    • Line 328: warning: exported type EmptyDirVolumeSource should have comment or be unexported (golint)
    • Line 333: warning: exported type FCVolumeSource should have comment or be unexported (golint)
    • Line 341: warning: exported type FlexVolumeSource should have comment or be unexported (golint)
    • Line 349: warning: exported type FlockerVolumeSource should have comment or be unexported (golint)
    • Line 354: warning: exported type GCEPersistentDiskVolumeSource should have comment or be unexported (golint)
    • Line 361: warning: exported type GitRepoVolumeSource should have comment or be unexported (golint)
    • Line 367: warning: exported type GlusterfsVolumeSource should have comment or be unexported (golint)
    • Line 373: warning: exported type HostPathVolumeSource should have comment or be unexported (golint)
    • Line 378: warning: exported type ISCSIVolumeSource should have comment or be unexported (golint)
    • Line 392: warning: exported type KeyToPath should have comment or be unexported (golint)
    • Line 398: warning: exported type NFSVolumeSource should have comment or be unexported (golint)
    • Line 404: warning: exported type ObjectFieldSelector should have comment or be unexported (golint)
    • Line 409: warning: exported type PersistentVolumeClaimVolumeSource should have comment or be unexported (golint)
    • Line 414: warning: exported type PhotonPersistentDiskVolumeSource should have comment or be unexported (golint)
    • Line 419: warning: exported type PortworxVolumeSource should have comment or be unexported (golint)
    • Line 425: warning: exported type ProjectedVolumeSource should have comment or be unexported (golint)
    • Line 430: warning: exported type ResourceFieldSelector should have comment or be unexported (golint)
    • Line 436: warning: exported type QuobyteVolumeSource should have comment or be unexported (golint)
    • Line 444: warning: exported type RBDVolumeSource should have comment or be unexported (golint)
    • Line 455: warning: exported type ScaleIOVolumeSource should have comment or be unexported (golint)
    • Line 468: warning: exported type SecretProjection should have comment or be unexported (golint)
    • Line 474: warning: exported type SecretVolumeSource should have comment or be unexported (golint)
    • Line 481: warning: exported type ServiceAccountTokenProjection should have comment or be unexported (golint)
    • Line 487: warning: exported type StorageOSVolumeSource should have comment or be unexported (golint)
    • Line 495: warning: exported type VolumeProjection should have comment or be unexported (golint)
    • Line 502: warning: exported type VsphereVirtualDiskVolumeSource should have comment or be unexported (golint)
    • cattlectl/internal/pkg/rancher/cluster/project/model/workload_model_cron_job.go
    • Line 23: warning: exported type CronJobDescriptor should have comment or be unexported (golint)
    • Line 30: warning: exported type CronJob should have comment or be unexported (golint)
    • Line 36: warning: exported type CronJobConfig should have comment or be unexported (golint)
    • Line 48: warning: exported function ConvertCronJobDescriptorToProjectAPI should have comment or be unexported (golint)
    • Line 51: warning: exported function ConvertCronJobToProjectAPI should have comment or be unexported (golint)
    • cattlectl/internal/pkg/rancher/cluster/project/model/workload_statefulset.go
    • Line 23: warning: exported type StatefulSetDescriptor should have comment or be unexported (golint)
    • Line 30: warning: exported type StatefulSet should have comment or be unexported (golint)
    • Line 36: warning: exported type StatefulSetConfig should have comment or be unexported (golint)
    • Line 45: warning: exported type PersistentVolumeClaim should have comment or be unexported (golint)
    • Line 55: warning: exported function ConvertStatefulSetDescriptorToProjectAPI should have comment or be unexported (golint)
    • Line 59: warning: exported function ConvertStatefulSetToProjectAPI should have comment or be unexported (golint)
    • cattlectl/internal/pkg/rancher/cluster/project/model/workload_daemonset.go
    • Line 23: warning: exported type DaemonSetDescriptor should have comment or be unexported (golint)
    • Line 30: warning: exported type DaemonSet should have comment or be unexported (golint)
    • Line 35: warning: exported type DaemonSetConfig should have comment or be unexported (golint)
    • Line 42: warning: exported function ConvertDaemonSetDescriptorToProjectAPI should have comment or be unexported (golint)
    • Line 46: warning: exported function ConvertDaemonSetToProjectAPI should have comment or be unexported (golint)
    • cattlectl/internal/pkg/assert/assert.go
    • Line 31: warning: exported var Update should have comment or be unexported (golint)
    • Line 34: warning: exported function AssertGoldenFile should have comment or be unexported (golint)
    • Line 44: warning: comment on exported function Assert should be of the form "Assert ..." (golint)
    • Line 53: warning: comment on exported function Ok should be of the form "Ok ..." (golint)
    • Line 62: warning: comment on exported function NotOk should be of the form "NotOk ..." (golint)
    • Line 74: warning: comment on exported function Equals should be of the form "Equals ..." (golint)
    • Line 145: warning: exported function FailInStub should have comment or be unexported (golint)
    • Line 151: warning: exported function Fail should have comment or be unexported (golint)
    • cattlectl/ansible/utils/util.go
    • Line 29: warning: exported type AccessArgs should have comment or be unexported (golint)
    • Line 40: warning: exported type BaseResponse should have comment or be unexported (golint)
    • Line 47: warning: exported function ExitJson should have comment or be unexported (golint)
    • Line 51: warning: exported function FailJson should have comment or be unexported (golint)
    • Line 55: warning: exported function ReadArguments should have comment or be unexported (golint)
    • Line 85: warning: exported function ReturnResponse should have comment or be unexported (golint)
    • Line 101: warning: exported function BuildRancherConfig should have comment or be unexported (golint)
    • cattlectl/internal/pkg/rancher/cluster/project/model/workload_deployment.go
    • Line 23: warning: exported type DeploymentDescriptor should have comment or be unexported (golint)
    • Line 30: warning: exported type Deployment should have comment or be unexported (golint)
    • Line 36: warning: exported type DeploymentConfig should have comment or be unexported (golint)
    • Line 45: warning: exported function ConvertDeploymentDescriptorToProjectAPI should have comment or be unexported (golint)
    • Line 49: warning: exported function ConvertDeploymentToProjectAPI should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words