Preparing report...

Report for github.com/e-travel/message-dispatcher

A    Great!    Found 21 issues across 25 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!


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!


golint40%

Golint is a linter for Go source code.

    • message-dispatcher/servers/server.go
    • Line 6: warning: exported const UNIXGRAM should have comment (or a comment on this block) or be unexported (golint)
    • Line 10: warning: exported type Server should have comment or be unexported (golint)
    • Line 14: warning: exported function CreateServer should have comment or be unexported (golint)
    • message-dispatcher/dispatchers/dispatcher.go
    • Line 3: warning: comment on exported type Dispatcher should be of the form "Dispatcher ..." (with optional leading article) (golint)
    • Line 11: warning: comment on exported type MockDispatcher should be of the form "MockDispatcher ..." (with optional leading article) (golint)
    • Line 16: warning: exported method MockDispatcher.Put should have comment or be unexported (golint)
    • Line 20: warning: exported method MockDispatcher.Dispatch should have comment or be unexported (golint)
    • message-dispatcher/dispatchers/message_dispatcher.go
    • Line 9: warning: exported type MessageDispatcher should have comment or be unexported (golint)
    • Line 16: warning: comment on exported function NewMessageDispatcher should be of the form "NewMessageDispatcher ..." (golint)
    • Line 26: warning: exported method MessageDispatcher.SetBatchFrequency should have comment or be unexported (golint)
    • Line 30: warning: comment on exported method MessageDispatcher.Put should be of the form "Put ..." (golint)
    • Line 45: warning: exported method MessageDispatcher.Dispatch should have comment or be unexported (golint)
    • message-dispatcher/config.go
    • Line 11: warning: exported type Config should have comment or be unexported (golint)
    • Line 23: warning: exported var ValidSocketTypes should have comment or be unexported (golint)
    • Line 28: warning: exported function ParseFromCommandLine should have comment or be unexported (golint)
    • Line 52: warning: exported method Config.Validate should have comment or be unexported (golint)
    • message-dispatcher/dispatchers/batch.go
    • Line 3: warning: exported const MEGABYTE should have comment or be unexported (golint)
    • Line 6: warning: exported const ErrBatchTooLarge should have comment (or a comment on this block) or be unexported (golint)
    • Line 10: warning: exported type Batch should have comment or be unexported (golint)
    • message-dispatcher/dispatchers/echo_service.go
    • Line 5: warning: comment on exported type EchoService should be of the form "EchoService ..." (with optional leading article) (golint)
    • Line 8: warning: comment on exported method EchoService.CreateBatch should be of the form "CreateBatch ..." (golint)
    • Line 13: warning: exported method EchoService.Send should have comment or be unexported (golint)
    • message-dispatcher/dispatchers/influx_service.go
    • Line 9: warning: exported type InfluxService should have comment or be unexported (golint)
    • Line 14: warning: exported function NewInfluxService should have comment or be unexported (golint)
    • Line 21: warning: exported method InfluxService.CreateBatch should have comment or be unexported (golint)
    • Line 25: warning: exported method InfluxService.Send should have comment or be unexported (golint)
    • message-dispatcher/dispatchers/kinesis_service.go
    • Line 14: warning: exported type KinesisService should have comment or be unexported (golint)
    • Line 19: warning: exported function NewKinesisService should have comment or be unexported (golint)
    • Line 31: warning: exported method KinesisService.CreateBatch should have comment or be unexported (golint)
    • Line 35: warning: exported method KinesisService.Send should have comment or be unexported (golint)
    • Line 42: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • message-dispatcher/dispatchers/echo_batch.go
    • Line 3: warning: exported type EchoBatch should have comment or be unexported (golint)
    • Line 7: warning: exported method EchoBatch.Add should have comment or be unexported (golint)
    • Line 15: warning: exported method EchoBatch.CanAdd should have comment or be unexported (golint)
    • Line 19: warning: exported method EchoBatch.Len should have comment or be unexported (golint)
    • message-dispatcher/dispatchers/influx_batch.go
    • Line 8: warning: exported const InfluxMaxBatchSize should have comment or be unexported (golint)
    • Line 10: warning: exported type InfluxBatch should have comment or be unexported (golint)
    • Line 15: warning: exported function NewInfluxBatch should have comment or be unexported (golint)
    • Line 19: warning: exported method InfluxBatch.Add should have comment or be unexported (golint)
    • Line 36: warning: exported method InfluxBatch.CanAdd should have comment or be unexported (golint)
    • Line 40: warning: exported method InfluxBatch.Len should have comment or be unexported (golint)
    • message-dispatcher/dispatchers/kinesis_batch.go
    • Line 10: warning: exported const KinesisMaxNumberOfRecords should have comment or be unexported (golint)
    • Line 11: warning: exported const KinesisMaxSizeInBytes should have comment or be unexported (golint)
    • Line 12: warning: exported const KinesisPartitionKeyMaxSize should have comment or be unexported (golint)
    • Line 14: warning: exported type KinesisBatch should have comment or be unexported (golint)
    • Line 19: warning: exported function NewKinesisBatch should have comment or be unexported (golint)
    • Line 28: warning: comment on exported method KinesisBatch.Add should be of the form "Add ..." (golint)
    • Line 45: warning: exported method KinesisBatch.CanAdd should have comment or be unexported (golint)
    • Line 50: warning: exported method KinesisBatch.IsReady should have comment or be unexported (golint)
    • Line 54: warning: exported method KinesisBatch.IsEmpty should have comment or be unexported (golint)
    • Line 58: warning: exported method KinesisBatch.Len should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign48%

