Preparing report...

Report for github.com/crazy-canux/go-devops

A    Great!    Found 36 issues across 53 files

Tweet

gofmt86%

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!


gocyclo100%

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.

No problems detected. Good job!


golint35%

Golint is a linter for Go source code.

    • go-devops/email/doc.go
    • Line 1: warning: package comment should be of the form "Package email ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • go-devops/ssh/ssh.go
    • Line 8: warning: comment on exported function NewClientWithBasicAuth should be of the form "NewClientWithBasicAuth ..." (golint)
    • Line 14: warning: comment on exported function NewClientWithBasicAuthAndTimeout should be of the form "NewClientWithBasicAuthAndTimeout ..." (golint)
    • Line 20: warning: comment on exported function NewClient should be of the form "NewClient ..." (golint)
    • Line 25: warning: comment on exported function NewClientWithTimeout should be of the form "NewClientWithTimeout ..." (golint)
    • go-devops/docker/docker.go
    • Line 23: warning: exported function ServiceCheck should have comment or be unexported (golint)
    • Line 37: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 46: warning: exported function CreateNetwork should have comment or be unexported (golint)
    • Line 71: warning: exported function RemoveNetwork should have comment or be unexported (golint)
    • Line 86: warning: exported function NetworkId should have comment or be unexported (golint)
    • go-devops/database/mysql.go
    • Line 10: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 13: warning: exported function MysqlVersion should have comment or be unexported (golint)
    • Line 37: warning: exported function PatchMysql should have comment or be unexported (golint)
    • go-devops/utils/doc.go
    • Line 1: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • go-devops/tickstack/kapacitor.go
    • Line 10: warning: exported type Response should have comment or be unexported (golint)
    • Line 22: warning: exported type SmtpResp should have comment or be unexported (golint)
    • Line 49: warning: comment on exported function GetSmtp should be of the form "GetSmtp ..." (golint)
    • go-devops/doc.go
    • Line 1: warning: package comment should be of the form "Package go_devops ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 5: warning: don't use an underscore in package name (golint)
    • go-devops/docker/doc.go
    • Line 1: warning: package comment should be of the form "Package docker ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • go-devops/ssh/auth.go
    • Line 35: warning: exported function PrivateKeyWithPassphrase should have comment or be unexported (golint)
    • Line 57: warning: exported function PasswordKey should have comment or be unexported (golint)
    • go-devops/ssh/configurer.go
    • Line 9: warning: comment on exported type ClientConfigurer should be of the form "ClientConfigurer ..." (with optional leading article) (golint)
    • Line 18: warning: comment on exported function NewConfigurer should be of the form "NewConfigurer ..." (golint)
    • Line 35: warning: exported function NewConfigurerWithBasicAuth should have comment or be unexported (golint)
    • Line 45: warning: comment on exported method ClientConfigurer.RemoteBinary should be of the form "RemoteBinary ..." (golint)
    • Line 52: warning: comment on exported method ClientConfigurer.Host should be of the form "Host ..." (golint)
    • Line 58: warning: comment on exported method ClientConfigurer.Timeout should be of the form "Timeout ..." (golint)
    • Line 65: warning: comment on exported method ClientConfigurer.ClientConfig should be of the form "ClientConfig ..." (golint)
    • Line 71: warning: comment on exported method ClientConfigurer.Create should be of the form "Create ..." (golint)
    • go-devops/ssh/doc.go
    • Line 1: warning: package comment should be of the form "Package ssh ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • go-devops/configuration/ini.go
    • Line 8: warning: exported function LoadIni should have comment or be unexported (golint)
    • Line 17: warning: exported function GetKey should have comment or be unexported (golint)
    • Line 31: warning: exported function SetKey should have comment or be unexported (golint)
    • go-devops/http/http.go
    • Line 12: warning: exported function Get should have comment or be unexported (golint)
    • Line 45: warning: exported function Post should have comment or be unexported (golint)
    • go-devops/nosql/mongo.go
    • Line 10: warning: exported type Status should have comment or be unexported (golint)
    • Line 23: warning: exported function ServerStatus should have comment or be unexported (golint)
    • go-devops/firewall/iptables.go
    • Line 42: warning: exported function CleanUDC should have comment or be unexported (golint)
    • Line 54: warning: exported function CleanRules should have comment or be unexported (golint)
    • Line 72: warning: exported function AppendRules should have comment or be unexported (golint)
    • Line 79: warning: exported function InsertRules should have comment or be unexported (golint)
    • Line 86: warning: exported function DeleteRules should have comment or be unexported (golint)
    • Line 94: warning: exported function Version should have comment or be unexported (golint)
    • Line 100: warning: exported function List should have comment or be unexported (golint)
    • Line 112: warning: exported function ListWithCounters should have comment or be unexported (golint)
    • Line 124: warning: exported function ListChain should have comment or be unexported (golint)
    • Line 135: warning: exported function ClearChain should have comment or be unexported (golint)
    • Line 143: warning: exported function DeleteChain should have comment or be unexported (golint)
    • go-devops/database/mssql.go
    • Line 10: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 13: warning: exported function MssqlVersion should have comment or be unexported (golint)
    • Line 39: warning: exported function PatchMssql should have comment or be unexported (golint)
    • go-devops/utils/path_walk.go
    • Line 11: warning: comment on exported function PathWalk should be of the form "PathWalk ..." (golint)
    • Line 22: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 29: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 42: warning: comment on exported function In should be of the form "In ..." (golint)
    • Line 52: warning: comment on exported function ExtIn should be of the form "ExtIn ..." (golint)
    • go-devops/ssh/client.go
    • Line 19: warning: exported type Client should have comment or be unexported (golint)
    • Line 42: warning: comment on exported method Client.Connect should be of the form "Connect ..." (golint)
    • Line 57: warning: comment on exported method Client.CopyFromFile should be of the form "CopyFromFile ..." (golint)
    • Line 63: warning: comment on exported method Client.CopyFile should be of the form "CopyFile ..." (golint)
    • Line 66: warning: don't use underscores in Go names; var contents_bytes should be contentsBytes (golint)
    • Line 67: warning: don't use underscores in Go names; var bytes_reader should be bytesReader (golint)
    • Line 105: warning: comment on exported method Client.RunWithSudo should be of the form "RunWithSudo ..." (golint)
    • Line 205: warning: comment on exported method Client.Copy should be of the form "Copy ..." (golint)
    • Line 280: warning: exported method Client.Close should have comment or be unexported (golint)
    • go-devops/ssh/protocol.go
    • Line 8: warning: exported type ResponseType should have comment or be unexported (golint)
    • Line 11: warning: exported const Ok should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: comment on exported type Response should be of the form "Response ..." (with optional leading article) (golint)
    • Line 32: warning: comment on exported function ParseResponse should be of the form "ParseResponse ..." (golint)
    • Line 40: warning: don't use underscores in Go names; var response_type should be responseType (golint)
    • Line 43: warning: don't use underscores in Go names; var buffered_reader should be bufferedReader (golint)
    • Line 53: warning: exported method Response.IsOk should have comment or be unexported (golint)
    • Line 57: warning: exported method Response.IsWarning should have comment or be unexported (golint)
    • Line 61: warning: comment on exported method Response.IsError should be of the form "IsError ..." (golint)
    • Line 66: warning: comment on exported method Response.IsFailure should be of the form "IsFailure ..." (golint)
    • Line 71: warning: comment on exported method Response.GetMessage should be of the form "GetMessage ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words