Preparing report...

Report for github.com/blacknon/lssh

A+    Excellent!    Found 20 issues across 53 files

Tweet

gofmt98%

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!


gocyclo73%

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.

    • lssh/ssh/auth.go
    • Line 21: warning: cyclomatic complexity 21 of function (*Run).CreateAuthMethodMap() is high (> 15) (gocyclo)
    • lssh/sftp/shell.go
    • Line 113: warning: cyclomatic complexity 36 of function (*RunSftp).Completer() is high (> 15) (gocyclo)
    • Line 47: warning: cyclomatic complexity 25 of function (*RunSftp).Executor() is high (> 15) (gocyclo)
    • lssh/ssh/cmd.go
    • Line 24: warning: cyclomatic complexity 25 of function (*Run).cmd() is high (> 15) (gocyclo)

golint81%

Golint is a linter for Go source code.

    • lssh/list/list.go
    • Line 5: warning: package comment should be of the form "Package list ..." (golint)
    • Line 47: warning: exported type TermInfo should have comment or be unexported (golint)
    • Line 54: warning: exported type ListArrayInfo should have comment or be unexported (golint)
    • Line 110: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • lssh/ssh/run.go
    • Line 36: warning: comment on exported type Run should be of the form "Run ..." (with optional leading article) (golint)
    • Line 124: warning: comment on exported type PathSet should be of the form "PathSet ..." (with optional leading article) (golint)
    • Line 131: warning: exported const AUTHKEY_PASSWORD should have comment (or a comment on this block) or be unexported (golint)
    • lssh/scp/main.go
    • Line 29: warning: exported type Scp should have comment or be unexported (golint)
    • Line 52: warning: exported type ScpInfo should have comment or be unexported (golint)
    • Line 63: warning: exported type ScpConnect should have comment or be unexported (golint)
    • Line 74: warning: exported type PathSet should have comment or be unexported (golint)
    • lssh/conf/conf.go
    • Line 5: warning: package comment should be of the form "Package conf ..." (golint)
    • Line 169: warning: comment on exported type PortForward should be of the form "PortForward ..." (with optional leading article) (golint)
    • lssh/common/common.go
    • Line 5: warning: package comment should be of the form "Package common ..." (golint)
    • Line 112: warning: comment on exported function GetOrderNumber should be of the form "GetOrderNumber ..." (golint)
    • Line 248: warning: comment on exported function GetIdFromName should be of the form "GetIdFromName ..." (golint)
    • Line 264: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 269: warning: comment on exported function GetNameFromId should be of the form "GetNameFromId ..." (golint)
    • Line 284: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • lssh/ssh/auth.go
    • Line 18: warning: exported const SSH_AUTH_SOCK should have comment or be unexported (golint)
    • Line 118: warning: comment on exported method Run.SetupSshAgent should be of the form "SetupSshAgent ..." (golint)
    • lssh/ssh/pshell_cmd.go
    • Line 147: warning: don't use underscores in Go names; method buildin_history should be buildinHistory (golint)
    • Line 172: warning: don't use underscores in Go names; method buildin_outlist should be buildinOutlist (golint)
    • Line 197: warning: don't use underscores in Go names; method buildin_out should be buildinOut (golint)
    • lssh/cmd/lscp/args.go
    • Line 22: warning: exported function Lscp should have comment or be unexported (golint)
    • Line 141: warning: don't use underscores in Go names; var from_l should be fromL (golint)
    • Line 154: warning: don't use underscores in Go names; var to_l should be toL (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!