Preparing report...

Report for github.com/metacontroller/metacontroller

A+    Excellent!    Found 30 issues across 71 files

Tweet

gofmt98%

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!


gocyclo91%

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.


golint66%

Golint is a linter for Go source code.

    • metacontroller/pkg/dynamic/clientset/clientset.go
    • Line 33: warning: exported type Clientset should have comment or be unexported (golint)
    • Line 39: warning: exported function New should have comment or be unexported (golint)
    • Line 51: warning: exported method Clientset.HasSynced should have comment or be unexported (golint)
    • Line 55: warning: exported method Clientset.Resource should have comment or be unexported (golint)
    • Line 64: warning: exported method Clientset.Kind should have comment or be unexported (golint)
    • metacontroller/examples/go/main.go
    • Line 14: warning: exported type Controller should have comment or be unexported (golint)
    • Line 21: warning: exported type ControllerSpec should have comment or be unexported (golint)
    • Line 25: warning: exported type ControllerStatus should have comment or be unexported (golint)
    • Line 30: warning: exported type SyncRequest should have comment or be unexported (golint)
    • Line 35: warning: exported type SyncRequestChildren should have comment or be unexported (golint)
    • Line 39: warning: exported type SyncResponse should have comment or be unexported (golint)
    • metacontroller/pkg/controller/common/common.go
    • Line 49: warning: exported var KeyFunc should have comment or be unexported (golint)
    • Line 116: warning: exported method ControllerContext.Stop should have comment or be unexported (golint)
    • Line 120: warning: exported type ChildMap should have comment or be unexported (golint)
    • Line 122: warning: exported method ChildMap.InitGroup should have comment or be unexported (golint)
    • Line 126: warning: exported method ChildMap.Insert should have comment or be unexported (golint)
    • Line 137: warning: exported method ChildMap.InsertAll should have comment or be unexported (golint)
    • Line 143: warning: exported method ChildMap.FindGroupKindName should have comment or be unexported (golint)
    • Line 236: warning: exported function ParseChildMapKey should have comment or be unexported (golint)
    • Line 241: warning: exported function ParseAPIVersion should have comment or be unexported (golint)
    • Line 250: warning: exported type GroupKindMap should have comment or be unexported (golint)
    • Line 252: warning: exported method GroupKindMap.Set should have comment or be unexported (golint)
    • Line 256: warning: exported method GroupKindMap.Get should have comment or be unexported (golint)
    • Line 260: warning: exported type InformerMap should have comment or be unexported (golint)
    • Line 262: warning: exported method InformerMap.Set should have comment or be unexported (golint)
    • Line 266: warning: exported method InformerMap.Get should have comment or be unexported (golint)
    • metacontroller/pkg/events/events.go
    • Line 12: warning: exported const ReasonStarted should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported function NewBroadcaster should have comment or be unexported (golint)
    • metacontroller/pkg/dynamic/object/status.go
    • Line 23: warning: exported type StatusCondition should have comment or be unexported (golint)
    • Line 30: warning: exported method StatusCondition.Object should have comment or be unexported (golint)
    • Line 44: warning: exported function NewStatusCondition should have comment or be unexported (golint)
    • Line 61: warning: exported function GetStatusCondition should have comment or be unexported (golint)
    • Line 76: warning: exported function SetCondition should have comment or be unexported (golint)
    • Line 100: warning: exported function SetStatusCondition should have comment or be unexported (golint)
    • Line 115: warning: exported function GetObservedGeneration should have comment or be unexported (golint)
    • metacontroller/pkg/controller/common/customize/hook.go
    • Line 14: warning: exported type CustomizableController should have comment or be unexported (golint)
    • Line 18: warning: exported type CustomizeHookRequest should have comment or be unexported (golint)
    • Line 23: warning: exported type CustomizeHookResponse should have comment or be unexported (golint)
    • Line 27: warning: exported function CallCustomizeHook should have comment or be unexported (golint)
    • metacontroller/pkg/controller/common/manage_children.go
    • Line 38: warning: exported function ApplyUpdate should have comment or be unexported (golint)
    • Line 114: warning: exported function MakeControllerRef should have comment or be unexported (golint)
    • Line 125: warning: exported type ChildUpdateStrategy should have comment or be unexported (golint)
    • Line 129: warning: exported function ManageChildren should have comment or be unexported (golint)
    • metacontroller/pkg/apis/metacontroller/v1alpha1/types.go
    • Line 17: warning: package comment should be of the form "Package v1alpha1 ..." (golint)
    • Line 25: warning: comment on exported type CompositeController should be of the form "CompositeController ..." (with optional leading article) (golint)
    • Line 36: warning: exported method CompositeController.GetCustomizeHook should have comment or be unexported (golint)
    • Line 43: warning: exported type CompositeControllerSpec should have comment or be unexported (golint)
    • Line 53: warning: exported type ResourceRule should have comment or be unexported (golint)
    • Line 58: warning: exported type CompositeControllerParentResourceRule should have comment or be unexported (golint)
    • Line 63: warning: exported type CompositeControllerRevisionHistory should have comment or be unexported (golint)
    • Line 67: warning: exported type ChildUpdateMethod should have comment or be unexported (golint)
    • Line 70: warning: exported const ChildUpdateOnDelete should have comment (or a comment on this block) or be unexported (golint)
    • Line 77: warning: exported type CompositeControllerChildResourceRule should have comment or be unexported (golint)
    • Line 82: warning: exported type CompositeControllerChildUpdateStrategy should have comment or be unexported (golint)
    • Line 87: warning: exported type ChildUpdateStatusChecks should have comment or be unexported (golint)
    • Line 91: warning: exported type StatusConditionCheck should have comment or be unexported (golint)
    • Line 97: warning: exported type ServiceReference should have comment or be unexported (golint)
    • Line 104: warning: exported type CompositeControllerHooks should have comment or be unexported (golint)
    • Line 113: warning: exported type Hook should have comment or be unexported (golint)
    • Line 117: warning: exported type Webhook should have comment or be unexported (golint)
    • Line 125: warning: exported type CompositeControllerStatus should have comment or be unexported (golint)
    • Line 128: warning: comment on exported type CompositeControllerList should be of the form "CompositeControllerList ..." (with optional leading article) (golint)
    • Line 135: warning: comment on exported type ControllerRevision should be of the form "ControllerRevision ..." (with optional leading article) (golint)
    • Line 148: warning: exported type ControllerRevisionChildren should have comment or be unexported (golint)
    • Line 154: warning: comment on exported type ControllerRevisionList should be of the form "ControllerRevisionList ..." (with optional leading article) (golint)
    • Line 161: warning: comment on exported type DecoratorController should be of the form "DecoratorController ..." (with optional leading article) (golint)
    • Line 172: warning: exported method DecoratorController.GetCustomizeHook should have comment or be unexported (golint)
    • Line 179: warning: exported type DecoratorControllerSpec should have comment or be unexported (golint)
    • Line 188: warning: exported type DecoratorControllerResourceRule should have comment or be unexported (golint)
    • Line 194: warning: exported type AnnotationSelector should have comment or be unexported (golint)
    • Line 199: warning: exported type DecoratorControllerAttachmentRule should have comment or be unexported (golint)
    • Line 204: warning: exported type DecoratorControllerAttachmentUpdateStrategy should have comment or be unexported (golint)
    • Line 208: warning: exported type DecoratorControllerHooks should have comment or be unexported (golint)
    • Line 214: warning: exported type DecoratorControllerStatus should have comment or be unexported (golint)
    • Line 217: warning: comment on exported type DecoratorControllerList should be of the form "DecoratorControllerList ..." (with optional leading article) (golint)
    • Line 224: warning: exported type RelatedResourceRule should have comment or be unexported (golint)
    • metacontroller/pkg/dynamic/discovery/discovery.go
    • Line 32: warning: exported type APIResource should have comment or be unexported (golint)
    • Line 38: warning: exported method APIResource.GroupVersion should have comment or be unexported (golint)
    • Line 47: warning: exported method APIResource.GroupVersionKind should have comment or be unexported (golint)
    • Line 51: warning: exported method APIResource.GroupVersionResource should have comment or be unexported (golint)
    • Line 55: warning: exported method APIResource.GroupResource should have comment or be unexported (golint)
    • Line 59: warning: exported method APIResource.HasSubresource should have comment or be unexported (golint)
    • Line 67: warning: exported type ResourceMap should have comment or be unexported (golint)
    • Line 75: warning: exported method ResourceMap.Get should have comment or be unexported (golint)
    • Line 86: warning: exported method ResourceMap.GetKind should have comment or be unexported (golint)
    • Line 169: warning: exported method ResourceMap.Start should have comment or be unexported (golint)
    • Line 191: warning: exported method ResourceMap.Stop should have comment or be unexported (golint)
    • Line 196: warning: exported method ResourceMap.HasSynced should have comment or be unexported (golint)
    • Line 202: warning: exported function NewResourceMap should have comment or be unexported (golint)
    • metacontroller/pkg/controller/common/customize/manager.go
    • Line 29: warning: exported type Manager should have comment or be unexported (golint)
    • Line 47: warning: exported function NewCustomizeManager should have comment or be unexported (golint)
    • Line 69: warning: exported method Manager.Start should have comment or be unexported (golint)
    • Line 73: warning: exported method Manager.GetCachedCustomizeHookResponse should have comment or be unexported (golint)
    • Line 77: warning: exported method Manager.GetCustomizeHookResponse should have comment or be unexported (golint)
    • Line 81: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 240: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 291: warning: exported method Manager.GetRelatedObjects should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words