Preparing report...

Report for github.com/Cloud-Foundations/golib

A+    Excellent!    Found 31 issues across 71 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!


gocyclo95%

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.


golint59%

Golint is a linter for Go source code.

    • golib/pkg/auth/userinfo/gitdb/api.go
    • Line 11: warning: exported type Config should have comment or be unexported (golint)
    • Line 15: warning: exported type UserInfo should have comment or be unexported (golint)
    • Line 40: warning: exported function NewWithConfig should have comment or be unexported (golint)
    • Line 44: warning: exported method UserInfo.GetGroups should have comment or be unexported (golint)
    • Line 48: warning: exported method UserInfo.GetUserGroups should have comment or be unexported (golint)
    • Line 52: warning: exported method UserInfo.GetUsersInGroup should have comment or be unexported (golint)
    • Line 56: warning: exported method UserInfo.GetUsersInGroups should have comment or be unexported (golint)
    • Line 60: warning: exported method UserInfo.TestUserInGroup should have comment or be unexported (golint)
    • golib/pkg/awsutil/secretsmgr/api.go
    • Line 12: warning: exported type CachedSecret should have comment or be unexported (golint)
    • Line 22: warning: exported function GetAwsSecret should have comment or be unexported (golint)
    • Line 27: warning: exported function NewCachedSecret should have comment or be unexported (golint)
    • Line 33: warning: exported method CachedSecret.GetSecret should have comment or be unexported (golint)
    • golib/pkg/crypto/certmanager/storage/awssecretsmanager/api.go
    • Line 5: warning: package comment is detached; there should be no blank lines between it and the package statement (golint)
    • Line 17: warning: exported type LockingStorer should have comment or be unexported (golint)
    • Line 25: warning: exported function New should have comment or be unexported (golint)
    • Line 29: warning: exported method LockingStorer.GetLostChannel should have comment or be unexported (golint)
    • Line 33: warning: exported method LockingStorer.Lock should have comment or be unexported (golint)
    • Line 41: warning: exported method LockingStorer.Unlock should have comment or be unexported (golint)
    • golib/pkg/dns/route53/api.go
    • Line 16: warning: exported type RecordReadWriter should have comment or be unexported (golint)
    • Line 29: warning: exported method RecordReadWriter.DeleteRecords should have comment or be unexported (golint)
    • Line 33: warning: exported method RecordReadWriter.ReadRecords should have comment or be unexported (golint)
    • Line 38: warning: exported method RecordReadWriter.WriteRecords should have comment or be unexported (golint)
    • golib/pkg/awsutil/secretsmgr/impl.go
    • Line 21: 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)
    • Line 50: 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)
    • Line 81: 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)
    • golib/pkg/auth/userinfo/ldap/api.go
    • Line 10: warning: exported type UserInfo should have comment or be unexported (golint)
    • Line 24: warning: exported function New should have comment or be unexported (golint)
    • Line 34: warning: exported method UserInfo.GetUserGroups should have comment or be unexported (golint)
    • Line 38: warning: exported method UserInfo.GetGroupUsers should have comment or be unexported (golint)
    • golib/cmd/userinfo/showUserGroups.go
    • Line 41: 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)
    • Line 54: 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)
    • Line 67: 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)
    • golib/pkg/log/api.go
    • Line 3: warning: exported type Logger should have comment or be unexported (golint)
    • Line 15: warning: exported type DebugLogger should have comment or be unexported (golint)
    • Line 22: warning: exported type DebugLogLevelGetter should have comment or be unexported (golint)
    • Line 26: warning: exported type DebugLogLevelSetter should have comment or be unexported (golint)
    • Line 30: warning: exported type FullDebugLogger should have comment or be unexported (golint)
    • golib/pkg/auth/userinfo/filter/impl.go
    • Line 16: 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)
    • Line 31: 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)
    • golib/pkg/loadbalancing/dnslb/ec2/api.go
    • Line 11: warning: exported type InstanceHandler should have comment or be unexported (golint)
    • Line 18: warning: exported function New should have comment or be unexported (golint)
    • Line 23: warning: exported method InstanceHandler.Destroy should have comment or be unexported (golint)
    • Line 27: warning: exported method InstanceHandler.Filter should have comment or be unexported (golint)
    • golib/pkg/crypto/certmanager/http_proxy/api.go
    • Line 5: warning: don't use an underscore in package name (golint)
    • Line 11: warning: exported type Responder should have comment or be unexported (golint)
    • Line 23: warning: exported method Responder.Cleanup should have comment or be unexported (golint)
    • Line 27: warning: exported method Responder.Respond should have comment or be unexported (golint)
    • golib/pkg/watchdog/api.go
    • Line 9: warning: exported type Config should have comment or be unexported (golint)
    • Line 17: warning: exported type Watchdog should have comment or be unexported (golint)
    • Line 23: warning: exported function New should have comment or be unexported (golint)
    • Line 27: warning: exported method Config.SetDefaults should have comment or be unexported (golint)
    • golib/pkg/loadbalancing/dnslb/api.go
    • Line 38: warning: exported type Config should have comment or be unexported (golint)
    • Line 52: warning: exported type LoadBalancer should have comment or be unexported (golint)
    • Line 60: warning: exported type Params should have comment or be unexported (golint)
    • golib/pkg/auth/userinfo/gitdb/impl.go
    • Line 83: 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)
    • Line 291: 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)
    • golib/pkg/crypto/certmanager/http/api.go
    • Line 13: warning: exported type RedirectHandler should have comment or be unexported (golint)
    • Line 23: warning: exported type Responder should have comment or be unexported (golint)
    • Line 60: warning: exported method Responder.Cleanup should have comment or be unexported (golint)
    • Line 64: warning: exported method Responder.Respond should have comment or be unexported (golint)
    • golib/pkg/auth/userinfo/filter/api.go
    • Line 9: warning: exported type UserGroupsInfo should have comment or be unexported (golint)
    • Line 14: warning: exported type UserInfo should have comment or be unexported (golint)
    • Line 19: warning: exported function NewUserGroupsFilter should have comment or be unexported (golint)
    • Line 24: warning: exported method UserGroupsInfo.GetUserGroups should have comment or be unexported (golint)
    • Line 28: warning: exported function NewUserInfoFilter should have comment or be unexported (golint)
    • Line 33: warning: exported method UserInfo.GetUserGroups should have comment or be unexported (golint)
    • golib/pkg/crypto/certmanager/api.go
    • Line 34: warning: exported const LetsEncryptProductionURL should have comment or be unexported (golint)
    • Line 35: warning: exported const LetsEncryptStagingURL should have comment or be unexported (golint)
    • Line 37: warning: exported type Certificate should have comment or be unexported (golint)
    • Line 45: warning: exported type CertificateManager should have comment or be unexported (golint)
    • golib/pkg/auth/ldaputil/api.go
    • Line 9: warning: exported function CheckLDAPConnection should have comment or be unexported (golint)
    • Line 14: warning: exported function CheckLDAPUserPassword should have comment or be unexported (golint)
    • Line 19: warning: exported function GetLDAPUserGroups should have comment or be unexported (golint)
    • Line 28: warning: exported function GetLDAPGroupUsers should have comment or be unexported (golint)
    • Line 39: warning: exported function ParseLDAPURL should have comment or be unexported (golint)
    • golib/pkg/watchdog/impl_test.go
    • Line 26: 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)

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