Preparing report...

Report for github.com/mgoltzsche/k8spkg

A+    Excellent!    Found 27 issues across 50 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!


gocyclo94%

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.


golint48%

Golint is a linter for Go source code.

    • k8spkg/pkg/resource/k8sresourcelist.go
    • Line 11: warning: exported type K8sResourceList should have comment or be unexported (golint)
    • Line 13: warning: exported function FromReader should have comment or be unexported (golint)
    • Line 31: warning: exported method K8sResourceList.Refs should have comment or be unexported (golint)
    • Line 39: warning: exported method K8sResourceList.WriteYaml should have comment or be unexported (golint)
    • Line 48: warning: exported method K8sResourceList.YamlReader should have comment or be unexported (golint)
    • k8spkg/pkg/client/mock/clientmock.go
    • Line 18: warning: exported function MockDataFile should have comment or be unexported (golint)
    • Line 26: warning: exported function MockResourceList should have comment or be unexported (golint)
    • Line 34: warning: exported type ClientMock should have comment or be unexported (golint)
    • Line 45: warning: exported function NewClientMock should have comment or be unexported (golint)
    • Line 61: warning: exported method ClientMock.Apply should have comment or be unexported (golint)
    • Line 67: warning: exported method ClientMock.Delete should have comment or be unexported (golint)
    • Line 72: warning: exported method ClientMock.AwaitDeletion should have comment or be unexported (golint)
    • Line 77: warning: exported method ClientMock.GetResource should have comment or be unexported (golint)
    • Line 85: warning: exported method ClientMock.Get should have comment or be unexported (golint)
    • Line 101: warning: exported method ClientMock.Watch should have comment or be unexported (golint)
    • Line 138: warning: exported method ClientMock.ResourceTypes should have comment or be unexported (golint)
    • Line 144: warning: exported method ClientMock.ContainerLogs should have comment or be unexported (golint)
    • k8spkg/pkg/transform/transform.go
    • Line 17: warning: exported type TransformOptions should have comment or be unexported (golint)
    • Line 23: warning: exported method TransformOptions.Empty should have comment or be unexported (golint)
    • Line 27: warning: exported type GeneratorFn should have comment or be unexported (golint)
    • Line 29: warning: exported function Transform should have comment or be unexported (golint)
    • k8spkg/pkg/k8spkg/apprepo.go
    • Line 14: warning: exported var CrdAPIGroup should have comment or be unexported (golint)
    • Line 23: warning: exported function IsAppNotFound should have comment or be unexported (golint)
    • Line 28: warning: exported type AppEvent should have comment or be unexported (golint)
    • Line 33: warning: exported type AppRepo should have comment or be unexported (golint)
    • Line 37: warning: exported function NewAppRepo should have comment or be unexported (golint)
    • Line 41: warning: exported method AppRepo.GetAll should have comment or be unexported (golint)
    • Line 63: warning: exported method AppRepo.Get should have comment or be unexported (golint)
    • Line 72: warning: exported method AppRepo.Put should have comment or be unexported (golint)
    • Line 79: warning: exported method AppRepo.Delete should have comment or be unexported (golint)
    • k8spkg/pkg/k8spkg/app.go
    • Line 7: warning: exported type App should have comment or be unexported (golint)
    • Line 13: warning: exported type AppResourceRef should have comment or be unexported (golint)
    • k8spkg/pkg/resource/k8sresource.go
    • Line 15: warning: exported type K8sResource should have comment or be unexported (golint)
    • Line 21: warning: exported function Resource should have comment or be unexported (golint)
    • Line 31: warning: exported type ResourceEvent should have comment or be unexported (golint)
    • Line 36: warning: exported function FromJsonStream should have comment or be unexported (golint)
    • Line 63: warning: exported type K8sResourceCondition should have comment or be unexported (golint)
    • Line 70: warning: exported function FromMap should have comment or be unexported (golint)
    • Line 103: warning: exported method K8sResource.Validate should have comment or be unexported (golint)
    • Line 110: warning: exported method K8sResource.Raw should have comment or be unexported (golint)
    • Line 114: warning: exported method K8sResource.Labels should have comment or be unexported (golint)
    • Line 119: warning: exported method K8sResource.Conditions should have comment or be unexported (golint)
    • Line 123: warning: exported method K8sResource.WriteYaml should have comment or be unexported (golint)
    • k8spkg/pkg/resource/k8sresourceref.go
    • Line 8: warning: exported type K8sResourceRef should have comment or be unexported (golint)
    • Line 24: warning: exported function ResourceRef should have comment or be unexported (golint)
    • Line 63: warning: exported type K8sResourceRefList should have comment or be unexported (golint)
    • Line 65: warning: exported type K8sResourceGroup should have comment or be unexported (golint)
    • Line 70: warning: exported method K8sResourceRefList.GroupByNamespace should have comment or be unexported (golint)
    • Line 74: warning: exported method K8sResourceRefList.GroupByKind should have comment or be unexported (golint)
    • Line 94: warning: exported method K8sResourceRefList.Names should have comment or be unexported (golint)
    • Line 102: warning: exported method K8sResourceRefList.Filter should have comment or be unexported (golint)
    • k8spkg/pkg/status/conditions.go
    • Line 13: warning: exported var RolloutConditions should have comment or be unexported (golint)
    • Line 24: warning: exported function NewCondition should have comment or be unexported (golint)
    • Line 28: warning: exported type Condition should have comment or be unexported (golint)
    • Line 32: warning: exported type ConditionStatus should have comment or be unexported (golint)
    • Line 37: warning: exported method ConditionStatus.Equal should have comment or be unexported (golint)
    • Line 75: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 88: warning: exported type DeploymentRolloutCondition should have comment or be unexported (golint)
    • Line 90: warning: exported method DeploymentRolloutCondition.Status should have comment or be unexported (golint)
    • Line 118: warning: exported type DaemonSetRolloutCondition should have comment or be unexported (golint)
    • Line 120: warning: exported method DaemonSetRolloutCondition.Status should have comment or be unexported (golint)
    • k8spkg/pkg/status/emitter.go
    • Line 7: warning: exported type ResourceStatus should have comment or be unexported (golint)
    • Line 12: warning: exported type ResourceStatusEvent should have comment or be unexported (golint)
    • Line 17: warning: exported function Emitter should have comment or be unexported (golint)
    • k8spkg/pkg/status/tracker.go
    • Line 11: warning: exported var DefaultStatus should have comment or be unexported (golint)
    • Line 14: warning: exported type Tracker should have comment or be unexported (golint)
    • Line 27: warning: exported type StatusReport should have comment or be unexported (golint)
    • Line 32: warning: exported function NewTracker should have comment or be unexported (golint)
    • Line 45: warning: exported method Tracker.Run should have comment or be unexported (golint)
    • Line 82: warning: exported method Tracker.Changes should have comment or be unexported (golint)
    • Line 99: warning: exported method Tracker.Ready should have comment or be unexported (golint)
    • Line 113: warning: exported method Tracker.Result should have comment or be unexported (golint)
    • k8spkg/pkg/client/client.go
    • Line 21: warning: exported type K8sClient should have comment or be unexported (golint)
    • Line 37: warning: exported function IsNotFound should have comment or be unexported (golint)
    • Line 51: warning: comment on exported method APIResourceType.ShortName should be of the form "ShortName ..." (golint)
    • Line 60: warning: comment on exported method APIResourceType.FullName should be of the form "FullName ..." (golint)
    • Line 72: warning: exported type WatchEvent should have comment or be unexported (golint)
    • Line 77: warning: exported function NewK8sClient should have comment or be unexported (golint)
    • k8spkg/pkg/k8spkg/manager.go
    • Line 19: warning: comment on exported const PKG_NAME_LABEL should be of the form "PKG_NAME_LABEL ..." (golint)
    • Line 21: warning: exported const PKG_NS_LABEL should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported function IsNotFound should have comment or be unexported (golint)
    • Line 33: warning: exported type PackageManager should have comment or be unexported (golint)
    • Line 40: warning: exported function NewPackageManager should have comment or be unexported (golint)
    • Line 44: warning: exported method PackageManager.List should have comment or be unexported (golint)
    • Line 52: warning: exported method PackageManager.Status should have comment or be unexported (golint)
    • Line 200: warning: exported method PackageManager.Apply should have comment or be unexported (golint)
    • Line 222: warning: exported method PackageManager.Delete should have comment or be unexported (golint)
    • Line 237: warning: exported method PackageManager.DeleteResources should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!