Preparing report...

Report for github.com/radondb/radon

A+    Excellent!    Found 61 issues across 281 files

Tweet

gofmt96%

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!


gocyclo90%

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.

    • radon/src/backend/txn.go
    • Line 564: warning: cyclomatic complexity 22 of function (*Txn).ExecuteStreamFetch() is high (> 15) (gocyclo)
    • Line 465: warning: cyclomatic complexity 17 of function (*Txn).execute() is high (> 15) (gocyclo)
    • radon/src/proxy/admin_attach.go
    • Line 133: warning: cyclomatic complexity 21 of function (*Attach).addAttachHandler() is high (> 15) (gocyclo)
    • Line 250: warning: cyclomatic complexity 16 of function (*Attach).detachHandler() is high (> 15) (gocyclo)
    • radon/src/proxy/query.go
    • Line 40: warning: cyclomatic complexity 98 of function (*Spanner).ComQuery() is high (> 15) (gocyclo)
    • Line 456: warning: cyclomatic complexity 17 of function queryStat() is high (> 15) (gocyclo)

golint90%

Golint is a linter for Go source code.

    • radon/src/proxy/admin_xa.go
    • Line 21: warning: exported type AdminXA should have comment or be unexported (golint)
    • Line 28: warning: exported function NewAdminXA should have comment or be unexported (golint)
    • radon/src/plugins/shiftmanager/shiftmanager_test.go
    • Line 242: warning: don't use underscores in Go names; var keyOK_1 should be keyOK1 (golint)
    • Line 243: warning: don't use underscores in Go names; var keyOK_2 should be keyOK2 (golint)
    • Line 261: warning: don't use underscores in Go names; var shift_1 should be shift1 (golint)
    • Line 267: warning: don't use underscores in Go names; var shift_2 should be shift2 (golint)
    • Line 295: warning: don't use underscores in Go names; var keyOK_1 should be keyOK1 (golint)
    • Line 296: warning: don't use underscores in Go names; var keyOK_2 should be keyOK2 (golint)
    • Line 314: warning: don't use underscores in Go names; var shift_1 should be shift1 (golint)
    • Line 320: warning: don't use underscores in Go names; var shift_2 should be shift2 (golint)
    • Line 348: warning: don't use underscores in Go names; var keyOK_1 should be keyOK1 (golint)
    • Line 349: warning: don't use underscores in Go names; var keyOK_2 should be keyOK2 (golint)
    • Line 367: warning: don't use underscores in Go names; var shift_1 should be shift1 (golint)
    • Line 373: warning: don't use underscores in Go names; var shift_2 should be shift2 (golint)
    • radon/src/router/types.go
    • Line 15: warning: comment on exported const MethodTypeHash should be of the form "MethodTypeHash ..." (golint)
    • Line 17: warning: exported const MethodTypeGlobal should have comment (or a comment on this block) or be unexported (golint)
    • radon/src/proxy/admin_attach.go
    • Line 29: warning: exported const AttachDatabaseCheckTable should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported type Attach should have comment or be unexported (golint)
    • Line 60: warning: exported method Attach.Attach should have comment or be unexported (golint)
    • Line 84: warning: exported method Attach.Detach should have comment or be unexported (golint)
    • Line 98: warning: exported method Attach.ListAttach should have comment or be unexported (golint)
    • Line 172: warning: should omit 2nd value from range; this loop is equivalent to `for db := range ...` (golint)
    • radon/src/router/frm.go
    • Line 26: warning: exported const TableTypeSingle should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported const NAME_CHAR_LEN should have comment (or a comment on this block) or be unexported (golint)
    • Line 125: warning: exported method Router.CreateDatabase should have comment or be unexported (golint)
    • radon/src/proxy/set.go
    • Line 21: warning: don't use underscores in Go names; const var_mysql_autocommit should be varMysqlAutocommit (golint)
    • Line 22: warning: don't use underscores in Go names; const var_radon_streaming_fetch should be varRadonStreamingFetch (golint)
    • radon/src/proxy/show.go
    • Line 41: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 45: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • radon/src/proxy/admin_rebalance.go
    • Line 40: warning: exported type BackendSize should have comment or be unexported (golint)
    • Line 48: warning: exported function ShardBalanceAdvice should have comment or be unexported (golint)
    • Line 146: warning: exported function RebalanceMigrate 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.


misspell98%

Misspell Finds commonly misspelled English words