Preparing report...

Report for github.com/genofire/logmania

A    Great!    Found 34 issues across 47 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!


gocyclo95%

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.


golint42%

Golint is a linter for Go source code.

    • logmania/output/main.go
    • Line 10: warning: exported var Register should have comment or be unexported (golint)
    • Line 12: warning: exported type Output should have comment or be unexported (golint)
    • Line 18: warning: exported type Init should have comment or be unexported (golint)
    • Line 20: warning: exported function Add should have comment or be unexported (golint)
    • logmania/database/main.go
    • Line 11: warning: exported const AlertMsg should have comment or be unexported (golint)
    • Line 13: warning: exported type DB should have comment or be unexported (golint)
    • Line 30: warning: exported method DB.SendTo should have comment or be unexported (golint)
    • Line 68: warning: exported method DB.Alert should have comment or be unexported (golint)
    • logmania/database/read.go
    • Line 8: warning: exported function ReadDBFile should have comment or be unexported (golint)
    • Line 19: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • logmania/input/main.go
    • Line 7: warning: exported var Register should have comment or be unexported (golint)
    • Line 9: warning: exported type Input should have comment or be unexported (golint)
    • Line 14: warning: exported type Init should have comment or be unexported (golint)
    • Line 16: warning: exported function Add should have comment or be unexported (golint)
    • logmania/input/all/internal.go
    • Line 9: warning: exported type Input should have comment or be unexported (golint)
    • Line 14: warning: exported function Init should have comment or be unexported (golint)
    • Line 36: warning: exported method Input.Listen should have comment or be unexported (golint)
    • Line 42: warning: exported method Input.Close should have comment or be unexported (golint)
    • logmania/output/file/main.go
    • Line 22: warning: exported type Output should have comment or be unexported (golint)
    • Line 30: warning: exported type OutputConfig should have comment or be unexported (golint)
    • Line 35: warning: exported function Init should have comment or be unexported (golint)
    • Line 66: warning: exported method Output.Default should have comment or be unexported (golint)
    • Line 88: warning: exported method Output.Send should have comment or be unexported (golint)
    • logmania/lib/config.go
    • Line 3: warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint)
    • logmania/database/notify.go
    • Line 11: warning: exported type Notify should have comment or be unexported (golint)
    • Line 20: warning: exported method Notify.Init should have comment or be unexported (golint)
    • Line 44: warning: exported method Notify.AddRegex should have comment or be unexported (golint)
    • Line 51: warning: exported method Notify.AddRegexReplace should have comment or be unexported (golint)
    • Line 59: warning: exported method Notify.RunReplace should have comment or be unexported (golint)
    • Line 67: warning: exported method Notify.Address should have comment or be unexported (golint)
    • Line 71: warning: exported method Notify.Send should have comment or be unexported (golint)
    • Line 85: warning: exported method DB.InitNotify should have comment or be unexported (golint)
    • Line 94: warning: exported method DB.AddNotify should have comment or be unexported (golint)
    • Line 99: warning: exported method DB.NewNotify should have comment or be unexported (golint)
    • logmania/input/journald_json/main.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 16: warning: exported type Input should have comment or be unexported (golint)
    • Line 22: warning: exported type InputConfig should have comment or be unexported (golint)
    • Line 27: warning: exported function Init should have comment or be unexported (golint)
    • Line 52: warning: exported method Input.Listen should have comment or be unexported (golint)
    • Line 71: warning: exported method Input.Close should have comment or be unexported (golint)
    • logmania/output/all/internal.go
    • Line 14: warning: exported type Output should have comment or be unexported (golint)
    • Line 21: warning: exported function Init should have comment or be unexported (golint)
    • Line 72: warning: exported method Output.Send should have comment or be unexported (golint)
    • Line 89: warning: exported method Output.Close should have comment or be unexported (golint)
    • logmania/lib/syslog/main.go
    • Line 11: warning: exported type SyslogMessage should have comment or be unexported (golint)
    • Line 21: warning: exported function Parse should have comment or be unexported (golint)
    • Line 60: warning: exported method SyslogMessage.Priority should have comment or be unexported (golint)
    • Line 64: warning: exported method SyslogMessage.Dump should have comment or be unexported (golint)
    • logmania/input/syslog/main.go
    • Line 16: warning: exported type Input should have comment or be unexported (golint)
    • Line 22: warning: exported type InputConfig should have comment or be unexported (golint)
    • Line 27: warning: exported function Init should have comment or be unexported (golint)
    • Line 52: warning: exported method Input.Listen should have comment or be unexported (golint)
    • Line 71: warning: exported method Input.Close should have comment or be unexported (golint)
    • logmania/output/xmpp/send.go
    • Line 13: warning: exported method Output.Join should have comment or be unexported (golint)
    • Line 33: warning: exported method Output.Send should have comment or be unexported (golint)
    • logmania/bot/command.go
    • Line 9: warning: exported type Command should have comment or be unexported (golint)
    • Line 16: warning: exported method Command.Run should have comment or be unexported (golint)
    • Line 37: warning: exported method Command.Help should have comment or be unexported (golint)
    • logmania/bot/main.go
    • Line 9: warning: exported type Bot should have comment or be unexported (golint)
    • Line 13: warning: exported function NewBot should have comment or be unexported (golint)
    • Line 26: warning: exported method Bot.Handle should have comment or be unexported (golint)
    • logmania/database/host.go
    • Line 7: warning: exported type Host should have comment or be unexported (golint)
    • Line 16: warning: exported method Host.AddNotify should have comment or be unexported (golint)
    • Line 22: warning: exported method Host.DeleteNotify should have comment or be unexported (golint)
    • Line 36: warning: exported method DB.InitHost should have comment or be unexported (golint)
    • Line 55: warning: exported method DB.AddHost should have comment or be unexported (golint)
    • Line 61: warning: exported method DB.GetHost should have comment or be unexported (golint)
    • Line 68: warning: exported method DB.DeleteHost should have comment or be unexported (golint)
    • Line 82: warning: exported method DB.ChangeHostname should have comment or be unexported (golint)
    • Line 88: warning: exported method DB.NewHost should have comment or be unexported (golint)
    • logmania/output/xmpp/main.go
    • Line 24: warning: exported type Output should have comment or be unexported (golint)
    • Line 34: warning: exported type OutputConfig should have comment or be unexported (golint)
    • Line 41: warning: exported function Init should have comment or be unexported (golint)
    • Line 99: warning: exported method Output.Default should have comment or be unexported (golint)
    • Line 103: warning: exported method Output.Close should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign44%

