Preparing report...

Report for github.com/tidwall/tile38

A+    Excellent!    Found 43 issues across 95 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


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!


gocyclo67%

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.

    • tile38/internal/server/server.go
    • Line 722: warning: cyclomatic complexity 72 of function (*Server).handleInputCommand() is high (> 15) (gocyclo)
    • Line 999: warning: cyclomatic complexity 67 of function (*Server).command() is high (> 15) (gocyclo)
    • Line 1269: warning: cyclomatic complexity 38 of function readNextHTTPCommand() is high (> 15) (gocyclo)
    • Line 333: warning: cyclomatic complexity 33 of function (*Server).netServe() is high (> 15) (gocyclo)
    • Line 138: warning: cyclomatic complexity 26 of function Serve() is high (> 15) (gocyclo)
    • Line 1405: warning: cyclomatic complexity 16 of function (*PipelineReader).ReadMessages() is high (> 15) (gocyclo)
    • tile38/internal/server/crud.go
    • Line 530: warning: cyclomatic complexity 63 of function (*Server).parseSetArgs() is high (> 15) (gocyclo)
    • Line 127: warning: cyclomatic complexity 42 of function (*Server).cmdGet() is high (> 15) (gocyclo)
    • Line 750: warning: cyclomatic complexity 24 of function (*Server).cmdSet() is high (> 15) (gocyclo)
    • Line 330: warning: cyclomatic complexity 19 of function (*Server).cmdPdel() is high (> 15) (gocyclo)
    • Line 1012: warning: cyclomatic complexity 18 of function (*Server).cmdTTL() is high (> 15) (gocyclo)
    • Line 446: warning: cyclomatic complexity 17 of function (*Server).cmdRename() is high (> 15) (gocyclo)
    • Line 909: warning: cyclomatic complexity 16 of function (*Server).cmdExpire() is high (> 15) (gocyclo)
    • tile38/internal/server/token.go
    • Line 209: warning: cyclomatic complexity 134 of function (*Server).parseSearchScanBaseTokens() is high (> 15) (gocyclo)
    • Line 670: warning: cyclomatic complexity 33 of function (*Server).parseAreaExpression() is high (> 15) (gocyclo)
    • tile38/internal/server/test.go
    • Line 20: warning: cyclomatic complexity 65 of function (*Server).parseArea() is high (> 15) (gocyclo)
    • Line 228: warning: cyclomatic complexity 25 of function (*Server).cmdTest() is high (> 15) (gocyclo)
    • tile38/internal/server/follow.go
    • Line 191: warning: cyclomatic complexity 28 of function (*Server).followStep() is high (> 15) (gocyclo)
    • Line 21: warning: cyclomatic complexity 21 of function (*Server).cmdFollow() is high (> 15) (gocyclo)
    • tile38/internal/server/json.go
    • Line 44: warning: cyclomatic complexity 28 of function isJSONNumber() is high (> 15) (gocyclo)
    • Line 236: warning: cyclomatic complexity 19 of function (*Server).cmdJset() is high (> 15) (gocyclo)
    • Line 165: warning: cyclomatic complexity 17 of function (*Server).cmdJget() is high (> 15) (gocyclo)
    • tile38/internal/server/scripts.go
    • Line 588: warning: cyclomatic complexity 27 of function (*Server).commandInScript() is high (> 15) (gocyclo)
    • Line 373: warning: cyclomatic complexity 22 of function (*Server).cmdEvalUnified() is high (> 15) (gocyclo)
    • Line 784: warning: cyclomatic complexity 17 of function (*Server).luaTile38NonAtomic() is high (> 15) (gocyclo)
    • Line 683: warning: cyclomatic complexity 17 of function (*Server).luaTile38AtomicRW() is high (> 15) (gocyclo)
    • tile38/internal/server/aof.go
    • Line 32: warning: cyclomatic complexity 24 of function (*Server).loadAOF() is high (> 15) (gocyclo)
    • Line 485: warning: cyclomatic complexity 21 of function (*Server).liveAOF() is high (> 15) (gocyclo)
    • tile38/internal/server/scanner.go
    • Line 354: warning: cyclomatic complexity 40 of function (*scanWriter).writeObject() is high (> 15) (gocyclo)
    • Line 198: warning: cyclomatic complexity 35 of function (*scanWriter).fieldMatch() is high (> 15) (gocyclo)
    • tile38/cmd/tile38-cli/main.go
    • Line 143: warning: cyclomatic complexity 89 of function main() is high (> 15) (gocyclo)
    • Line 74: warning: cyclomatic complexity 18 of function parseArgs() is high (> 15) (gocyclo)
    • Line 468: warning: cyclomatic complexity 17 of function help() is high (> 15) (gocyclo)
    • Line 623: warning: cyclomatic complexity 16 of function plainToCompat() is high (> 15) (gocyclo)
    • tile38/internal/server/hooks.go
    • Line 39: warning: cyclomatic complexity 50 of function (*Server).cmdSetHook() is high (> 15) (gocyclo)
    • Line 371: warning: cyclomatic complexity 23 of function (*Server).cmdHooks() is high (> 15) (gocyclo)
    • Line 633: warning: cyclomatic complexity 17 of function (*Hook).proc() is high (> 15) (gocyclo)

