Preparing report...

Report for github.com/danielkrainas/csense

A+    Excellent!    Found 31 issues across 41 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!


golint24%

Golint is a linter for Go source code.

    • csense/api/v1/urls.go
    • Line 11: warning: exported type URLBuilder should have comment or be unexported (golint)
    • Line 17: warning: exported function NewURLBuilder should have comment or be unexported (golint)
    • Line 25: warning: exported function NewURLBuilderFromString should have comment or be unexported (golint)
    • Line 34: warning: exported function NewURLBuilderFromRequest should have comment or be unexported (golint)
    • Line 72: warning: exported method URLBuilder.BuildBaseURL should have comment or be unexported (golint)
    • Line 83: warning: exported method URLBuilder.BuildHooks should have comment or be unexported (golint)
    • csense/api/server/handlers/handlers.go
    • Line 15: warning: exported function Base should have comment or be unexported (golint)
    • Line 24: warning: exported function Alive should have comment or be unexported (golint)
    • Line 36: warning: exported function Context should have comment or be unexported (golint)
    • Line 43: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 55: warning: exported function Logging should have comment or be unexported (golint)
    • Line 70: warning: exported function TrackErrors should have comment or be unexported (golint)
    • csense/hooks/shooter.go
    • Line 14: warning: exported type Shooter should have comment or be unexported (golint)
    • Line 18: warning: exported type MockShooter should have comment or be unexported (golint)
    • Line 20: warning: exported method MockShooter.Fire should have comment or be unexported (golint)
    • Line 25: warning: exported type LiveShooter should have comment or be unexported (golint)
    • Line 29: warning: exported method LiveShooter.Fire should have comment or be unexported (golint)
    • csense/containers/containers.go
    • Line 11: warning: exported var ErrContainerNotFound should have comment or be unexported (golint)
    • Line 13: warning: exported type EventsChannel should have comment or be unexported (golint)
    • Line 18: warning: exported type Driver should have comment or be unexported (golint)
    • Line 24: warning: exported function IndexByName should have comment or be unexported (golint)
    • Line 33: warning: exported type EventsChannelFilter should have comment or be unexported (golint)
    • Line 40: warning: exported method EventsChannelFilter.GetChannel should have comment or be unexported (golint)
    • Line 55: warning: exported type EventsContainerResolver should have comment or be unexported (golint)
    • Line 62: warning: exported method EventsContainerResolver.GetChannel should have comment or be unexported (golint)
    • Line 80: warning: exported type EventsContainerTracker should have comment or be unexported (golint)
    • Line 87: warning: exported method EventsContainerTracker.GetChannel should have comment or be unexported (golint)
    • csense/api/v1/routes.go
    • Line 6: warning: exported const RouteNameBase should have comment (or a comment on this block) or be unexported (golint)
    • Line 11: warning: exported function Router should have comment or be unexported (golint)
    • Line 15: warning: exported function RouterWithPrefix should have comment or be unexported (golint)
    • csense/api/server/handlers/api.go
    • Line 13: warning: exported const ServerVersionHeader should have comment or be unexported (golint)
    • Line 14: warning: exported const ApiVersionHeader should have comment or be unexported (golint)
    • Line 15: warning: exported const ApiVersion should have comment or be unexported (golint)
    • Line 17: warning: exported type Api should have comment or be unexported (golint)
    • Line 21: warning: exported function NewApi should have comment or be unexported (golint)
    • csense/api/server/handlers/hooks.go
    • Line 64: warning: exported function Hooks should have comment or be unexported (golint)
    • Line 77: warning: exported function HookMetadata should have comment or be unexported (golint)
    • Line 113: warning: exported function GetHook should have comment or be unexported (golint)
    • Line 123: warning: exported function DeleteHook should have comment or be unexported (golint)
    • Line 139: warning: exported function ModifyHook should have comment or be unexported (golint)
    • Line 172: warning: exported function CreateHook should have comment or be unexported (golint)
    • Line 214: warning: exported function GetAllHooks should have comment or be unexported (golint)
    • csense/hooks/hooks.go
    • Line 12: warning: exported type Filter should have comment or be unexported (golint)
    • Line 16: warning: exported type CriteriaFilter should have comment or be unexported (golint)
    • Line 18: warning: exported method CriteriaFilter.Match should have comment or be unexported (golint)
    • Line 44: warning: exported function IsValid should have comment or be unexported (golint)
    • Line 68: warning: exported function DefaultHook should have comment or be unexported (golint)
    • Line 78: warning: exported function FilterAll should have comment or be unexported (golint)
    • csense/storage/storage.go
    • Line 11: warning: exported var ErrNotSupported should have comment or be unexported (golint)
    • Line 15: warning: exported type Driver should have comment or be unexported (golint)
    • Line 22: warning: exported type HookStore should have comment or be unexported (golint)
    • Line 29: warning: exported type HookFilters should have comment or be unexported (golint)
    • csense/configuration/config.go
    • Line 12: warning: exported type LogConfig should have comment or be unexported (golint)
    • Line 18: warning: exported type CORSConfig should have comment or be unexported (golint)
    • Line 25: warning: exported type HTTPConfig should have comment or be unexported (golint)
    • Line 32: warning: exported type Config should have comment or be unexported (golint)
    • Line 61: warning: exported function Parse should have comment or be unexported (golint)
    • csense/api/client/client.go
    • Line 11: warning: exported const CLIENT_USER_AGENT should have comment or be unexported (golint)
    • Line 13: warning: exported type Client should have comment or be unexported (golint)
    • Line 20: warning: exported function New should have comment or be unexported (golint)
    • Line 40: warning: exported method Client.Ping should have comment or be unexported (golint)
    • csense/containers/driver/factory/factory.go
    • Line 11: warning: exported type ContainersDriverFactory should have comment or be unexported (golint)
    • Line 15: warning: exported function Register should have comment or be unexported (golint)
    • Line 27: warning: exported function Create should have comment or be unexported (golint)
    • Line 35: warning: exported type InvalidContainersDriverError should have comment or be unexported (golint)
    • csense/actions/actions.go
    • Line 15: warning: exported function DeleteHook should have comment or be unexported (golint)
    • Line 19: warning: exported function StoreHook should have comment or be unexported (golint)
    • Line 28: warning: exported function FindHook should have comment or be unexported (golint)
    • Line 32: warning: exported function SearchHooks should have comment or be unexported (golint)
    • Line 37: warning: exported function GetContainerEvents should have comment or be unexported (golint)
    • Line 59: warning: exported function GetContainer should have comment or be unexported (golint)
    • csense/api/v1/errors.go
    • Line 9: warning: exported const ErrorGroup should have comment or be unexported (golint)
    • Line 12: warning: exported var ErrorCodeHookUnknown should have comment or be unexported (golint)
    • csense/agent/agent.go
    • Line 19: warning: exported type Agent should have comment or be unexported (golint)
    • Line 27: warning: exported method Agent.Run should have comment or be unexported (golint)
    • Line 55: warning: exported method Agent.ProcessEvents should have comment or be unexported (golint)
    • Line 102: warning: exported function New should have comment or be unexported (golint)
    • csense/api/v1/models.go
    • Line 8: warning: exported type Operand should have comment or be unexported (golint)
    • Line 11: warning: exported var OperandEqual should have comment or be unexported (golint)
    • Line 18: warning: exported type Condition should have comment or be unexported (golint)
    • Line 23: warning: exported type Criteria should have comment or be unexported (golint)
    • Line 28: warning: exported type ContainerField should have comment or be unexported (golint)
    • Line 31: warning: exported var FieldName should have comment or be unexported (golint)
    • Line 35: warning: exported type BodyFormat should have comment or be unexported (golint)
    • Line 38: warning: exported var FormatNone should have comment or be unexported (golint)
    • Line 43: warning: exported type EventType should have comment or be unexported (golint)
    • Line 46: warning: exported var EventCreate should have comment or be unexported (golint)
    • Line 50: warning: exported type Hook should have comment or be unexported (golint)
    • Line 61: warning: exported type ModifyHookRequest should have comment or be unexported (golint)
    • Line 70: warning: exported type NewHookRequest should have comment or be unexported (golint)
    • Line 79: warning: exported type Reaction should have comment or be unexported (golint)
    • Line 86: warning: exported type HostInfo should have comment or be unexported (golint)
    • Line 90: warning: exported type ContainerInfo should have comment or be unexported (golint)
    • Line 98: warning: exported type StateChange should have comment or be unexported (golint)
    • Line 104: warning: exported type ContainerEvent should have comment or be unexported (golint)
    • Line 110: warning: exported type ContainerState should have comment or be unexported (golint)
    • Line 113: warning: exported const StateRunning should have comment (or a comment on this block) or be unexported (golint)
    • Line 118: warning: exported type ContainerEventType should have comment or be unexported (golint)
    • Line 121: warning: exported const EventContainerCreation should have comment (or a comment on this block) or be unexported (golint)
    • Line 128: warning: exported function StateFromEvent should have comment or be unexported (golint)
    • Line 139: warning: exported function ServeJSON should have comment or be unexported (golint)
    • csense/api/client/hooks.go
    • Line 11: warning: exported type HooksAPI should have comment or be unexported (golint)
    • Line 19: warning: exported method Client.Hooks should have comment or be unexported (golint)
    • csense/actions/pack.go
    • Line 17: warning: exported type Pack should have comment or be unexported (golint)
    • Line 53: warning: exported function FromConfig should have comment or be unexported (golint)
    • csense/commands/commands.go
    • Line 7: warning: exported type DeleteHook should have comment or be unexported (golint)
    • Line 11: warning: exported type StoreHook should have comment or be unexported (golint)
    • csense/api/server/server.go
    • Line 18: warning: exported function New should have comment or be unexported (golint)
    • Line 61: warning: exported type Server should have comment or be unexported (golint)
    • Line 76: warning: exported method Server.ListenAndServe 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!