IneffAssign detects ineffectual assignments in Go code.

    • logmania/input/journald_json/internal.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/bdlm/std/logger (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/bdlm/std/logger (invalid package name: "") (ineffassign)
    • logmania/output/xmpp/main.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/mitchellh/mapstructure (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import gosrc.io/xmpp (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import gosrc.io/xmpp/stanza (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import dev.sum7.eu/sum7/logmania/bot (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import dev.sum7.eu/sum7/logmania/database (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import dev.sum7.eu/sum7/logmania/output (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/mitchellh/mapstructure (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import gosrc.io/xmpp (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import gosrc.io/xmpp/stanza (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import dev.sum7.eu/sum7/logmania/bot (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import dev.sum7.eu/sum7/logmania/database (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import dev.sum7.eu/sum7/logmania/output (invalid package name: "") (ineffassign)
    • logmania/bot/filter.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import dev.sum7.eu/sum7/logmania/database (invalid package name: "") (ineffassign)
    • Line 43: warning: regex declared but not used (ineffassign)
    • Line 6: warning: could not import dev.sum7.eu/sum7/logmania/database (invalid package name: "") (ineffassign)
    • Line 43: warning: regex declared but not used (ineffassign)
    • logmania/bot/priority.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/bdlm/log (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/bdlm/std/logger (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/bdlm/std/logger (invalid package name: "") (ineffassign)
    • logmania/bot/main.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/mattn/go-shellwords (invalid package name: "") (ineffassign)
    • Line 27: warning: undeclared name: shellwords (ineffassign)
    • Line 4: warning: "github.com/mattn/go-shellwords" imported but not used (ineffassign)
    • Line 4: warning: could not import github.com/mattn/go-shellwords (invalid package name: "") (ineffassign)
    • Line 27: warning: undeclared name: shellwords (ineffassign)
    • Line 4: warning: "github.com/mattn/go-shellwords" imported but not used (ineffassign)
    • logmania/output/file/main.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/mitchellh/mapstructure (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import dev.sum7.eu/sum7/logmania/bot (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import dev.sum7.eu/sum7/logmania/database (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import dev.sum7.eu/sum7/logmania/output (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/mitchellh/mapstructure (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import dev.sum7.eu/sum7/logmania/bot (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import dev.sum7.eu/sum7/logmania/database (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import dev.sum7.eu/sum7/logmania/output (invalid package name: "") (ineffassign)
    • logmania/cmd/root.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import github.com/spf13/cobra (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import github.com/spf13/cobra (invalid package name: "") (ineffassign)
    • logmania/input/syslog/internal.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/bdlm/std/logger (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import dev.sum7.eu/sum7/logmania/lib/syslog (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/bdlm/std/logger (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import dev.sum7.eu/sum7/logmania/lib/syslog (invalid package name: "") (ineffassign)
    • logmania/cmd/server.go
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 16: warning: cannot find package "." in: (ineffassign)
    • Line 17: warning: cannot find package "." in: (ineffassign)
    • Line 18: warning: cannot find package "." in: (ineffassign)
    • Line 19: warning: cannot find package "." in: (ineffassign)
    • Line 20: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: could not import dev.sum7.eu/genofire/golang-lib/file (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import dev.sum7.eu/genofire/golang-lib/worker (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import dev.sum7.eu/sum7/logmania/bot (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import dev.sum7.eu/sum7/logmania/database (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import dev.sum7.eu/sum7/logmania/input (invalid package name: "") (ineffassign)
    • Line 17: warning: could not import dev.sum7.eu/sum7/logmania/input/all (invalid package name: "") (ineffassign)
    • Line 18: warning: could not import dev.sum7.eu/sum7/logmania/lib (invalid package name: "") (ineffassign)
    • Line 19: warning: could not import dev.sum7.eu/sum7/logmania/output (invalid package name: "") (ineffassign)
    • Line 20: warning: could not import dev.sum7.eu/sum7/logmania/output/all (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import dev.sum7.eu/genofire/golang-lib/file (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import dev.sum7.eu/genofire/golang-lib/worker (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import dev.sum7.eu/sum7/logmania/bot (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import dev.sum7.eu/sum7/logmania/database (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import dev.sum7.eu/sum7/logmania/input (invalid package name: "") (ineffassign)
    • Line 17: warning: could not import dev.sum7.eu/sum7/logmania/input/all (invalid package name: "") (ineffassign)
    • Line 18: warning: could not import dev.sum7.eu/sum7/logmania/lib (invalid package name: "") (ineffassign)
    • Line 19: warning: could not import dev.sum7.eu/sum7/logmania/output (invalid package name: "") (ineffassign)
    • Line 20: warning: could not import dev.sum7.eu/sum7/logmania/output/all (invalid package name: "") (ineffassign)
    • logmania/input/journald_json/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/mitchellh/mapstructure (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import dev.sum7.eu/sum7/logmania/input (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/mitchellh/mapstructure (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import dev.sum7.eu/sum7/logmania/input (invalid package name: "") (ineffassign)
    • logmania/input/all/main.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import dev.sum7.eu/sum7/logmania/input/journald_json (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import dev.sum7.eu/sum7/logmania/input/syslog (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import dev.sum7.eu/sum7/logmania/input/journald_json (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import dev.sum7.eu/sum7/logmania/input/syslog (invalid package name: "") (ineffassign)
    • logmania/output/main.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import dev.sum7.eu/sum7/logmania/bot (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import dev.sum7.eu/sum7/logmania/database (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import dev.sum7.eu/sum7/logmania/bot (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import dev.sum7.eu/sum7/logmania/database (invalid package name: "") (ineffassign)
    • logmania/output/all/internal.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import dev.sum7.eu/sum7/logmania/bot (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import dev.sum7.eu/sum7/logmania/database (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import dev.sum7.eu/sum7/logmania/output (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import dev.sum7.eu/sum7/logmania/bot (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import dev.sum7.eu/sum7/logmania/database (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import dev.sum7.eu/sum7/logmania/output (invalid package name: "") (ineffassign)
    • logmania/output/all/main.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import dev.sum7.eu/sum7/logmania/output/file (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import dev.sum7.eu/sum7/logmania/output/xmpp (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import dev.sum7.eu/sum7/logmania/output/file (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import dev.sum7.eu/sum7/logmania/output/xmpp (invalid package name: "") (ineffassign)
    • logmania/database/read.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import dev.sum7.eu/genofire/golang-lib/file (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import dev.sum7.eu/genofire/golang-lib/file (invalid package name: "") (ineffassign)
    • logmania/database/main.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/bdlm/std/logger (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/bdlm/std/logger (invalid package name: "") (ineffassign)
    • logmania/input/main.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • logmania/input/all/internal.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import dev.sum7.eu/sum7/logmania/input (invalid package name: "") (ineffassign)
    • Line 4: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import dev.sum7.eu/sum7/logmania/input (invalid package name: "") (ineffassign)
    • logmania/bot/hostname.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/ararog/timeago (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/ararog/timeago (invalid package name: "") (ineffassign)
    • logmania/input/syslog/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/mitchellh/mapstructure (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import dev.sum7.eu/sum7/logmania/input (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/mitchellh/mapstructure (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import dev.sum7.eu/sum7/logmania/input (invalid package name: "") (ineffassign)
    • logmania/main.go
    • Line 3: warning: cannot find package "." in: (ineffassign)
    • Line 3: warning: could not import dev.sum7.eu/sum7/logmania/cmd (invalid package name: "") (ineffassign)
    • logmania/output/xmpp/format.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/bdlm/log (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!