Preparing report...

Report for github.com/axetroy/watchdog

A+    Excellent!    Found 28 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!


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.


golint31%

Golint is a linter for Go source code.

    • watchdog/job.go
    • Line 11: warning: exported function NewRunnerJob should have comment or be unexported (golint)
    • Line 17: warning: exported type RunnerJob should have comment or be unexported (golint)
    • Line 21: warning: exported method RunnerJob.Name should have comment or be unexported (golint)
    • Line 25: warning: exported method RunnerJob.GetService should have comment or be unexported (golint)
    • Line 29: warning: exported method RunnerJob.Do should have comment or be unexported (golint)
    • watchdog/config.go
    • Line 23: warning: exported type Config should have comment or be unexported (golint)
    • Line 30: warning: exported type Service should have comment or be unexported (golint)
    • Line 42: warning: comment on exported type Reporter should be of the form "Reporter ..." (with optional leading article) (golint)
    • Line 55: warning: exported var DetectProtocolSupported should have comment or be unexported (golint)
    • Line 198: warning: exported method Config.Validate should have comment or be unexported (golint)
    • Line 221: warning: exported function NewConfig should have comment or be unexported (golint)
    • Line 247: warning: exported function NewConfigFromFile should have comment or be unexported (golint)
    • watchdog/internal/scheduling/scheduling.go
    • Line 13: warning: exported type Job should have comment or be unexported (golint)
    • Line 19: warning: exported type Options should have comment or be unexported (golint)
    • Line 27: warning: exported function NewScheduling should have comment or be unexported (golint)
    • Line 38: warning: exported type Scheduling should have comment or be unexported (golint)
    • Line 83: warning: comment on exported method Scheduling.Start should be of the form "Start ..." (golint)
    • watchdog/alarm.go
    • Line 9: warning: comment on exported type Alarm should be of the form "Alarm ..." (with optional leading article) (golint)
    • Line 22: warning: exported type AlertOptions should have comment or be unexported (golint)
    • Line 29: warning: exported function NewAlarm should have comment or be unexported (golint)
    • Line 38: warning: exported method Alarm.Tick should have comment or be unexported (golint)
    • watchdog/internal/protocol/smtp.go
    • Line 14: warning: exported function NewLoginAuth should have comment or be unexported (golint)
    • Line 36: warning: exported type SMTPAuthWithPassword should have comment or be unexported (golint)
    • Line 41: warning: exported function PingSMTP should have comment or be unexported (golint)
    • watchdog/internal/notify/webhook.go
    • Line 14: warning: exported type WebhookResult should have comment or be unexported (golint)
    • Line 41: warning: exported function Webhook should have comment or be unexported (golint)
    • Line 85: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • watchdog/serve.go
    • Line 17: warning: exported type HTTPHandler should have comment or be unexported (golint)
    • Line 21: warning: exported type ServiceStatus should have comment or be unexported (golint)
    • Line 70: warning: exported function Serve should have comment or be unexported (golint)
    • watchdog/stroage.go
    • Line 9: warning: exported var Store should have comment or be unexported (golint)
    • Line 21: warning: exported type Storage should have comment or be unexported (golint)
    • Line 28: warning: exported type StorageMemory should have comment or be unexported (golint)
    • Line 32: warning: exported function NewStorageMemory should have comment or be unexported (golint)
    • Line 38: warning: exported method StorageMemory.SetItem should have comment or be unexported (golint)
    • Line 59: warning: exported method StorageMemory.GetItem should have comment or be unexported (golint)
    • Line 64: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 69: warning: exported method StorageMemory.RemoveItem should have comment or be unexported (golint)
    • Line 73: warning: exported method StorageMemory.Clear should have comment or be unexported (golint)
    • watchdog/internal/socket/event.go
    • Line 3: warning: exported type Event should have comment or be unexported (golint)
    • Line 6: warning: exported const EventInit should have comment (or a comment on this block) or be unexported (golint)
    • watchdog/internal/socket/pool.go
    • Line 7: warning: comment on exported type SocketPool should be of the form "SocketPool ..." (with optional leading article) (golint)
    • Line 13: warning: exported method SocketPool.Remove should have comment or be unexported (golint)
    • Line 19: warning: exported method SocketPool.Add should have comment or be unexported (golint)
    • Line 25: warning: exported method SocketPool.Broadcast should have comment or be unexported (golint)
    • Line 34: warning: exported method SocketPool.BroadcastTo should have comment or be unexported (golint)
    • Line 45: warning: exported var Pool should have comment or be unexported (golint)
    • watchdog/internal/socket/socket.go
    • Line 19: warning: exported type Data should have comment or be unexported (golint)
    • Line 24: warning: exported type Socket should have comment or be unexported (golint)
    • Line 29: warning: exported function NewSocket should have comment or be unexported (golint)
    • Line 48: warning: exported method Socket.ReadMessage should have comment or be unexported (golint)
    • Line 52: warning: exported method Socket.WriteMessage should have comment or be unexported (golint)
    • Line 56: warning: exported method Socket.WriteJSON should have comment or be unexported (golint)
    • Line 60: warning: exported method Socket.Close 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!