Preparing report...

Report for github.com/ergochat/irc-go

(v0.1.0)

A+    Excellent!    Found 14 issues across 29 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!


gocyclo82%

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.

    • ircmsg/message.go
    • Line 379: warning: cyclomatic complexity 32 of function (*Message).line() is high (> 15) (gocyclo)
    • Line 199: warning: cyclomatic complexity 23 of function parseLine() is high (> 15) (gocyclo)
    • ircevent/irc.go
    • Line 534: warning: cyclomatic complexity 31 of function (*Connection).Connect() is high (> 15) (gocyclo)
    • ircfmt/ircfmt.go
    • Line 113: warning: cyclomatic complexity 21 of function Escape() is high (> 15) (gocyclo)
    • Line 260: warning: cyclomatic complexity 16 of function Unescape() is high (> 15) (gocyclo)

golint58%

Golint is a linter for Go source code.

    • ircevent/irc.go
    • Line 38: warning: exported const Version should have comment (or a comment on this block) or be unexported (golint)
    • Line 53: warning: error var ClientDisconnected should have name of the form ErrFoo (golint)
    • Line 53: warning: exported var ClientDisconnected should have comment or be unexported (golint)
    • Line 54: warning: error var ServerTimedOut should have name of the form ErrFoo (golint)
    • Line 55: warning: error var ServerDisconnected should have name of the form ErrFoo (golint)
    • Line 56: warning: error var SASLFailed should have name of the form ErrFoo (golint)
    • Line 58: warning: error var CapabilityNotNegotiated should have name of the form ErrFoo (golint)
    • Line 60: warning: error var serverDidNotQuit should have name of the form errFoo (golint)
    • Line 61: warning: error var clientHasQuit should have name of the form errFoo (golint)
    • Line 268: warning: comment on exported method Connection.Loop should be of the form "Loop ..." (golint)
    • Line 356: warning: comment on exported method Connection.SendIRCMessage should be of the form "SendIRCMessage ..." (golint)
    • Line 368: warning: comment on exported method Connection.SendWithTags should be of the form "SendWithTags ..." (golint)
    • Line 399: warning: comment on exported method Connection.SendRaw should be of the form "SendRaw ..." (golint)
    • Line 408: warning: comment on exported method Connection.Join should be of the form "Join ..." (golint)
    • Line 414: warning: comment on exported method Connection.Part should be of the form "Part ..." (golint)
    • Line 420: warning: comment on exported method Connection.Notice should be of the form "Notice ..." (golint)
    • Line 426: warning: comment on exported method Connection.Noticef should be of the form "Noticef ..." (golint)
    • Line 432: warning: comment on exported method Connection.Privmsg should be of the form "Privmsg ..." (golint)
    • Line 438: warning: comment on exported method Connection.Privmsgf should be of the form "Privmsgf ..." (golint)
    • Line 443: warning: comment on exported method Connection.Action should be of the form "Action ..." (golint)
    • Line 449: warning: comment on exported method Connection.Actionf should be of the form "Actionf ..." (golint)
    • Line 454: warning: comment on exported method Connection.SetNick should be of the form "SetNick ..." (golint)
    • Line 464: warning: comment on exported method Connection.CurrentNick should be of the form "CurrentNick ..." (golint)
    • Line 471: warning: comment on exported method Connection.PreferredNick should be of the form "PreferredNick ..." (golint)
    • Line 486: warning: comment on exported method Connection.AcknowledgedCaps should be of the form "AcknowledgedCaps ..." (golint)
    • Line 495: warning: comment on exported method Connection.ISupport should be of the form "ISupport ..." (golint)
    • Line 505: warning: comment on exported method Connection.Connected should be of the form "Connected ..." (golint)
    • Line 709: warning: don't use underscores in Go names; var remaining_caps should be remainingCaps (golint)
    • Line 731: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • ircevent/irc_callback.go
    • Line 19: warning: comment on exported type CallbackID should be of the form "CallbackID ..." (with optional leading article) (golint)
    • Line 25: warning: comment on exported method Connection.AddCallback should be of the form "AddCallback ..." (golint)
    • Line 67: warning: comment on exported method Connection.RemoveCallback should be of the form "RemoveCallback ..." (golint)
    • Line 96: warning: comment on exported method Connection.ClearCallback should be of the form "ClearCallback ..." (golint)
    • Line 105: warning: comment on exported method Connection.ReplaceCallback should be of the form "ReplaceCallback ..." (golint)
    • Line 153: warning: comment on exported method Connection.AddConnectCallback should be of the form "AddConnectCallback ..." (golint)
    • Line 348: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 662: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • ircevent/irc_struct.go
    • Line 20: warning: exported type Callback should have comment or be unexported (golint)
    • Line 27: warning: exported type BatchCallback should have comment or be unexported (golint)
    • Line 34: warning: exported type LabelCallback should have comment or be unexported (golint)
    • Line 41: warning: exported type Connection should have comment or be unexported (golint)
    • Line 193: warning: comment on exported function ExtractNick should be of the form "ExtractNick ..." (golint)
    • Line 202: warning: comment on exported function SplitNUH should be of the form "SplitNUH ..." (golint)
    • ircevent/irc_test.go
    • Line 18: warning: don't use underscores in Go names; const verbose_tests should be verboseTests (golint)
    • Line 19: warning: don't use underscores in Go names; const debug_tests should be debugTests (golint)
    • doc.go
    • Line 4: warning: package comment should be of the form "Package ircgo ..." (golint)
    • ircreader/ircreader.go
    • Line 21: warning: exported var ErrReadQ should have comment or be unexported (golint)
    • Line 24: warning: exported type Reader should have comment or be unexported (golint)
    • Line 37: warning: comment on exported function NewIRCReader should be of the form "NewIRCReader ..." (golint)
    • Line 44: warning: comment on exported method Reader.Initialize should be of the form "Initialize ..." (golint)
    • Line 53: warning: comment on exported method Reader.ReadLine should be of the form "ReadLine ..." (golint)
    • ircmsg/userhost.go
    • Line 12: warning: error var MalformedNUH should have name of the form ErrFoo (golint)
    • Line 12: warning: exported var MalformedNUH should have comment or be unexported (golint)
    • ircevent/numerics.go
    • Line 4: warning: exported const RPL_WELCOME should have comment (or a comment on this block) or be unexported (golint)
    • Line 10: warning: comment on exported const RPL_LOGGEDIN should be of the form "RPL_LOGGEDIN ..." (golint)
    • ircutils/unicode.go
    • Line 12: warning: comment on exported function TruncateUTF8Safe should be of the form "TruncateUTF8Safe ..." (golint)
    • Line 29: warning: comment on exported function SanitizeText should be of the form "SanitizeText ..." (golint)
    • ircmsg/message.go
    • Line 16: warning: comment on exported const MaxlenTags should be of the form "MaxlenTags ..." (golint)
    • Line 20: warning: comment on exported const MaxlenTagData should be of the form "MaxlenTagData ..." (golint)
    • Line 23: warning: comment on exported const MaxlenClientTagData should be of the form "MaxlenClientTagData ..." (golint)
    • Line 27: warning: comment on exported const MaxlenServerTagData should be of the form "MaxlenServerTagData ..." (golint)
    • Line 30: warning: comment on exported const MaxlenTagsFromClient should be of the form "MaxlenTagsFromClient ..." (golint)
    • Line 298: warning: receiver name ircmsg should be consistent with previous receiver name msg for Message (golint)
    • Line 340: warning: receiver name ircmsg should be consistent with previous receiver name msg for Message (golint)
    • Line 349: warning: receiver name ircmsg should be consistent with previous receiver name msg for Message (golint)
    • Line 358: warning: receiver name ircmsg should be consistent with previous receiver name msg for Message (golint)
    • Line 379: warning: receiver name ircmsg should be consistent with previous receiver name msg for Message (golint)
    • ircmsg/tags.go
    • Line 52: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 60: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!