Preparing report...

Report for github.com/etf1/kafka-message-scheduler

(v0.0.4)

A+    Excellent!    Found 22 issues across 37 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!


gocyclo97%

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.


golint43%

Golint is a linter for Go source code.

    • kafka-message-scheduler/internal/test/helper.go
    • Line 30: warning: exported function NewKafkaStore should have comment or be unexported (golint)
    • Line 35: warning: exported function NewKafkaStoreFromTopics should have comment or be unexported (golint)
    • Line 45: warning: comment on exported function CreateTopics should be of the form "CreateTopics ..." (golint)
    • Line 93: warning: comment on exported function RandomTopicName should be of the form "RandomTopicName ..." (golint)
    • Line 98: warning: exported function GetConsumerConfig should have comment or be unexported (golint)
    • Line 108: warning: exported function GetProducerConfig should have comment or be unexported (golint)
    • Line 133: warning: comment on exported function Message should be of the form "Message ..." (golint)
    • Line 149: warning: comment on exported function Messages should be of the form "Messages ..." (golint)
    • Line 185: warning: exported function ProduceMessages should have comment or be unexported (golint)
    • Line 214: warning: comment on exported function AssertEquals should be of the form "AssertEquals ..." (golint)
    • Line 225: warning: comment on exported function AssertMessageEquals should be of the form "AssertMessageEquals ..." (golint)
    • Line 238: warning: comment on exported function AssertMessagesinTopic should be of the form "AssertMessagesinTopic ..." (golint)
    • Line 271: warning: exported function PrintMessages should have comment or be unexported (golint)
    • Line 281: warning: comment on exported function ConsumeMessages should be of the form "ConsumeMessages ..." (golint)
    • kafka-message-scheduler/apiserver/rest/server.go
    • Line 17: warning: exported type Server should have comment or be unexported (golint)
    • Line 22: warning: exported function New should have comment or be unexported (golint)
    • Line 34: warning: exported method Server.Router should have comment or be unexported (golint)
    • Line 38: warning: exported method Server.Start should have comment or be unexported (golint)
    • Line 51: warning: exported method Server.Stop should have comment or be unexported (golint)
    • kafka-message-scheduler/internal/store/hmap/hmap.go
    • Line 19: warning: exported function New should have comment or be unexported (golint)
    • Line 25: warning: exported method Hmap.Close should have comment or be unexported (golint)
    • Line 29: warning: exported method Hmap.Events should have comment or be unexported (golint)
    • Line 33: warning: exported method Hmap.Delete should have comment or be unexported (golint)
    • Line 50: warning: exported method Hmap.Add should have comment or be unexported (golint)
    • kafka-message-scheduler/scheduler/scheduler.go
    • Line 18: warning: exported type Event should have comment or be unexported (golint)
    • Line 22: warning: exported type Error should have comment or be unexported (golint)
    • Line 26: warning: exported type Scheduler should have comment or be unexported (golint)
    • Line 35: warning: exported function New should have comment or be unexported (golint)
    • Line 51: warning: exported method Scheduler.Events should have comment or be unexported (golint)
    • Line 55: warning: exported method Scheduler.Close should have comment or be unexported (golint)
    • Line 60: warning: exported method Scheduler.GetPlannedSchedules should have comment or be unexported (golint)
    • Line 149: warning: exported method Scheduler.IsAlive should have comment or be unexported (golint)
    • Line 176: warning: exported method Scheduler.Start should have comment or be unexported (golint)
    • kafka-message-scheduler/config/config.go
    • Line 31: warning: exported function LogLevel should have comment or be unexported (golint)
    • Line 39: warning: exported function GraylogServer should have comment or be unexported (golint)
    • Line 43: warning: exported function MetricsAddr should have comment or be unexported (golint)
    • Line 47: warning: exported function ServerAddr should have comment or be unexported (golint)
    • Line 51: warning: exported function BootstrapServers should have comment or be unexported (golint)
    • Line 55: warning: exported function GroupID should have comment or be unexported (golint)
    • Line 59: warning: exported function SessionTimeout should have comment or be unexported (golint)
    • Line 63: warning: exported function SinceDelta should have comment or be unexported (golint)
    • Line 67: warning: exported function SchedulesTopics should have comment or be unexported (golint)
    • Line 71: warning: exported function HistoryTopic should have comment or be unexported (golint)
    • kafka-message-scheduler/schedule/simple/simple_schedule.go
    • Line 17: warning: exported function NewSchedule should have comment or be unexported (golint)
    • Line 55: warning: exported method Schedule.MarshalJSON should have comment or be unexported (golint)
    • Line 63: warning: exported method Schedule.UnmarshalJSON should have comment or be unexported (golint)
    • Line 77: warning: exported method Schedule.ID should have comment or be unexported (golint)
    • Line 81: warning: exported method Schedule.Epoch should have comment or be unexported (golint)
    • Line 85: warning: exported method Schedule.Timestamp should have comment or be unexported (golint)
    • kafka-message-scheduler/scheduler/helper.go
    • Line 10: warning: exported function StartOfToday should have comment or be unexported (golint)
    • Line 14: warning: exported function StartOfYesterday should have comment or be unexported (golint)
    • Line 18: warning: exported function StartOfDayAsTime should have comment or be unexported (golint)
    • Line 25: warning: exported function StartOfDay should have comment or be unexported (golint)
    • Line 29: warning: exported function EndOfToday should have comment or be unexported (golint)
    • Line 36: warning: exported function IsInRange should have comment or be unexported (golint)
    • kafka-message-scheduler/schedule/kafka/schedule.go
    • Line 14: warning: exported const Epoch should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type Schedule should have comment or be unexported (golint)
    • Line 32: warning: exported method Schedule.TargetTopic should have comment or be unexported (golint)
    • Line 36: warning: exported method Schedule.Topic should have comment or be unexported (golint)
    • Line 40: warning: exported method Schedule.TargetKey should have comment or be unexported (golint)
    • Line 44: warning: exported method Schedule.ID should have comment or be unexported (golint)
    • Line 48: warning: exported method Schedule.IsDeleted should have comment or be unexported (golint)
    • Line 52: warning: exported method Schedule.HasErrors should have comment or be unexported (golint)
    • Line 56: warning: exported method Schedule.Timestamp should have comment or be unexported (golint)
    • Line 60: warning: exported method Schedule.Epoch should have comment or be unexported (golint)
    • Line 72: warning: exported method Schedule.MarshalJSON should have comment or be unexported (golint)
    • kafka-message-scheduler/store/store.go
    • Line 3: warning: exported type Event should have comment or be unexported (golint)
    • Line 8: warning: exported type Error should have comment or be unexported (golint)
    • Line 12: warning: exported type Store should have comment or be unexported (golint)
    • kafka-message-scheduler/internal/timers/timers.go
    • Line 26: warning: exported type Timers should have comment or be unexported (golint)
    • Line 33: warning: exported function New should have comment or be unexported (golint)
    • Line 48: warning: exported method Timers.Add should have comment or be unexported (golint)
    • Line 123: warning: exported method Timers.Close should have comment or be unexported (golint)
    • Line 131: warning: exported method Timers.DeleteAll should have comment or be unexported (golint)
    • Line 146: warning: exported method Timers.Get should have comment or be unexported (golint)
    • Line 156: warning: exported method Timers.GetAll should have comment or be unexported (golint)
    • kafka-message-scheduler/runner/kafka/runner.go
    • Line 20: warning: exported type Config should have comment or be unexported (golint)
    • Line 42: warning: exported type Runner should have comment or be unexported (golint)
    • Line 49: warning: exported function DefaultCollector should have comment or be unexported (golint)
    • Line 53: warning: exported function DefaultConfig should have comment or be unexported (golint)
    • Line 63: warning: exported function DefaultSince should have comment or be unexported (golint)
    • Line 67: warning: exported function DefaultRunnerParams should have comment or be unexported (golint)
    • Line 71: warning: exported function DefaultRunner should have comment or be unexported (golint)
    • Line 75: warning: exported function NewRunner should have comment or be unexported (golint)
    • Line 84: warning: exported method Runner.Close should have comment or be unexported (golint)
    • Line 94: warning: exported method Runner.Start should have comment or be unexported (golint)
    • kafka-message-scheduler/store/kafka/store.go
    • Line 19: warning: exported type Error should have comment or be unexported (golint)
    • Line 28: warning: exported method Error.Timestamp should have comment or be unexported (golint)
    • Line 32: warning: exported type Store should have comment or be unexported (golint)
    • Line 42: warning: exported function NewStore should have comment or be unexported (golint)
    • Line 75: warning: comment on exported method Store.Close should be of the form "Close ..." (golint)
    • Line 152: warning: exported method Store.Events should have comment or be unexported (golint)
    • kafka-message-scheduler/runner/kafka/handler.go
    • Line 30: warning: exported type EventHandler should have comment or be unexported (golint)
    • Line 35: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 98: warning: exported method EventHandler.Close should have comment or be unexported (golint)
    • Line 169: warning: comment on exported type HandlerOpaque should be of the form "HandlerOpaque ..." (with optional leading article) (golint)
    • Line 213: warning: exported method EventHandler.Handle should have comment or be unexported (golint)
    • kafka-message-scheduler/schedule/schedule.go
    • Line 10: warning: exported var ErrInvalidScheduleID should have comment or be unexported (golint)
    • Line 15: warning: exported type Schedule should have comment or be unexported (golint)
    • Line 52: warning: exported method DeleteSchedules.Timestamp should have comment or be unexported (golint)
    • Line 56: warning: exported type Partialer should have comment or be unexported (golint)
    • kafka-message-scheduler/runner/mini/mini.go
    • Line 22: warning: exported const ID1 should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported function GetSchedule should have comment or be unexported (golint)
    • Line 36: warning: exported type Runner should have comment or be unexported (golint)
    • Line 40: warning: exported function NewRunner should have comment or be unexported (golint)
    • Line 46: warning: exported method Runner.Close should have comment or be unexported (golint)
    • Line 51: warning: exported method Runner.Start 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!