Preparing report...

Report for github.com/bmc-toolbox/bmcldap

A    Great!    Found 9 issues across 13 files

Tweet

gofmt84%

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!


golint30%

Golint is a linter for Go source code.

    • bmcldap/pkg/providers/supermicro/supermicro.go
    • Line 39: warning: should not use dot imports (golint)
    • Line 40: warning: should not use dot imports (golint)
    • Line 45: warning: exported type Supermicro should have comment or be unexported (golint)
    • Line 50: warning: comment on exported method Supermicro.Authenticate should be of the form "Authenticate ..." (golint)
    • Line 61: warning: exported method Supermicro.Authorize should have comment or be unexported (golint)
    • bmcldap/pkg/backend.go
    • Line 33: warning: exported type Authenticator should have comment or be unexported (golint)
    • Line 43: warning: exported method BmcLdap.Bind should have comment or be unexported (golint)
    • Line 102: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 108: warning: exported method BmcLdap.Connect should have comment or be unexported (golint)
    • Line 119: warning: exported method BmcLdap.Disconnect should have comment or be unexported (golint)
    • Line 141: warning: exported method BmcLdap.Search should have comment or be unexported (golint)
    • Line 186: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 225: warning: exported method BmcLdap.Whoami should have comment or be unexported (golint)
    • Line 234: warning: comment on exported method BmcLdap.Add should be of the form "Add ..." (golint)
    • Line 243: warning: comment on exported method BmcLdap.Delete should be of the form "Delete ..." (golint)
    • Line 252: warning: comment on exported method BmcLdap.ExtendedRequest should be of the form "ExtendedRequest ..." (golint)
    • Line 261: warning: comment on exported method BmcLdap.Modify should be of the form "Modify ..." (golint)
    • Line 270: warning: comment on exported method BmcLdap.ModifyDN should be of the form "ModifyDN ..." (golint)
    • Line 279: warning: comment on exported method BmcLdap.PasswordModify should be of the form "PasswordModify ..." (golint)
    • bmcldap/pkg/server.go
    • Line 23: warning: should not use dot imports (golint)
    • Line 33: warning: exported type BmcLdap should have comment or be unexported (golint)
    • Line 41: warning: comment on exported function NewLdapServer should be of the form "NewLdapServer ..." (golint)
    • Line 48: warning: exported method BmcLdap.Ldaps should have comment or be unexported (golint)
    • Line 57: warning: exported method BmcLdap.Ldap should have comment or be unexported (golint)
    • Line 65: warning: exported method BmcLdap.LoadTlsConfig should have comment or be unexported (golint)
    • bmcldap/pkg/servercontext/server_context.go
    • Line 16: warning: exported function SetDn should have comment or be unexported (golint)
    • Line 20: warning: exported function GetDn should have comment or be unexported (golint)
    • Line 24: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 29: warning: exported function SetAddr should have comment or be unexported (golint)
    • Line 33: warning: exported function GetAddr 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)
    • bmcldap/pkg/providers/dell/dell.go
    • Line 44: warning: should not use dot imports (golint)
    • Line 45: warning: should not use dot imports (golint)
    • Line 51: warning: exported type Dell should have comment or be unexported (golint)
    • Line 56: warning: exported method Dell.Authenticate should have comment or be unexported (golint)
    • Line 61: warning: exported method Dell.Authorize should have comment or be unexported (golint)
    • bmcldap/pkg/providers/hp/hp.go
    • Line 41: warning: should not use dot imports (golint)
    • Line 42: warning: should not use dot imports (golint)
    • Line 49: warning: exported type Hp should have comment or be unexported (golint)
    • Line 54: warning: exported method Hp.Authenticate should have comment or be unexported (golint)
    • Line 59: warning: exported method Hp.Authorize should have comment or be unexported (golint)
    • bmcldap/pkg/providers/generic/generic.go
    • Line 24: warning: should not use dot imports (golint)
    • Line 25: warning: should not use dot imports (golint)
    • Line 28: warning: exported type Generic should have comment or be unexported (golint)
    • Line 33: warning: exported method Generic.Authenticate should have comment or be unexported (golint)
    • Line 55: warning: exported method Generic.Authorize should have comment or be unexported (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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!