Preparing report...

Report for github.com/tkeel-io/core

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


gocyclo100%

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.

No problems detected. Good job!


golint49%

Golint is a linter for Go source code.

    • core/pkg/runtime/entity_manager.go
    • Line 12: warning: exported type MessageRouter should have comment or be unexported (golint)
    • Line 14: warning: exported type Container should have comment or be unexported (golint)
    • Line 16: warning: exported type EntityManager should have comment or be unexported (golint)
    • Line 33: warning: exported function NewEntityManager should have comment or be unexported (golint)
    • core/pkg/inbox/types.go
    • Line 9: warning: exported const MsgReciverID should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type MessageHandler should have comment or be unexported (golint)
    • Line 18: warning: exported type Inbox should have comment or be unexported (golint)
    • Line 24: warning: exported type Offseter should have comment or be unexported (golint)
    • Line 31: warning: exported type MsgReciver should have comment or be unexported (golint)
    • core/pkg/logger/options.go
    • Line 14: warning: exported function SetDefaultJSONOutput should have comment or be unexported (golint)
    • Line 15: warning: exported function SetDefaultAppID should have comment or be unexported (golint)
    • Line 16: warning: exported function SetDefaultLevel should have comment or be unexported (golint)
    • Line 30: warning: exported function NewOptions should have comment or be unexported (golint)
    • Line 38: warning: exported function NewOptionsWithLevel should have comment or be unexported (golint)
    • core/pkg/entities/entity.go
    • Line 17: warning: comment on exported const EntityTypeState should be of the form "EntityTypeState ..." (golint)
    • Line 19: warning: exported const EntityTypeDevice should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: comment on exported const EntityDetached should be of the form "EntityDetached ..." (golint)
    • Line 31: warning: comment on exported const EntityStatusActive should be of the form "EntityStatusActive ..." (golint)
    • Line 37: warning: exported type MapperDesc should have comment or be unexported (golint)
    • core/pkg/model/event.go
    • Line 13: warning: exported const EventTypeRaw should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type KEvent should have comment or be unexported (golint)
    • Line 59: warning: exported function NewKEventFromContext should have comment or be unexported (golint)
    • core/pkg/batch_queue/batch_sink.go
    • Line 53: warning: exported type BatchSink should have comment or be unexported (golint)
    • Line 99: warning: exported type CallbackFn should have comment or be unexported (golint)
    • Line 101: warning: exported type ProcessFn should have comment or be unexported (golint)
    • Line 124: warning: exported type Config should have comment or be unexported (golint)
    • Line 135: warning: exported method Config.GetBatchingMaxFlushDelay should have comment or be unexported (golint)
    • Line 142: warning: exported method Config.GetMaxPendingMessages should have comment or be unexported (golint)
    • Line 149: warning: exported method Config.GetMaxBatching should have comment or be unexported (golint)
    • Line 158: warning: exported function NewBatchSink should have comment or be unexported (golint)
    • core/pkg/config/server_config.go
    • Line 7: warning: exported type Server should have comment or be unexported (golint)
    • Line 14: warning: exported type TSeriesServer should have comment or be unexported (golint)
    • Line 21: warning: exported type BatchQueue should have comment or be unexported (golint)
    • Line 31: warning: exported type Source should have comment or be unexported (golint)
    • core/pkg/api/service/topic.go
    • Line 43: warning: exported method TopicEventService.AddSubTopic should have comment or be unexported (golint)
    • Line 60: warning: exported function TopicEvent2EntityContext should have comment or be unexported (golint)
    • core/pkg/mapper/tentacle.go
    • Line 12: warning: exported function NewTentacle should have comment or be unexported (golint)
    • Line 20: warning: exported function NewRemoteTentacle should have comment or be unexported (golint)
    • Line 61: warning: exported function MergeTentacles should have comment or be unexported (golint)
    • core/pkg/server/manager.go
    • Line 13: warning: exported type Manager should have comment or be unexported (golint)
    • Line 23: warning: exported function NewManager should have comment or be unexported (golint)
    • Line 31: warning: exported method Manager.Init should have comment or be unexported (golint)
    • Line 51: warning: exported method Manager.Start should have comment or be unexported (golint)
    • core/pkg/server/tseries_actor.go
    • Line 20: warning: exported type TSeriesServer should have comment or be unexported (golint)
    • Line 31: warning: exported function NewTSeriesServer should have comment or be unexported (golint)
    • Line 39: warning: exported method TSeriesServer.Init should have comment or be unexported (golint)
    • Line 81: warning: exported method TSeriesServer.Run should have comment or be unexported (golint)
    • Line 108: warning: exported type ContextKey should have comment or be unexported (golint)
    • core/pkg/mapper/types.go
    • Line 4: warning: exported const TentacleTypeUndefined should have comment (or a comment on this block) or be unexported (golint)
    • Line 11: warning: exported type Mapper should have comment or be unexported (golint)
    • Line 28: warning: exported type TentacleType should have comment or be unexported (golint)
    • Line 30: warning: exported type Tentacler should have comment or be unexported (golint)
    • Line 43: warning: exported type WatchKey should have comment or be unexported (golint)
    • core/pkg/config/api_config.go
    • Line 3: warning: exported type APIConfig should have comment or be unexported (golint)
    • Line 9: warning: exported type EventAPIConfig should have comment or be unexported (golint)
    • Line 18: warning: exported type TimeSeriesAPIConfig should have comment or be unexported (golint)
    • Line 21: warning: exported type EntityAPIConfig should have comment or be unexported (golint)
    • core/pkg/entities/subscription.go
    • Line 14: warning: comment on exported const SubscriptionModeUndefine should be of the form "SubscriptionModeUndefine ..." (golint)
    • Line 16: warning: exported const SubscriptionModeRealtime should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: comment on exported const SubscriptionFieldMode should be of the form "SubscriptionFieldMode ..." (golint)
    • core/pkg/entities/types.go
    • Line 10: warning: exported const EntityCtxHeaderOwner should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported type EntityOp should have comment or be unexported (golint)
    • Line 50: warning: exported type EntitySubscriptionOp should have comment or be unexported (golint)
    • Line 56: warning: exported type EntityContext should have comment or be unexported (golint)
    • Line 61: warning: exported function NewEntityContext should have comment or be unexported (golint)
    • Line 68: warning: exported type Header should have comment or be unexported (golint)
    • Line 70: warning: exported method Header.GetTargetID should have comment or be unexported (golint)
    • Line 74: warning: exported method Header.SetTargetID should have comment or be unexported (golint)
    • Line 78: warning: exported method Header.GetOwner should have comment or be unexported (golint)
    • Line 82: warning: exported method Header.SetOwner should have comment or be unexported (golint)
    • Line 86: warning: exported method Header.GetPluginID should have comment or be unexported (golint)
    • Line 90: warning: exported method Header.SetPluginID should have comment or be unexported (golint)
    • Line 94: warning: exported method Header.GetEntityType should have comment or be unexported (golint)
    • Line 102: warning: exported method Header.SetEntityType should have comment or be unexported (golint)
    • Line 106: warning: exported type PromiseFunc should have comment or be unexported (golint)
    • Line 108: warning: exported type Message should have comment or be unexported (golint)
    • Line 122: warning: exported type AttacheHandler should have comment or be unexported (golint)
    • core/pkg/entities/manager.go
    • Line 13: warning: exported type EntityManager should have comment or be unexported (golint)
    • Line 26: warning: exported function NewEntityManager should have comment or be unexported (golint)
    • Line 46: warning: exported method EntityManager.DeleteEntity should have comment or be unexported (golint)
    • Line 62: warning: exported method EntityManager.GetProperty should have comment or be unexported (golint)
    • Line 75: warning: exported method EntityManager.GetAllProperties should have comment or be unexported (golint)
    • Line 115: warning: exported method EntityManager.SetProperties should have comment or be unexported (golint)
    • Line 136: warning: exported method EntityManager.DeleteProperty should have comment or be unexported (golint)
    • Line 154: warning: exported method EntityManager.SendMsg should have comment or be unexported (golint)
    • Line 159: warning: exported method EntityManager.Start should have comment or be unexported (golint)
    • Line 203: warning: exported method EntityManager.HandleMsg should have comment or be unexported (golint)
    • Line 208: warning: exported method EntityManager.EscapedEntities should have comment or be unexported (golint)
    • core/lock/reentry_lock.go
    • Line 13: warning: exported var ErrMaxStackDepthExceeded should have comment or be unexported (golint)
    • Line 24: warning: exported function NewReEntryLock should have comment or be unexported (golint)
    • Line 37: warning: exported method ReEntryLock.Lock should have comment or be unexported (golint)
    • Line 57: warning: exported method ReEntryLock.Unlock should have comment or be unexported (golint)
    • core/pkg/bootstrap/server.go
    • Line 20: warning: exported type Server should have comment or be unexported (golint)
    • Line 32: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 80: warning: exported method Server.Run should have comment or be unexported (golint)
    • Line 99: warning: exported method Server.Close should have comment or be unexported (golint)
    • core/pkg/tql/types.go
    • Line 14: warning: exported type TentacleConfig should have comment or be unexported (golint)
    • Line 19: warning: exported type TQLConfig should have comment or be unexported (golint)
    • Line 25: warning: exported type TQL should have comment or be unexported (golint)
    • core/pkg/source/manager.go
    • Line 10: warning: exported type BaseSourceGenerator should have comment or be unexported (golint)
    • Line 15: warning: exported method BaseSourceGenerator.Type should have comment or be unexported (golint)
    • Line 18: warning: exported method BaseSourceGenerator.OpenSource should have comment or be unexported (golint)
    • Line 22: warning: exported var Generators should have comment or be unexported (golint)
    • Line 24: warning: exported function Register should have comment or be unexported (golint)
    • Line 28: warning: exported function OpenSource should have comment or be unexported (golint)
    • core/pkg/source/pubsub/pubsub.go
    • Line 14: warning: exported type Meta should have comment or be unexported (golint)
    • Line 21: warning: exported type Source should have comment or be unexported (golint)
    • Line 29: warning: exported function OpenSource should have comment or be unexported (golint)
    • Line 52: warning: exported method Source.StartReceiver should have comment or be unexported (golint)
    • Line 65: warning: exported method Source.Close should have comment or be unexported (golint)
    • core/pkg/tql/parser.go
    • Line 15: warning: exported type Listener should have comment or be unexported (golint)
    • Line 29: warning: exported type Exec should have comment or be unexported (golint)
    • Line 56: warning: exported method Listener.AddTentacle should have comment or be unexported (golint)
    • Line 112: warning: comment on exported method Listener.ExitTargetProperty should be of the form "ExitTargetProperty ..." (golint)
    • Line 151: warning: exported method Listener.GetExpression should have comment or be unexported (golint)
    • Line 240: warning: exported method Listener.GetParseConfigs should have comment or be unexported (golint)
    • Line 264: warning: exported method Listener.GetComputeResults should have comment or be unexported (golint)
    • core/pkg/config/config.go
    • Line 17: warning: exported type Config should have comment or be unexported (golint)
    • Line 23: warning: exported type LogConfig should have comment or be unexported (golint)
    • Line 36: warning: exported function GetConfig should have comment or be unexported (golint)
    • Line 40: warning: exported function InitConfig should have comment or be unexported (golint)
    • core/pkg/api/api.go
    • Line 41: warning: exported method Registry.Start should have comment or be unexported (golint)
    • Line 52: warning: exported method Registry.Close should have comment or be unexported (golint)
    • core/pkg/model/error.go
    • Line 5: warning: exported var ErrTopicNil should have comment or be unexported (golint)
    • Line 6: warning: exported var ErrSourceNil should have comment or be unexported (golint)
    • Line 7: warning: exported var ErrUserNil should have comment or be unexported (golint)
    • Line 8: warning: exported var ErrDataContentTypeNil should have comment or be unexported (golint)
    • Line 9: warning: exported var ErrEventType should have comment or be unexported (golint)
    • core/pkg/service/types.go
    • Line 4: warning: exported const HeaderSource should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type ContextKey should have comment or be unexported (golint)
    • Line 19: warning: exported var HeaderList should have comment or be unexported (golint)
    • core/pkg/source/types.go
    • Line 9: warning: exported type Type should have comment or be unexported (golint)
    • Line 12: warning: exported const PubSub should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported type Handler should have comment or be unexported (golint)
    • Line 24: warning: exported type ISource should have comment or be unexported (golint)
    • Line 30: warning: exported type OpenSourceHandler should have comment or be unexported (golint)
    • Line 32: warning: exported type Generator should have comment or be unexported (golint)
    • core/pkg/entities/message.go
    • Line 5: warning: comment on exported type EntityMessage should be of the form "EntityMessage ..." (with optional leading article) (golint)
    • Line 14: warning: exported method EntityMessage.Promise should have comment or be unexported (golint)
    • Line 16: warning: exported type TentacleMsg should have comment or be unexported (golint)
    • core/pkg/api/types.go
    • Line 10: warning: exported const OpenAPISuccessCode should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported function SetDefaultPluginID should have comment or be unexported (golint)
    • Line 23: warning: exported type ServiceHandler should have comment or be unexported (golint)
    • Line 25: warning: exported type IService should have comment or be unexported (golint)
    • Line 30: warning: comment on exported type IdentifyResponse should be of the form "IdentifyResponse ..." (with optional leading article) (golint)
    • Line 40: warning: exported type StatusResponse should have comment or be unexported (golint)
    • core/pkg/inbox/inbox.go
    • Line 9: warning: exported type MessageHeader should have comment or be unexported (golint)
    • Line 11: warning: exported type MessageCtx 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!