golint85%

Golint is a linter for Go source code.

    • tile38/tests/fence_roaming_test.go
    • Line 16: warning: don't use underscores in Go names; func fence_roaming_webhook_test should be fenceRoamingWebhookTest (golint)
    • Line 112: warning: don't use underscores in Go names; func fence_roaming_live_test should be fenceRoamingLiveTest (golint)
    • Line 177: warning: don't use underscores in Go names; func fence_roaming_channel_test should be fenceRoamingChannelTest (golint)
    • tile38/tests/scripts_test.go
    • Line 16: warning: don't use underscores in Go names; func scripts_BASIC_test should be scriptsBASICTest (golint)
    • Line 32: warning: don't use underscores in Go names; func scripts_ATOMIC_test should be scriptsATOMICTest (golint)
    • Line 40: warning: don't use underscores in Go names; func scripts_READONLY_test should be scriptsREADONLYTest (golint)
    • Line 58: warning: don't use underscores in Go names; func scripts_NONATOMIC_test should be scriptsNONATOMICTest (golint)
    • tile38/tests/json_test.go
    • Line 11: warning: don't use underscores in Go names; func json_JSET_basic_test should be jsonJSETBasicTest (golint)
    • Line 28: warning: don't use underscores in Go names; func json_JSET_geojson_test should be jsonJSETGeojsonTest (golint)
    • Line 45: warning: don't use underscores in Go names; func json_JSET_number_test should be jsonJSETNumberTest (golint)
    • tile38/tests/keys_test.go
    • Line 38: warning: don't use underscores in Go names; func keys_BOUNDS_test should be keysBOUNDSTest (golint)
    • Line 51: warning: don't use underscores in Go names; func keys_DEL_test should be keysDELTest (golint)
    • Line 59: warning: don't use underscores in Go names; func keys_DROP_test should be keysDROPTest (golint)
    • Line 70: warning: don't use underscores in Go names; func keys_RENAME_test should be keysRENAMETest (golint)
    • Line 86: warning: don't use underscores in Go names; func keys_RENAMENX_test should be keysRENAMENXTest (golint)
    • Line 104: warning: don't use underscores in Go names; func keys_EXPIRE_test should be keysEXPIRETest (golint)
    • Line 114: warning: don't use underscores in Go names; func keys_FSET_test should be keysFSETTest (golint)
    • Line 134: warning: don't use underscores in Go names; func keys_GET_test should be keysGETTest (golint)
    • Line 144: warning: don't use underscores in Go names; func keys_KEYS_test should be keysKEYSTest (golint)
    • Line 168: warning: don't use underscores in Go names; func keys_PERSIST_test should be keysPERSISTTest (golint)
    • Line 176: warning: don't use underscores in Go names; func keys_SET_test should be keysSETTest (golint)
    • Line 231: warning: don't use underscores in Go names; func keys_STATS_test should be keysSTATSTest (golint)
    • Line 250: warning: don't use underscores in Go names; func keys_TTL_test should be keysTTLTest (golint)
    • Line 315: warning: don't use underscores in Go names; func keys_SET_EX_test should be keysSETEXTest (golint)
    • Line 351: warning: don't use underscores in Go names; func keys_FIELDS_test should be keysFIELDSTest (golint)
    • Line 366: warning: don't use underscores in Go names; func keys_PDEL_test should be keysPDELTest (golint)
    • Line 387: warning: don't use underscores in Go names; func keys_WHEREIN_test should be keysWHEREINTest (golint)
    • Line 400: warning: don't use underscores in Go names; func keys_WHEREEVAL_test should be keysWHEREEVALTest (golint)
    • tile38/internal/server/metrics.go
    • Line 56: warning: exported method Server.MetricsIndexHandler should have comment or be unexported (golint)
    • Line 64: warning: exported method Server.MetricsHandler should have comment or be unexported (golint)
    • Line 78: warning: exported method Server.Describe should have comment or be unexported (golint)
    • Line 84: warning: exported method Server.Collect should have comment or be unexported (golint)
    • tile38/cmd/tile38-luamemtest/main.go
    • Line 19: warning: exported function Sha1Sum should have comment or be unexported (golint)
    • Line 25: warning: comment on exported function ConvertToResp should be of the form "ConvertToResp ..." (golint)
    • Line 33: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 39: 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 78: warning: comment on exported function ConvertToLua should be of the form "ConvertToLua ..." (golint)
    • Line 118: warning: exported function NewLuaState should have comment or be unexported (golint)
    • Line 121: warning: don't use underscores in Go names; var get_args should be getArgs (golint)
    • Line 142: 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 154: 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 160: warning: don't use underscores in Go names; var error_reply should be errorReply (golint)
    • Line 166: warning: don't use underscores in Go names; var status_reply should be statusReply (golint)
    • Line 173: warning: don't use underscores in Go names; var sha_sum should be shaSum (golint)
    • tile38/tests/timeout_test.go
    • Line 57: warning: don't use underscores in Go names; func timeout_spatial_test should be timeoutSpatialTest (golint)
    • Line 71: warning: don't use underscores in Go names; func timeout_search_test should be timeoutSearchTest (golint)
    • Line 80: warning: don't use underscores in Go names; func timeout_scripts_test should be timeoutScriptsTest (golint)
    • Line 108: warning: don't use underscores in Go names; func timeout_no_writes_test should be timeoutNoWritesTest (golint)
    • Line 123: warning: don't use underscores in Go names; func timeout_within_scripts_test should be timeoutWithinScriptsTest (golint)
    • Line 152: warning: don't use underscores in Go names; func timeout_no_writes_within_scripts_test should be timeoutNoWritesWithinScriptsTest (golint)
    • tile38/tests/testcmd_test.go
    • Line 15: warning: don't use underscores in Go names; func testcmd_WITHIN_test should be testcmdWITHINTest (golint)
    • Line 56: warning: don't use underscores in Go names; func testcmd_INTERSECTS_test should be testcmdINTERSECTSTest (golint)
    • Line 100: warning: don't use underscores in Go names; func testcmd_INTERSECTS_CLIP_test should be testcmdINTERSECTSCLIPTest (golint)
    • Line 121: warning: don't use underscores in Go names; func testcmd_expressionErrors_test should be testcmdExpressionErrorsTest (golint)
    • Line 155: warning: don't use underscores in Go names; func testcmd_expression_test should be testcmdExpressionTest (golint)
    • tile38/tests/client_test.go
    • Line 17: warning: don't use underscores in Go names; func client_valid_json_test should be clientValidJSONTest (golint)
    • Line 48: warning: don't use underscores in Go names; func info_valid_client_count_test should be infoValidClientCountTest (golint)
    • tile38/tests/fence_test.go
    • Line 90: warning: don't use underscores in Go names; func fence_basic_test should be fenceBasicTest (golint)
    • Line 175: warning: don't use underscores in Go names; func fence_channel_message_order_test should be fenceChannelMessageOrderTest (golint)
    • Line 246: warning: don't use underscores in Go names; func fence_detect_inside_test should be fenceDetectInsideTest (golint)
    • Line 325: warning: don't use underscores in Go names; func fence_channel_meta_test should be fenceChannelMetaTest (golint)
    • Line 363: warning: don't use underscores in Go names; func fence_eecio_test should be fenceEecioTest (golint)
    • tile38/tests/keys_search_test.go
    • Line 24: warning: don't use underscores in Go names; func keys_KNN_test should be keysKNNTest (golint)
    • Line 41: warning: don't use underscores in Go names; func keys_KNN_cursor_test should be keysKNNCursorTest (golint)
    • Line 63: warning: don't use underscores in Go names; func keys_WITHIN_test should be keysWITHINTest (golint)
    • Line 110: warning: don't use underscores in Go names; func keys_WITHIN_CURSOR_test should be keysWITHINCURSORTest (golint)
    • Line 148: warning: don't use underscores in Go names; func keys_INTERSECTS_test should be keysINTERSECTSTest (golint)
    • Line 198: warning: don't use underscores in Go names; func keys_INTERSECTS_CURSOR_test should be keysINTERSECTSCURSORTest (golint)
    • Line 236: warning: don't use underscores in Go names; func keys_WITHIN_CIRCLE_test should be keysWITHINCIRCLETest (golint)
    • Line 252: warning: don't use underscores in Go names; func keys_INTERSECTS_CIRCLE_test should be keysINTERSECTSCIRCLETest (golint)
    • Line 268: warning: don't use underscores in Go names; func keys_SCAN_CURSOR_test should be keysSCANCURSORTest (golint)
    • Line 290: warning: don't use underscores in Go names; func keys_SEARCH_CURSOR_test should be keysSEARCHCURSORTest (golint)
    • Line 313: warning: don't use underscores in Go names; func keys_MATCH_test should be keysMATCHTest (golint)
    • Line 362: warning: don't use underscores in Go names; func keys_FIELDS_search_test should be keysFIELDSSearchTest (golint)
    • tile38/tests/mock_test.go
    • Line 95: warning: receiver name mc should be consistent with previous receiver name s for mockServer (golint)
    • Line 101: warning: receiver name mc should be consistent with previous receiver name s for mockServer (golint)
    • Line 149: warning: receiver name mc should be consistent with previous receiver name s for mockServer (golint)
    • Line 164: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 189: warning: receiver name mc should be consistent with previous receiver name s for mockServer (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