Preparing report...

Report for github.com/bingoohuang/bssh

A+    Excellent!    Found 15 issues across 75 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!


gocyclo94%

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.

    • bssh/sftp/shell.go
    • Line 50: warning: cyclomatic complexity 23 of function (*RunSftp).Executor() is high (> 15) (gocyclo)
    • Line 109: warning: cyclomatic complexity 19 of function (*RunSftp).Completer() is high (> 15) (gocyclo)

golint86%

Golint is a linter for Go source code.

    • bssh/sshlib/cmd.go
    • Line 15: warning: comment on exported method Connect.Command should be of the form "Command ..." (golint)
    • bssh/scp/main.go
    • Line 430: 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)
    • bssh/conf/conf_host.go
    • Line 11: warning: exported type ArgOption should have comment or be unexported (golint)
    • Line 17: warning: exported type ArgOptions should have comment or be unexported (golint)
    • Line 19: warning: exported method ArgOptions.FindByName should have comment or be unexported (golint)
    • Line 28: warning: exported method ArgOptions.FindByShort should have comment or be unexported (golint)
    • Line 37: warning: exported method ArgOptions.Values should have comment or be unexported (golint)
    • Line 46: warning: exported function ParseMoreOptions should have comment or be unexported (golint)
    • bssh/sshlib/agent.go
    • Line 18: warning: comment on exported function ConnectSshAgent should be of the form "ConnectSshAgent ..." (golint)
    • Line 54: warning: comment on exported method Connect.ForwardSshAgent should be of the form "ForwardSshAgent ..." (golint)
    • bssh/sshlib/proxy.go
    • Line 19: warning: comment on exported type Proxy should be of the form "Proxy ..." (with optional leading article) (golint)
    • Line 66: warning: comment on exported method Proxy.CreateHttpProxyDialer should be of the form "CreateHttpProxyDialer ..." (golint)
    • Line 94: warning: comment on exported method Proxy.CreateSocks5ProxyDialer should be of the form "CreateSocks5ProxyDialer ..." (golint)
    • Line 124: warning: comment on exported type NetPipe should be of the form "NetPipe ..." (with optional leading article) (golint)
    • Line 129: warning: comment on exported method NetPipe.Dial should be of the form "Dial ..." (golint)
    • bssh/sshlib/shell.go
    • Line 19: warning: comment on exported method Connect.ShellInitial should be of the form "ShellInitial ..." (golint)
    • Line 100: warning: comment on exported method Connect.CmdShell should be of the form "CmdShell ..." (golint)
    • bssh/conf/conf.go
    • Line 16: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 604: warning: exported method Config.IsDisableAutoEncryptPwd should have comment or be unexported (golint)
    • Line 661: warning: exported function AppendFile should have comment or be unexported (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!