Preparing report...

Report for github.com/jmfgdev/ssh-chat

(v0.0.0-20171119043514-8103da3c5ee0)

A+    Excellent!    Found 21 issues across 41 files

Tweet

gofmt97%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


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!


gocyclo90%

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.

    • set/set_test.go
    • Line 8: warning: cyclomatic complexity 26 of function TestSetExpiring() is high (> 15) (gocyclo)
    • host.go
    • Line 281: warning: cyclomatic complexity 24 of function (*Host).InitCommands() is high (> 15) (gocyclo)

golint60%

Golint is a linter for Go source code.

    • set/set.go
    • Line 9: warning: comment on exported var ErrCollision should be of the form "ErrCollision ..." (golint)
    • Line 12: warning: comment on exported var ErrMissing should be of the form "ErrMissing ..." (golint)
    • Line 15: warning: comment on exported var ErrNil should be of the form "ErrNil ..." (golint)
    • Line 18: warning: exported type IterFunc should have comment or be unexported (golint)
    • Line 20: warning: exported type Set should have comment or be unexported (golint)
    • chat/logger.go
    • Line 8: warning: exported function SetLogger should have comment or be unexported (golint)
    • godoc.go
    • Line 1: warning: package comment should be of the form "Package sshchat ..." (golint)
    • identity.go
    • Line 29: warning: exported method Identity.ID should have comment or be unexported (golint)
    • Line 33: warning: exported method Identity.SetID should have comment or be unexported (golint)
    • Line 37: warning: exported method Identity.SetName should have comment or be unexported (golint)
    • Line 41: warning: exported method Identity.Name should have comment or be unexported (golint)
    • set/item.go
    • Line 5: warning: comment on exported type Item should be of the form "Item ..." (with optional leading article) (golint)
    • Line 24: warning: exported function Itemize should have comment or be unexported (golint)
    • Line 28: warning: exported type StringItem should have comment or be unexported (golint)
    • Line 30: warning: exported method StringItem.Key should have comment or be unexported (golint)
    • Line 34: warning: exported method StringItem.Value should have comment or be unexported (golint)
    • Line 38: warning: exported function Expire should have comment or be unexported (golint)
    • Line 45: warning: exported type ExpiringItem should have comment or be unexported (golint)
    • Line 50: warning: exported method ExpiringItem.Expired should have comment or be unexported (golint)
    • Line 54: warning: exported method ExpiringItem.Value should have comment or be unexported (golint)
    • chat/command.go
    • Line 15: warning: comment on exported var ErrInvalidCommand should be of the form "ErrInvalidCommand ..." (golint)
    • Line 18: warning: comment on exported var ErrNoOwner should be of the form "ErrNoOwner ..." (golint)
    • Line 21: warning: comment on exported var ErrMissingArg should be of the form "ErrMissingArg ..." (golint)
    • Line 25: warning: comment on exported var ErrMissingPrefix should be of the form "ErrMissingPrefix ..." (golint)
    • chat/room.go
    • Line 16: warning: comment on exported var ErrRoomClosed should be of the form "ErrRoomClosed ..." (golint)
    • Line 20: warning: comment on exported var ErrInvalidName should be of the form "ErrInvalidName ..." (golint)
    • Line 202: warning: exported method Room.MemberByID should have comment or be unexported (golint)
    • logger.go
    • Line 12: warning: exported function SetLogger should have comment or be unexported (golint)
    • sshd/terminal.go
    • Line 17: warning: exported var ErrNoSessionChannel should have comment or be unexported (golint)
    • Line 18: warning: exported var ErrNotSessionChannel should have comment or be unexported (golint)
    • Line 55: warning: comment on exported type Terminal should be of the form "Terminal ..." (with optional leading article) (golint)
    • Line 65: warning: comment on exported function NewTerminal should be of the form "NewTerminal ..." (golint)
    • Line 106: warning: comment on exported function NewSession should be of the form "NewSession ..." (golint)
    • chat/message/user.go
    • Line 19: warning: exported var ErrUserClosed should have comment or be unexported (golint)
    • Line 38: warning: exported function NewUser should have comment or be unexported (golint)
    • Line 52: warning: exported function NewUserScreen should have comment or be unexported (golint)
    • Line 59: warning: exported method User.Config should have comment or be unexported (golint)
    • Line 65: warning: exported method User.SetConfig should have comment or be unexported (golint)
    • Line 71: warning: comment on exported method User.SetID should be of the form "SetID ..." (golint)
    • Line 97: warning: comment on exported method User.Close should be of the form "Close ..." (golint)
    • Line 124: warning: comment on exported method User.ConsumeOne should be of the form "ConsumeOne ..." (golint)
    • Line 129: warning: comment on exported method User.HasMessages should be of the form "HasMessages ..." (golint)
    • Line 178: warning: comment on exported method User.Send should be of the form "Send ..." (golint)
    • Line 192: warning: comment on exported type UserConfig should be of the form "UserConfig ..." (with optional leading article) (golint)
    • Line 200: warning: comment on exported var DefaultUserConfig should be of the form "DefaultUserConfig ..." (golint)
    • auth.go
    • Line 13: warning: comment on exported var ErrNotWhitelisted should be of the form "ErrNotWhitelisted ..." (golint)
    • Line 16: warning: comment on exported var ErrBanned should be of the form "ErrBanned ..." (golint)
    • Line 144: warning: comment on exported method Auth.BanAddr should be of the form "BanAddr ..." (golint)
    • sshd/logger.go
    • Line 8: warning: exported function SetLogger should have comment or be unexported (golint)
    • sshd/net.go
    • Line 10: warning: comment on exported type SSHListener should be of the form "SSHListener ..." (with optional leading article) (golint)
    • Line 19: warning: comment on exported function ListenSSH should be of the form "ListenSSH ..." (golint)
    • Line 46: warning: comment on exported method SSHListener.Serve should be of the form "Serve ..." (golint)
    • chat/message/message.go
    • Line 17: warning: exported type MessageTo should have comment or be unexported (golint)
    • Line 22: warning: exported type MessageFrom should have comment or be unexported (golint)
    • Line 27: warning: exported function ParseInput should have comment or be unexported (golint)
    • Line 43: warning: exported function NewMsg should have comment or be unexported (golint)
    • Line 61: warning: exported method Msg.Command should have comment or be unexported (golint)
    • Line 65: warning: exported method Msg.Timestamp should have comment or be unexported (golint)
    • Line 75: warning: exported function NewPublicMsg should have comment or be unexported (golint)
    • Line 85: warning: exported method PublicMsg.From should have comment or be unexported (golint)
    • Line 89: warning: exported method PublicMsg.ParseCommand should have comment or be unexported (golint)
    • Line 107: warning: exported method PublicMsg.Render should have comment or be unexported (golint)
    • Line 115: warning: exported method PublicMsg.RenderFor should have comment or be unexported (golint)
    • Line 143: warning: exported function NewEmoteMsg should have comment or be unexported (golint)
    • Line 153: warning: exported method EmoteMsg.Render should have comment or be unexported (golint)
    • Line 167: warning: exported function NewPrivateMsg should have comment or be unexported (golint)
    • Line 174: warning: exported method PrivateMsg.To should have comment or be unexported (golint)
    • Line 178: warning: exported method PrivateMsg.Render should have comment or be unexported (golint)
    • Line 197: warning: exported function NewSystemMsg should have comment or be unexported (golint)
    • Line 207: warning: exported method SystemMsg.Render should have comment or be unexported (golint)
    • Line 218: warning: exported method SystemMsg.To should have comment or be unexported (golint)
    • Line 228: warning: exported function NewAnnounceMsg should have comment or be unexported (golint)
    • Line 237: warning: exported method AnnounceMsg.Render should have comment or be unexported (golint)
    • Line 248: warning: exported type CommandMsg should have comment or be unexported (golint)
    • Line 254: warning: exported method CommandMsg.Command should have comment or be unexported (golint)
    • Line 258: warning: exported method CommandMsg.Args should have comment or be unexported (golint)
    • Line 262: warning: exported method CommandMsg.Body should have comment or be unexported (golint)
    • chat/message/theme.go
    • Line 27: warning: comment on exported const Newline should be of the form "Newline ..." (golint)
    • Line 30: warning: comment on exported const Bel should be of the form "Bel ..." (golint)
    • Line 34: warning: comment on exported type Style should be of the form "Style ..." (with optional leading article) (golint)
    • Line 52: warning: comment on exported type Color256 should be of the form "Color256 ..." (with optional leading article) (golint)
    • Line 60: warning: comment on exported method Color256.Format should be of the form "Format ..." (golint)
    • Line 65: warning: exported function Color256Palette should have comment or be unexported (golint)
    • Line 77: warning: comment on exported type Color0 should be of the form "Color0 ..." (with optional leading article) (golint)
    • Line 85: warning: comment on exported method Color0.Format should be of the form "Format ..." (golint)
    • Line 90: warning: comment on exported type Palette should be of the form "Palette ..." (with optional leading article) (golint)
    • Line 104: warning: exported method Palette.Len should have comment or be unexported (golint)
    • Line 116: warning: comment on exported type Theme should be of the form "Theme ..." (with optional leading article) (golint)
    • Line 125: warning: exported method Theme.ID should have comment or be unexported (golint)
    • Line 129: warning: comment on exported method Theme.ColorName should be of the form "ColorName ..." (golint)
    • Line 138: warning: comment on exported method Theme.ColorPM should be of the form "ColorPM ..." (golint)
    • Line 147: warning: comment on exported method Theme.ColorSys should be of the form "ColorSys ..." (golint)
    • Line 164: warning: comment on exported var Themes should be of the form "Themes ..." (golint)
    • Line 167: warning: comment on exported var DefaultTheme should be of the form "DefaultTheme ..." (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!


misspell97%

Misspell Finds commonly misspelled English words