Preparing report...

Report for github.com/cloudstateio/go-support

A+    Excellent!    Found 55 issues across 104 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!


gocyclo85%

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.

    • go-support/tck/crdt2/model.go
    • Line 258: warning: cyclomatic complexity 28 of function applyUpdate() is high (> 15) (gocyclo)
    • Line 116: warning: cyclomatic complexity 17 of function (*CrdtTckModelEntity).HandleCommand() is high (> 15) (gocyclo)

golint55%

Golint is a linter for Go source code.

    • go-support/tck/value/model.go
    • Line 13: warning: exported type ValueEntityTckModelEntity should have comment or be unexported (golint)
    • Line 17: warning: exported function NewValueEntityTckModelEntity should have comment or be unexported (golint)
    • Line 21: warning: exported method ValueEntityTckModelEntity.HandleCommand should have comment or be unexported (golint)
    • Line 78: warning: exported method ValueEntityTckModelEntity.HandleState should have comment or be unexported (golint)
    • Line 87: warning: exported type ValueEntityTckModelEntityTwo should have comment or be unexported (golint)
    • Line 90: warning: exported function NewValueEntityTckModelEntityTwo should have comment or be unexported (golint)
    • Line 94: warning: exported method ValueEntityTckModelEntityTwo.HandleCommand should have comment or be unexported (golint)
    • Line 98: warning: exported method ValueEntityTckModelEntityTwo.HandleState should have comment or be unexported (golint)
    • Line 102: warning: exported type ValueEntityConfiguredEntity should have comment or be unexported (golint)
    • Line 104: warning: exported function NewValueEntityConfiguredEntity should have comment or be unexported (golint)
    • Line 109: warning: exported method ValueEntityConfiguredEntity.HandleCommand should have comment or be unexported (golint)
    • Line 113: warning: exported method ValueEntityConfiguredEntity.HandleState should have comment or be unexported (golint)
    • go-support/cloudstate/value/context.go
    • Line 30: warning: exported type Context should have comment or be unexported (golint)
    • Line 47: warning: exported method Context.Forward should have comment or be unexported (golint)
    • Line 52: warning: exported method Context.SideEffect should have comment or be unexported (golint)
    • Line 168: warning: exported method Context.Delete should have comment or be unexported (golint)
    • Line 174: warning: exported method Context.Update should have comment or be unexported (golint)
    • go-support/cloudstate/value/server.go
    • Line 29: warning: exported type ServiceName should have comment or be unexported (golint)
    • Line 30: warning: exported type EntityID should have comment or be unexported (golint)
    • Line 31: warning: exported type CommandID should have comment or be unexported (golint)
    • Line 38: warning: exported type Server should have comment or be unexported (golint)
    • Line 47: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 53: warning: exported method Server.Register should have comment or be unexported (golint)
    • Line 66: warning: exported method Server.Handle should have comment or be unexported (golint)
    • go-support/cloudstate/encoding/any_json.go
    • Line 29: warning: exported const JSONTypeURLPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported function JSON should have comment or be unexported (golint)
    • Line 57: warning: comment on exported function UnmarshalJSON should be of the form "UnmarshalJSON ..." (golint)
    • go-support/cloudstate/protocol/error.go
    • Line 18: warning: exported type ClientError should have comment or be unexported (golint)
    • Line 22: warning: exported method ClientError.Is should have comment or be unexported (golint)
    • Line 35: warning: exported type ServerError should have comment or be unexported (golint)
    • Line 40: warning: exported method ServerError.Is should have comment or be unexported (golint)
    • go-support/cloudstate/eventsourced/entity.go
    • Line 50: warning: exported type Option should have comment or be unexported (golint)
    • Line 52: warning: exported method Entity.Options should have comment or be unexported (golint)
    • Line 58: warning: exported function WithPassivationStrategyTimeout should have comment or be unexported (golint)
    • Line 71: warning: exported type ServiceName should have comment or be unexported (golint)
    • Line 72: warning: exported type EntityID should have comment or be unexported (golint)
    • Line 73: warning: exported type CommandID should have comment or be unexported (golint)
    • Line 80: warning: exported method CommandID.Value should have comment or be unexported (golint)
    • Line 84: warning: comment on exported type EntityHandler should be of the form "EntityHandler ..." (with optional leading article) (golint)
    • Line 103: warning: comment on exported type Snapshooter should be of the form "Snapshooter ..." (with optional leading article) (golint)
    • go-support/cloudstate/crdt/entity.go
    • Line 37: warning: exported type Option should have comment or be unexported (golint)
    • Line 39: warning: exported method Entity.Options should have comment or be unexported (golint)
    • Line 45: warning: exported function WithPassivationStrategyTimeout should have comment or be unexported (golint)
    • go-support/cloudstate/crdt/ormap.go
    • Line 25: warning: comment on exported type ORMap should be of the form "ORMap ..." (with optional leading article) (golint)
    • Line 36: warning: exported type ORMapEntry should have comment or be unexported (golint)
    • Line 49: warning: exported method ORMap.Entries should have comment or be unexported (golint)
    • Line 59: warning: exported function NewORMap should have comment or be unexported (golint)
    • Line 71: warning: exported method ORMap.HasKey should have comment or be unexported (golint)
    • Line 76: warning: exported method ORMap.Size should have comment or be unexported (golint)
    • Line 80: warning: exported method ORMap.Keys should have comment or be unexported (golint)
    • Line 90: warning: exported method ORMap.Get should have comment or be unexported (golint)
    • Line 97: warning: exported method ORMap.Set should have comment or be unexported (golint)
    • Line 114: warning: exported method ORMap.Delete should have comment or be unexported (golint)
    • Line 131: warning: exported method ORMap.Clear should have comment or be unexported (golint)
    • Line 145: warning: exported method ORMap.HasDelta should have comment or be unexported (golint)
    • Line 157: warning: exported method ORMap.Delta should have comment or be unexported (golint)
    • go-support/cloudstate/crdt/vote.go
    • Line 40: warning: exported function NewVote should have comment or be unexported (golint)
    • Line 94: warning: exported method Vote.HasDelta should have comment or be unexported (golint)
    • Line 98: warning: exported method Vote.Delta should have comment or be unexported (golint)
    • go-support/example/valueentity/entity.go
    • Line 17: warning: comment on exported type ShoppingCart should be of the form "ShoppingCart ..." (with optional leading article) (golint)
    • Line 111: warning: exported method ShoppingCart.HandleState should have comment or be unexported (golint)
    • go-support/tck/crdt2/model.go
    • Line 32: warning: exported type CrdtTckModelEntity should have comment or be unexported (golint)
    • Line 43: warning: exported function NewCrdtTckModelEntity should have comment or be unexported (golint)
    • Line 47: warning: exported function NewCrdtTwoEntity should have comment or be unexported (golint)
    • Line 116: warning: exported method CrdtTckModelEntity.HandleCommand should have comment or be unexported (golint)
    • Line 347: warning: exported method CrdtTckModelEntity.Default should have comment or be unexported (golint)
    • Line 374: warning: exported method CrdtTckModelEntity.Set should have comment or be unexported (golint)
    • Line 396: warning: exported type CrdtTwoEntity should have comment or be unexported (golint)
    • Line 398: warning: exported method CrdtTwoEntity.HandleCommand should have comment or be unexported (golint)
    • Line 411: warning: exported method CrdtTwoEntity.Default should have comment or be unexported (golint)
    • Line 415: warning: exported method CrdtTwoEntity.Set should have comment or be unexported (golint)
    • Line 419: warning: exported type CrdtConfiguredEntity should have comment or be unexported (golint)
    • Line 422: warning: exported function NewCrdtConfiguredEntity should have comment or be unexported (golint)
    • Line 426: warning: exported method CrdtConfiguredEntity.HandleCommand should have comment or be unexported (golint)
    • Line 430: warning: exported method CrdtConfiguredEntity.Default should have comment or be unexported (golint)
    • Line 434: warning: exported method CrdtConfiguredEntity.Set should have comment or be unexported (golint)
    • go-support/cloudstate/encoding/any.go
    • Line 25: warning: exported var ErrNotMarshalled should have comment or be unexported (golint)
    • Line 26: warning: exported var ErrNotUnmarshalled should have comment or be unexported (golint)
    • Line 28: warning: exported var Empty should have comment or be unexported (golint)
    • Line 30: warning: exported type AnyEncFunc should have comment or be unexported (golint)
    • Line 31: warning: exported type AnyDecFunc should have comment or be unexported (golint)
    • go-support/cloudstate/crdt/ormap_getter.go
    • Line 24: warning: exported method ORMap.Flag should have comment or be unexported (golint)
    • Line 34: warning: exported method ORMap.GCounter should have comment or be unexported (golint)
    • Line 44: warning: exported method ORMap.GSet should have comment or be unexported (golint)
    • Line 54: warning: exported method ORMap.LWWRegister should have comment or be unexported (golint)
    • Line 64: warning: exported method ORMap.ORMap should have comment or be unexported (golint)
    • Line 74: warning: exported method ORMap.ORSet should have comment or be unexported (golint)
    • Line 84: warning: exported method ORMap.PNCounter should have comment or be unexported (golint)
    • Line 94: warning: exported method ORMap.Vote should have comment or be unexported (golint)
    • go-support/example/effects/shoppingcart/entity.go
    • Line 10: warning: exported type ShoppingCart should have comment or be unexported (golint)
    • Line 13: warning: exported method ShoppingCart.HandleCommand should have comment or be unexported (golint)
    • Line 61: warning: exported method ShoppingCart.HandleEvent should have comment or be unexported (golint)
    • go-support/tck/eventsourced/model.go
    • Line 28: warning: exported type TestModel should have comment or be unexported (golint)
    • Line 32: warning: exported function NewTestModel should have comment or be unexported (golint)
    • Line 36: warning: exported method TestModel.HandleCommand should have comment or be unexported (golint)
    • Line 72: warning: exported method TestModel.HandleEvent should have comment or be unexported (golint)
    • Line 81: warning: exported method TestModel.Snapshot should have comment or be unexported (golint)
    • Line 85: warning: exported method TestModel.HandleSnapshot should have comment or be unexported (golint)
    • Line 94: warning: exported type TestModelTwo should have comment or be unexported (golint)
    • Line 97: warning: exported method TestModelTwo.HandleCommand should have comment or be unexported (golint)
    • Line 105: warning: exported method TestModelTwo.HandleEvent should have comment or be unexported (golint)
    • Line 109: warning: exported function NewTestModelTwo should have comment or be unexported (golint)
    • Line 113: warning: exported type EventSourcedConfiguredEntity should have comment or be unexported (golint)
    • Line 116: warning: exported function NewEventSourcedConfiguredEntity should have comment or be unexported (golint)
    • Line 120: warning: exported method EventSourcedConfiguredEntity.HandleCommand should have comment or be unexported (golint)
    • Line 124: warning: exported method EventSourcedConfiguredEntity.HandleEvent should have comment or be unexported (golint)
    • go-support/cloudstate/value/entity.go
    • Line 26: warning: exported type Entity should have comment or be unexported (golint)
    • Line 37: warning: exported type Option should have comment or be unexported (golint)
    • Line 39: warning: exported method Entity.Options should have comment or be unexported (golint)
    • Line 45: warning: exported function WithPassivationStrategyTimeout should have comment or be unexported (golint)
    • Line 57: warning: exported type EntityHandler should have comment or be unexported (golint)
    • go-support/cloudstate/crdt/flag.go
    • Line 34: warning: exported function NewFlag should have comment or be unexported (golint)
    • Line 38: warning: exported method Flag.Value should have comment or be unexported (golint)
    • Line 42: warning: comment on exported method Flag.Enable should be of the form "Enable ..." (golint)
    • Line 49: warning: exported method Flag.Delta should have comment or be unexported (golint)
    • Line 59: warning: exported method Flag.HasDelta should have comment or be unexported (golint)
    • go-support/cloudstate/crdt/gset.go
    • Line 25: warning: comment on exported type GSet should be of the form "GSet ..." (with optional leading article) (golint)
    • Line 36: warning: exported function NewGSet should have comment or be unexported (golint)
    • Line 44: warning: exported method GSet.Size should have comment or be unexported (golint)
    • Line 48: warning: exported method GSet.Add should have comment or be unexported (golint)
    • Line 57: warning: exported method GSet.HasDelta should have comment or be unexported (golint)
    • Line 61: warning: exported method GSet.Value should have comment or be unexported (golint)
    • Line 71: warning: exported method GSet.Added should have comment or be unexported (golint)
    • Line 81: warning: exported method GSet.Delta should have comment or be unexported (golint)
    • go-support/cloudstate/crdt/pncounter.go
    • Line 24: warning: comment on exported type PNCounter should be of the form "PNCounter ..." (with optional leading article) (golint)
    • Line 35: warning: exported function NewPNCounter should have comment or be unexported (golint)
    • Line 39: warning: exported method PNCounter.Value should have comment or be unexported (golint)
    • Line 43: warning: exported method PNCounter.Increment should have comment or be unexported (golint)
    • Line 48: warning: exported method PNCounter.Decrement should have comment or be unexported (golint)
    • Line 53: warning: exported method PNCounter.HasDelta should have comment or be unexported (golint)
    • Line 57: warning: exported method PNCounter.Delta should have comment or be unexported (golint)
    • go-support/tck/eventlogeventing/model.go
    • Line 16: warning: exported type EventLogSubscriberModel should have comment or be unexported (golint)
    • Line 19: warning: exported method EventLogSubscriberModel.HandleCommand should have comment or be unexported (golint)
    • Line 108: warning: exported type EventSourcedEntityOne should have comment or be unexported (golint)
    • Line 110: warning: exported method EventSourcedEntityOne.HandleCommand should have comment or be unexported (golint)
    • Line 125: warning: exported method EventSourcedEntityOne.HandleEvent should have comment or be unexported (golint)
    • Line 129: warning: exported type EventSourcedEntityTwo should have comment or be unexported (golint)
    • Line 131: warning: exported type JsonMessage should have comment or be unexported (golint)
    • Line 135: warning: exported method EventSourcedEntityTwo.HandleCommand should have comment or be unexported (golint)
    • Line 151: warning: exported method EventSourcedEntityTwo.HandleEvent should have comment or be unexported (golint)
    • go-support/cloudstate/encoding/any_encoding.go
    • Line 5: warning: exported function Int32 should have comment or be unexported (golint)
    • Line 10: warning: exported function DecodeInt32 should have comment or be unexported (golint)
    • Line 15: warning: exported function Int64 should have comment or be unexported (golint)
    • Line 20: warning: exported function DecodeInt64 should have comment or be unexported (golint)
    • Line 25: warning: exported function StringMust should have comment or be unexported (golint)
    • Line 33: warning: exported function String should have comment or be unexported (golint)
    • Line 38: warning: exported function Struct should have comment or be unexported (golint)
    • Line 42: warning: exported function DecodeStruct should have comment or be unexported (golint)
    • Line 46: warning: exported function DecodeString should have comment or be unexported (golint)
    • Line 55: warning: exported function Float32 should have comment or be unexported (golint)
    • Line 60: warning: exported function DecodeFloat32 should have comment or be unexported (golint)
    • Line 65: warning: exported function Float64 should have comment or be unexported (golint)
    • Line 70: warning: exported function DecodeFloat64 should have comment or be unexported (golint)
    • Line 75: warning: exported function Bool should have comment or be unexported (golint)
    • Line 80: warning: exported function DecodeBool should have comment or be unexported (golint)
    • Line 85: warning: exported function Bytes should have comment or be unexported (golint)
    • Line 90: warning: exported function DecodeBytes should have comment or be unexported (golint)
    • go-support/cloudstate/crdt/types.go
    • Line 19: warning: exported type ServiceName should have comment or be unexported (golint)
    • Line 20: warning: exported type EntityID should have comment or be unexported (golint)
    • Line 21: warning: exported type CommandID should have comment or be unexported (golint)
    • Line 32: warning: exported method CommandID.Value should have comment or be unexported (golint)
    • go-support/example/chat/friends/entity.go
    • Line 27: warning: exported type Entity should have comment or be unexported (golint)
    • Line 31: warning: exported method Entity.HandleCommand should have comment or be unexported (golint)
    • Line 60: warning: exported method Entity.Default should have comment or be unexported (golint)
    • Line 64: warning: exported method Entity.Set should have comment or be unexported (golint)
    • go-support/cloudstate/action/context.go
    • Line 26: warning: exported type CloseFunc should have comment or be unexported (golint)
    • Line 27: warning: exported type CancelFunc should have comment or be unexported (golint)
    • Line 28: warning: exported type RespondFunc should have comment or be unexported (golint)
    • Line 30: warning: exported type Context should have comment or be unexported (golint)
    • Line 56: warning: exported method Context.RespondWith should have comment or be unexported (golint)
    • Line 62: warning: exported method Context.Forward should have comment or be unexported (golint)
    • Line 68: warning: exported method Context.SideEffect should have comment or be unexported (golint)
    • Line 78: warning: exported method Context.CancellationFunc should have comment or be unexported (golint)
    • Line 87: warning: exported method Context.Command should have comment or be unexported (golint)
    • Line 91: warning: exported method Context.Metadata should have comment or be unexported (golint)
    • Line 95: warning: exported method Context.Respond should have comment or be unexported (golint)
    • go-support/cloudstate/discovery/server.go
    • Line 39: warning: exported const SupportLibraryName should have comment (or a comment on this block) or be unexported (golint)
    • Line 124: warning: exported method EntityDiscoveryServer.RegisterEventSourcedEntity should have comment or be unexported (golint)
    • Line 142: warning: exported method EntityDiscoveryServer.RegisterCRDTEntity should have comment or be unexported (golint)
    • Line 161: warning: exported method EntityDiscoveryServer.RegisterActionEntity should have comment or be unexported (golint)
    • Line 174: warning: exported method EntityDiscoveryServer.RegisterValueEntity should have comment or be unexported (golint)
    • go-support/cloudstate/crdt/cmdcontext.go
    • Line 30: warning: exported var ErrCtxFailCalled should have comment or be unexported (golint)
    • Line 31: warning: exported var ErrStateChanged should have comment or be unexported (golint)
    • Line 33: warning: exported type ChangeFunc should have comment or be unexported (golint)
    • Line 34: warning: exported type CancelFunc should have comment or be unexported (golint)
    • Line 108: warning: exported method CommandContext.WriteConsistency should have comment or be unexported (golint)
    • go-support/cloudstate/crdt/lwwregister.go
    • Line 25: warning: comment on exported type LWWRegister should be of the form "LWWRegister ..." (with optional leading article) (golint)
    • Line 51: warning: exported function NewLWWRegister should have comment or be unexported (golint)
    • Line 63: warning: exported method LWWRegister.Value should have comment or be unexported (golint)
    • Line 67: warning: exported method LWWRegister.Set should have comment or be unexported (golint)
    • Line 87: warning: exported method LWWRegister.Delta should have comment or be unexported (golint)
    • Line 99: warning: exported method LWWRegister.HasDelta should have comment or be unexported (golint)
    • go-support/cloudstate/crdt/orset.go
    • Line 25: warning: comment on exported type ORSet should be of the form "ORSet ..." (with optional leading article) (golint)
    • Line 41: warning: exported function NewORSet should have comment or be unexported (golint)
    • Line 51: warning: exported method ORSet.Size should have comment or be unexported (golint)
    • Line 55: warning: exported method ORSet.Add should have comment or be unexported (golint)
    • Line 68: warning: exported method ORSet.Remove should have comment or be unexported (golint)
    • Line 85: warning: exported method ORSet.Clear should have comment or be unexported (golint)
    • Line 92: warning: exported method ORSet.Value should have comment or be unexported (golint)
    • Line 102: warning: exported method ORSet.Added should have comment or be unexported (golint)
    • Line 112: warning: exported method ORSet.Removed should have comment or be unexported (golint)
    • Line 122: warning: exported method ORSet.Delta should have comment or be unexported (golint)
    • Line 134: warning: exported method ORSet.HasDelta should have comment or be unexported (golint)
    • go-support/example/chat/presence/entity.go
    • Line 28: warning: exported type Entity should have comment or be unexported (golint)
    • Line 33: warning: exported method Entity.HandleCommand should have comment or be unexported (golint)
    • Line 43: warning: exported method Entity.Connect should have comment or be unexported (golint)
    • Line 54: warning: exported method Entity.Monitor should have comment or be unexported (golint)
    • Line 83: warning: exported method Entity.Default should have comment or be unexported (golint)
    • Line 86: warning: exported method Entity.Set should have comment or be unexported (golint)
    • go-support/tck/action/model.go
    • Line 27: warning: exported type TestModel should have comment or be unexported (golint)
    • Line 30: warning: exported function NewTestModel should have comment or be unexported (golint)
    • Line 34: warning: exported method TestModel.HandleCommand should have comment or be unexported (golint)
    • Line 100: warning: exported type TestModelTwo should have comment or be unexported (golint)
    • Line 103: warning: exported function NewTestModelTwo should have comment or be unexported (golint)
    • Line 107: warning: exported method TestModelTwo.HandleCommand should have comment or be unexported (golint)
    • go-support/cloudstate/crdt/gcounter.go
    • Line 24: warning: comment on exported type GCounter should be of the form "GCounter ..." (with optional leading article) (golint)
    • Line 38: warning: exported function NewGCounter should have comment or be unexported (golint)
    • Line 42: warning: exported method GCounter.Value should have comment or be unexported (golint)
    • Line 46: warning: exported method GCounter.Increment should have comment or be unexported (golint)
    • Line 51: warning: exported method GCounter.HasDelta should have comment or be unexported (golint)
    • Line 55: warning: exported method GCounter.Delta should have comment or be unexported (golint)
    • go-support/cloudstate/crdt/lwwregister_clock.go
    • Line 20: warning: exported type Clock should have comment or be unexported (golint)
    • Line 23: warning: comment on exported const Default should be of the form "Default ..." (golint)
    • Line 26: warning: comment on exported const Reverse should be of the form "Reverse ..." (golint)
    • Line 31: warning: comment on exported const Custom should be of the form "Custom ..." (golint)
    • go-support/example/crdt_shoppingcart/shoppingcart/entity.go
    • Line 12: warning: exported type ShoppingCart should have comment or be unexported (golint)
    • Line 16: warning: exported function NewShoppingCart should have comment or be unexported (golint)
    • Line 33: warning: comment on exported method ShoppingCart.HandleCommand should be of the form "HandleCommand ..." (golint)
    • Line 99: warning: comment on exported method ShoppingCart.Default should be of the form "Default ..." (golint)
    • Line 104: warning: exported method ShoppingCart.Set should have comment or be unexported (golint)
    • go-support/cloudstate/action/server.go
    • Line 33: warning: exported type ServiceName should have comment or be unexported (golint)
    • Line 34: warning: exported type EntityID should have comment or be unexported (golint)
    • Line 35: warning: exported type CommandID should have comment or be unexported (golint)
    • Line 53: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 59: warning: exported method Server.Register should have comment or be unexported (golint)
    • go-support/tck/crdt/model.go
    • Line 30: warning: exported type TestModel should have comment or be unexported (golint)
    • Line 42: warning: exported function NewEntity should have comment or be unexported (golint)
    • Line 46: warning: exported method TestModel.Set should have comment or be unexported (golint)
    • Line 68: warning: exported method TestModel.Default should have comment or be unexported (golint)
    • Line 91: warning: exported method TestModel.HandleCommand 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!


misspell98%

Misspell Finds commonly misspelled English words