IneffAssign detects ineffectual assignments in Go code.

    • message-dispatcher/dispatchers/kinesis_batch.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/aws/aws-sdk-go/aws (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/aws/aws-sdk-go/service/kinesis (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import github.com/aws/aws-sdk-go/aws (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/aws/aws-sdk-go/service/kinesis (invalid package name: "") (ineffassign)
    • message-dispatcher/main.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/e-travel/message-dispatcher/dispatchers (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/e-travel/message-dispatcher/dispatchers (invalid package name: "") (ineffassign)
    • message-dispatcher/config.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/e-travel/message-dispatcher/servers (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/e-travel/message-dispatcher/servers (invalid package name: "") (ineffassign)
    • message-dispatcher/servers/server.go
    • Line 3: warning: cannot find package "." in: (ineffassign)
    • Line 3: warning: could not import github.com/e-travel/message-dispatcher/dispatchers (invalid package name: "") (ineffassign)
    • Line 3: warning: could not import github.com/e-travel/message-dispatcher/dispatchers (invalid package name: "") (ineffassign)
    • message-dispatcher/dispatchers/kinesis_service_test.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import github.com/stretchr/testify/mock (invalid package name: "") (ineffassign)
    • Line 20: warning: client.Called undefined (type *MockKinesisClient has no field or method Called) (ineffassign)
    • Line 44: warning: client.On undefined (type *MockKinesisClient has no field or method On) (ineffassign)
    • Line 57: warning: client.On undefined (type *MockKinesisClient has no field or method On) (ineffassign)
    • Line 71: warning: client.On undefined (type *MockKinesisClient has no field or method On) (ineffassign)
    • message-dispatcher/dispatchers/message_dispatcher_test.go
    • Line 17: warning: svc.Called undefined (type *MockService has no field or method Called) (ineffassign)
    • Line 22: warning: svc.Called undefined (type *MockService has no field or method Called) (ineffassign)
    • Line 33: warning: b.Called undefined (type *MockBatch has no field or method Called) (ineffassign)
    • Line 39: warning: b.Called undefined (type *MockBatch has no field or method Called) (ineffassign)
    • Line 44: warning: b.Called undefined (type *MockBatch has no field or method Called) (ineffassign)
    • Line 83: warning: service.On undefined (type *MockService has no field or method On) (ineffassign)
    • Line 84: warning: batch.On undefined (type *MockBatch has no field or method On) (ineffassign)
    • Line 85: warning: batch.On undefined (type *MockBatch has no field or method On) (ineffassign)
    • Line 86: warning: batch.On undefined (type *MockBatch has no field or method On) (ineffassign)
    • Line 94: warning: batch.AssertExpectations undefined (type *MockBatch has no field or method AssertExpectations) (ineffassign)
    • Line 95: warning: service.AssertExpectations undefined (type *MockService has no field or method AssertExpectations) (ineffassign)
    • Line 107: warning: service.On undefined (type *MockService has no field or method On) (ineffassign)
    • Line 108: warning: batch.On undefined (type *MockBatch has no field or method On) (ineffassign)
    • Line 109: warning: batch.On undefined (type *MockBatch has no field or method On) (ineffassign)
    • Line 110: warning: batch.On undefined (type *MockBatch has no field or method On) (ineffassign)
    • Line 118: warning: batch.AssertExpectations undefined (type *MockBatch has no field or method AssertExpectations) (ineffassign)
    • Line 119: warning: service.AssertExpectations undefined (type *MockService has no field or method AssertExpectations) (ineffassign)
    • Line 130: warning: service.On undefined (type *MockService has no field or method On) (ineffassign)
    • Line 133: warning: service.AssertExpectations undefined (type *MockService has no field or method AssertExpectations) (ineffassign)
    • message-dispatcher/servers/unix_datagram.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • message-dispatcher/dispatchers/kinesis_service.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/aws/aws-sdk-go/aws/client (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/aws/aws-sdk-go/aws/session (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/aws/aws-sdk-go/service/kinesis/kinesisiface (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/aws/aws-sdk-go/aws/client (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/aws/aws-sdk-go/aws/session (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/aws/aws-sdk-go/service/kinesis/kinesisiface (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!