Preparing report...

Report for github.com/allegro/marathon-consul

A+    Excellent!    Found 35 issues across 60 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!


golint45%

Golint is a linter for Go source code.

    • marathon-consul/sync/sync.go
    • Line 14: warning: exported type Sync should have comment or be unexported (golint)
    • Line 23: warning: exported function New should have comment or be unexported (golint)
    • Line 27: warning: exported method Sync.StartSyncServicesJob should have comment or be unexported (golint)
    • Line 52: warning: exported method Sync.SyncServices should have comment or be unexported (golint)
    • marathon-consul/events/event_handler.go
    • Line 17: warning: exported type Event should have comment or be unexported (golint)
    • Line 23: warning: exported type EventHandler should have comment or be unexported (golint)
    • Line 30: warning: exported type StopEvent should have comment or be unexported (golint)
    • Line 33: warning: exported const StatusUpdateEventType should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: exported function NewEventHandler should have comment or be unexported (golint)
    • Line 47: warning: exported method EventHandler.Start should have comment or be unexported (golint)
    • marathon-consul/metrics/metrics.go
    • Line 22: warning: exported function Clear should have comment or be unexported (golint)
    • Line 27: warning: exported function Mark should have comment or be unexported (golint)
    • Line 32: warning: exported function Time should have comment or be unexported (golint)
    • Line 37: warning: exported function UpdateGauge should have comment or be unexported (golint)
    • Line 42: warning: exported function Init should have comment or be unexported (golint)
    • Line 73: warning: exported function TargetName should have comment or be unexported (golint)
    • marathon-consul/marathon/marathon.go
    • Line 19: warning: exported type Marathoner should have comment or be unexported (golint)
    • Line 28: warning: exported type Marathon should have comment or be unexported (golint)
    • Line 37: warning: exported type LeaderResponse should have comment or be unexported (golint)
    • Line 41: warning: exported function New should have comment or be unexported (golint)
    • Line 62: warning: exported method Marathon.App should have comment or be unexported (golint)
    • Line 73: warning: exported method Marathon.ConsulApps should have comment or be unexported (golint)
    • Line 83: warning: exported method Marathon.Tasks should have comment or be unexported (golint)
    • Line 98: warning: exported method Marathon.Leader should have comment or be unexported (golint)
    • Line 244: warning: exported method Marathon.IsLeader should have comment or be unexported (golint)
    • marathon-consul/time/time.go
    • Line 10: warning: exported type Timestamp should have comment or be unexported (golint)
    • Line 14: warning: exported method Timestamp.UnmarshalJSON should have comment or be unexported (golint)
    • Line 24: warning: exported method Timestamp.MarshalJSON should have comment or be unexported (golint)
    • Line 28: warning: exported method Timestamp.Delay should have comment or be unexported (golint)
    • Line 36: warning: exported method Timestamp.Missing should have comment or be unexported (golint)
    • Line 40: warning: exported type Interval should have comment or be unexported (golint)
    • Line 44: warning: exported method Interval.UnmarshalJSON should have comment or be unexported (golint)
    • Line 57: warning: exported method Interval.MarshalJSON should have comment or be unexported (golint)
    • marathon-consul/consul/consul.go
    • Line 18: warning: exported type Consul should have comment or be unexported (golint)
    • Line 24: warning: exported type ServicesProvider should have comment or be unexported (golint)
    • Line 26: warning: exported function New should have comment or be unexported (golint)
    • Line 34: warning: exported method Consul.GetServices should have comment or be unexported (golint)
    • Line 105: warning: exported method Consul.GetAllServices should have comment or be unexported (golint)
    • Line 162: warning: exported method Consul.Register should have comment or be unexported (golint)
    • Line 216: warning: exported method Consul.DeregisterByTask should have comment or be unexported (golint)
    • Line 268: warning: exported method Consul.Deregister should have comment or be unexported (golint)
    • Line 425: warning: exported method Consul.AddAgentsFromApps should have comment or be unexported (golint)
    • Line 439: warning: exported method Consul.AddAgent should have comment or be unexported (golint)
    • marathon-consul/marathon/streamer.go
    • Line 14: warning: exported type Streamer should have comment or be unexported (golint)
    • Line 26: warning: exported method Streamer.Stop should have comment or be unexported (golint)
    • Line 31: warning: exported method Streamer.Start should have comment or be unexported (golint)
    • Line 59: warning: exported method Streamer.Recover should have comment or be unexported (golint)
    • marathon-consul/events/sse_events.go
    • Line 10: warning: comment on exported type SSEEvent should be of the form "SSEEvent ..." (with optional leading article) (golint)
    • Line 93: warning: exported function ParseSSEEvent should have comment or be unexported (golint)
    • marathon-consul/consul/consul_stub.go
    • Line 12: warning: comment on exported type Stub should be of the form "Stub ..." (with optional leading article) (golint)
    • Line 23: warning: exported function NewConsulStub should have comment or be unexported (golint)
    • Line 27: warning: exported function NewConsulStubWithTag should have comment or be unexported (golint)
    • Line 38: warning: exported method Stub.GetAllServices should have comment or be unexported (golint)
    • Line 53: warning: exported method Stub.FailGetServicesForName should have comment or be unexported (golint)
    • Line 57: warning: exported method Stub.FailRegisterForID should have comment or be unexported (golint)
    • Line 61: warning: exported method Stub.FailDeregisterByTaskForID should have comment or be unexported (golint)
    • Line 65: warning: exported method Stub.FailDeregisterForID should have comment or be unexported (golint)
    • Line 69: warning: exported method Stub.GetServices should have comment or be unexported (golint)
    • Line 89: warning: exported method Stub.Register should have comment or be unexported (golint)
    • Line 105: warning: exported method Stub.RegisterWithoutMarathonTaskTag should have comment or be unexported (golint)
    • Line 121: warning: exported method Stub.RegisterOnlyFirstRegistrationIntent should have comment or be unexported (golint)
    • Line 128: warning: exported method Stub.DeregisterByTask should have comment or be unexported (golint)
    • Line 140: warning: exported method Stub.Deregister should have comment or be unexported (golint)
    • Line 160: warning: exported method Stub.RegisteredTaskIDs should have comment or be unexported (golint)
    • marathon-consul/apps/task.go
    • Line 10: warning: exported type Task should have comment or be unexported (golint)
    • Line 24: warning: comment on exported type TaskID should be of the form "TaskID ..." (with optional leading article) (golint)
    • Line 32: warning: exported method TaskID.AppID should have comment or be unexported (golint)
    • Line 37: warning: exported type HealthCheckResult should have comment or be unexported (golint)
    • Line 41: warning: exported type TasksResponse should have comment or be unexported (golint)
    • Line 45: warning: exported function FindTaskByID should have comment or be unexported (golint)
    • Line 54: warning: exported function ParseTasks should have comment or be unexported (golint)
    • Line 61: warning: exported function ParseTask should have comment or be unexported (golint)
    • Line 67: warning: exported method Task.IsHealthy should have comment or be unexported (golint)
    • marathon-consul/apps/app.go
    • Line 11: warning: comment on exported const MarathonConsulLabel should be of the form "MarathonConsulLabel ..." (golint)
    • Line 13: warning: exported const MarathonConsulTagValue should have comment or be unexported (golint)
    • Line 15: warning: exported type HealthCheck should have comment or be unexported (golint)
    • Line 29: warning: exported type PortDefinition should have comment or be unexported (golint)
    • Line 34: warning: exported type Container should have comment or be unexported (golint)
    • Line 42: warning: exported type Apps should have comment or be unexported (golint)
    • Line 46: warning: exported type App should have comment or be unexported (golint)
    • Line 55: warning: comment on exported type AppID should be of the form "AppID ..." (with optional leading article) (golint)
    • Line 64: warning: exported method App.IsConsulApp should have comment or be unexported (golint)
    • Line 80: warning: exported function ParseApps should have comment or be unexported (golint)
    • Line 87: warning: exported function ParseApp should have comment or be unexported (golint)
    • Line 94: warning: exported type RegistrationIntent should have comment or be unexported (golint)
    • Line 100: warning: exported method App.RegistrationIntentsNumber should have comment or be unexported (golint)
    • Line 113: warning: exported method App.RegistrationIntents should have comment or be unexported (golint)
    • marathon-consul/events/task_health_change.go
    • Line 12: warning: exported type TaskHealthChange should have comment or be unexported (golint)
    • Line 26: warning: exported method TaskHealthChange.TaskID should have comment or be unexported (golint)
    • Line 33: warning: exported function ParseTaskHealthChange should have comment or be unexported (golint)
    • marathon-consul/sse/sse.go
    • Line 16: warning: exported type Stop should have comment or be unexported (golint)
    • Line 17: warning: exported type Handler should have comment or be unexported (golint)
    • Line 19: warning: exported function NewHandler should have comment or be unexported (golint)
    • marathon-consul/service/service.go
    • Line 11: warning: exported type ID should have comment or be unexported (golint)
    • Line 17: warning: exported type Service should have comment or be unexported (golint)
    • Line 25: warning: exported method Service.TaskID should have comment or be unexported (golint)
    • Line 34: warning: exported function MarathonTaskTag should have comment or be unexported (golint)
    • Line 38: warning: exported type Registry should have comment or be unexported (golint)
    • marathon-consul/marathon/marathon_stub.go
    • Line 11: warning: exported type MarathonerStub should have comment or be unexported (golint)
    • Line 21: warning: exported method MarathonerStub.ConsulApps should have comment or be unexported (golint)
    • Line 26: warning: exported method MarathonerStub.App should have comment or be unexported (golint)
    • Line 34: warning: exported method MarathonerStub.Tasks should have comment or be unexported (golint)
    • Line 42: warning: exported method MarathonerStub.Leader should have comment or be unexported (golint)
    • Line 47: warning: exported method MarathonerStub.EventStream should have comment or be unexported (golint)
    • Line 51: warning: exported method MarathonerStub.IsLeader should have comment or be unexported (golint)
    • Line 55: warning: exported method MarathonerStub.Interactions should have comment or be unexported (golint)
    • Line 67: warning: exported function MarathonerStubWithLeaderForApps should have comment or be unexported (golint)
    • Line 74: warning: exported function MarathonerStubForApps should have comment or be unexported (golint)
    • marathon-consul/consul/agents.go
    • Line 15: warning: exported type Agents should have comment or be unexported (golint)
    • Line 22: warning: exported type ConcurrentAgents should have comment or be unexported (golint)
    • Line 30: warning: exported function NewAgents should have comment or be unexported (golint)
    • Line 57: warning: exported method ConcurrentAgents.GetAnyAgent should have comment or be unexported (golint)
    • Line 68: warning: exported method ConcurrentAgents.GetLocalAgent should have comment or be unexported (golint)
    • Line 84: warning: exported method ConcurrentAgents.RemoveAgent should have comment or be unexported (golint)
    • Line 98: warning: exported method ConcurrentAgents.GetAgent should have comment or be unexported (golint)
    • marathon-consul/consul/consul_test_server.go
    • Line 15: warning: exported function CreateTestServer should have comment or be unexported (golint)
    • Line 26: warning: exported function CreateTestServerDatacenter should have comment or be unexported (golint)
    • Line 37: warning: exported const MasterToken should have comment or be unexported (golint)
    • Line 39: warning: exported function CreateSecuredTestServer should have comment or be unexported (golint)
    • Line 90: warning: exported function ClientAtServer should have comment or be unexported (golint)
    • Line 94: warning: exported function ClientAtRemoteServer should have comment or be unexported (golint)
    • Line 102: warning: exported function SecuredClientAtServer should have comment or be unexported (golint)
    • Line 106: warning: exported function FailingClient should have comment or be unexported (golint)
    • marathon-consul/consul/agent.go
    • Line 11: warning: exported type Agent should have comment or be unexported (golint)
    • Line 17: warning: exported method Agent.IncFailures should have comment or be unexported (golint)
    • Line 21: warning: exported method Agent.ClearFailures should have comment or be unexported (golint)
    • marathon-consul/utils/apps.go
    • Line 10: warning: exported function ConsulApp should have comment or be unexported (golint)
    • Line 14: warning: exported function ConsulAppWithUnhealthyInstances should have comment or be unexported (golint)
    • Line 18: warning: exported function ConsulAppMultipleRegistrations should have comment or be unexported (golint)
    • Line 22: warning: exported function NonConsulApp 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!


misspell91%

Misspell Finds commonly misspelled English words