Preparing report...

Report for github.com/bedag/kubernetes-dbaas

A+    Excellent!    Found 16 issues across 36 files

Tweet

gofmt97%

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!


gocyclo97%

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.


golint58%

Golint is a linter for Go source code.

    • kubernetes-dbaas/controllers/database/database_controller.go
    • Line 26: warning: should not use dot imports (golint)
    • Line 49: warning: exported const InfoLevel should have comment (or a comment on this block) or be unexported (golint)
    • Line 61: warning: exported type ReconcileError should have comment or be unexported (golint)
    • Line 80: warning: comment on exported method DatabaseReconciler.SetupWithManager should be of the form "SetupWithManager ..." (golint)
    • Line 613: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • kubernetes-dbaas/pkg/typeutil/constants.go
    • Line 6: warning: comment on exported const TypeReady should be of the form "TypeReady ..." (golint)
    • Line 9: warning: comment on exported const RsnCreate should be of the form "RsnCreate ..." (golint)
    • Line 11: warning: exported const RsnDbCreateFail should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: comment on exported const MsgDbCreateFail should be of the form "MsgDbCreateFail ..." (golint)
    • Line 70: warning: comment on exported const Normal should be of the form "Normal ..." (golint)
    • kubernetes-dbaas/pkg/test/test_utils.go
    • Line 9: warning: exported type TestType should have comment or be unexported (golint)
    • Line 10: warning: exported type TestAttribute should have comment or be unexported (golint)
    • Line 13: warning: exported const Unit should have comment (or a comment on this block) or be unexported (golint)
    • kubernetes-dbaas/cmd/root.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 55: warning: exported const LoadConfigKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 63: warning: comment on exported const MetricsBindAddressKey should be of the form "MetricsBindAddressKey ..." (golint)
    • kubernetes-dbaas/pkg/database/dsn.go
    • Line 5: warning: exported type Dsn should have comment or be unexported (golint)
    • Line 7: warning: exported method Dsn.GenMysql should have comment or be unexported (golint)
    • Line 19: warning: exported method Dsn.GenSqlserver should have comment or be unexported (golint)
    • Line 31: warning: exported method Dsn.GenPostgres should have comment or be unexported (golint)
    • kubernetes-dbaas/pkg/database/dbms.go
    • Line 12: warning: exported const Sqlserver should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: comment on exported type Operation should be of the form "Operation ..." (with optional leading article) (golint)
    • Line 60: warning: comment on exported type Dbms should be of the form "Dbms ..." (with optional leading article) (golint)
    • Line 74: warning: comment on exported type DbmsList should be of the form "DbmsList ..." (with optional leading article) (golint)
    • Line 78: warning: comment on exported type Endpoint should be of the form "Endpoint ..." (with optional leading article) (golint)
    • Line 87: warning: comment on exported type SecretFormat should be of the form "SecretFormat ..." (with optional leading article) (golint)
    • kubernetes-dbaas/pkg/database/rate_limiter.go
    • Line 8: warning: exported type RateLimitedDbmsConn should have comment or be unexported (golint)
    • Line 33: warning: exported method RateLimitedDbmsConn.CreateDb should have comment or be unexported (golint)
    • Line 38: warning: exported method RateLimitedDbmsConn.DeleteDb should have comment or be unexported (golint)
    • Line 43: warning: exported method RateLimitedDbmsConn.Ping should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!