Preparing report...

Report for github.com/nats-io/gnatsd

(v1.4.1)

A+    Excellent!    Found 34 issues across 82 files

Tweet

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!


gofmt81%

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


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo75%

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.

    • server/reload.go
    • Line 558: warning: cyclomatic complexity 34 of function (*Server).diffOptions() is high (> 15) (gocyclo)
    • Line 740: warning: cyclomatic complexity 19 of function (*Server).reloadClusterPermissions() is high (> 15) (gocyclo)
    • server/monitor.go
    • Line 121: warning: cyclomatic complexity 59 of function (*Server).Connz() is high (> 15) (gocyclo)
    • Line 1000: warning: cyclomatic complexity 20 of function (ClosedState).String() is high (> 15) (gocyclo)
    • server/opts_test.go
    • Line 967: warning: cyclomatic complexity 36 of function TestConfigureOptions() is high (> 15) (gocyclo)
    • Line 646: warning: cyclomatic complexity 28 of function TestNewStyleAuthorizationConfig() is high (> 15) (gocyclo)
    • Line 1153: warning: cyclomatic complexity 21 of function TestClusterPermissionsConfig() is high (> 15) (gocyclo)
    • Line 559: warning: cyclomatic complexity 21 of function TestAuthorizationConfig() is high (> 15) (gocyclo)
    • Line 113: warning: cyclomatic complexity 19 of function TestTLSConfigFile() is high (> 15) (gocyclo)
    • server/monitor_test.go
    • Line 1909: warning: cyclomatic complexity 33 of function TestRoutezPermissions() is high (> 15) (gocyclo)
    • Line 227: warning: cyclomatic complexity 27 of function TestConnz() is high (> 15) (gocyclo)
    • Line 572: warning: cyclomatic complexity 18 of function TestConnzWithOffsetAndLimit() is high (> 15) (gocyclo)
    • Line 1438: warning: cyclomatic complexity 17 of function TestConnzWithStateForClosedConns() is high (> 15) (gocyclo)
    • Line 711: warning: cyclomatic complexity 16 of function TestConnzSortedByBytesAndMsgs() is high (> 15) (gocyclo)
    • test/monitor_test.go
    • Line 243: warning: cyclomatic complexity 28 of function TestConnz() is high (> 15) (gocyclo)
    • Line 346: warning: cyclomatic complexity 26 of function TestTLSConnz() is high (> 15) (gocyclo)
    • Line 165: warning: cyclomatic complexity 18 of function TestVarz() is high (> 15) (gocyclo)
    • server/client_test.go
    • Line 937: warning: cyclomatic complexity 20 of function TestDynamicBuffers() is high (> 15) (gocyclo)
    • Line 801: warning: cyclomatic complexity 17 of function TestTLSCloseClientConnection() is high (> 15) (gocyclo)
    • test/routes_test.go
    • Line 863: warning: cyclomatic complexity 54 of function TestRouteBasicPermissions() is high (> 15) (gocyclo)
    • Line 590: warning: cyclomatic complexity 23 of function TestRouteSendAsyncINFOToClients() is high (> 15) (gocyclo)
    • conf/parse.go
    • Line 138: warning: cyclomatic complexity 36 of function (*parser).processItem() is high (> 15) (gocyclo)
    • server/client.go
    • Line 557: warning: cyclomatic complexity 29 of function (*client).flushOutbound() is high (> 15) (gocyclo)
    • Line 1585: warning: cyclomatic complexity 26 of function (*client).processMsg() is high (> 15) (gocyclo)
    • Line 420: warning: cyclomatic complexity 23 of function (*client).readLoop() is high (> 15) (gocyclo)
    • Line 1839: warning: cyclomatic complexity 20 of function (*client).closeConnection() is high (> 15) (gocyclo)
    • Line 919: warning: cyclomatic complexity 18 of function (*client).queueOutbound() is high (> 15) (gocyclo)
    • Line 791: warning: cyclomatic complexity 17 of function (*client).processConnect() is high (> 15) (gocyclo)
    • server/split_test.go
    • Line 301: warning: cyclomatic complexity 21 of function TestSplitDanglingArgBuf() is high (> 15) (gocyclo)
    • Line 443: warning: cyclomatic complexity 21 of function TestSplitBufferMsgOp() is high (> 15) (gocyclo)
    • Line 96: warning: cyclomatic complexity 18 of function TestSplitBufferPubOp() is high (> 15) (gocyclo)
    • server/sublist.go
    • Line 103: warning: cyclomatic complexity 20 of function (*Sublist).Insert() is high (> 15) (gocyclo)
    • Line 717: warning: cyclomatic complexity 19 of function matchLiteral() is high (> 15) (gocyclo)
    • server/server.go
    • Line 1472: warning: cyclomatic complexity 16 of function (*Server).lameDuckMode() is high (> 15) (gocyclo)
    • server/route.go
    • Line 607: warning: cyclomatic complexity 16 of function (*Server).createRoute() is high (> 15) (gocyclo)
    • server/parser.go
    • Line 95: warning: cyclomatic complexity 173 of function (*client).parse() is high (> 15) (gocyclo)
    • server/opts.go
    • Line 209: warning: cyclomatic complexity 49 of function (*Options).ProcessConfigFile() is high (> 15) (gocyclo)
    • Line 1090: warning: cyclomatic complexity 38 of function ConfigureOptions() is high (> 15) (gocyclo)
    • Line 389: warning: cyclomatic complexity 23 of function parseCluster() is high (> 15) (gocyclo)
    • Line 719: warning: cyclomatic complexity 23 of function parseTLS() is high (> 15) (gocyclo)
    • Line 847: warning: cyclomatic complexity 22 of function MergeOptions() is high (> 15) (gocyclo)
    • Line 1022: warning: cyclomatic complexity 21 of function processOptions() is high (> 15) (gocyclo)
    • Line 483: warning: cyclomatic complexity 17 of function parseAuthorization() is high (> 15) (gocyclo)
    • server/reload_test.go
    • Line 994: warning: cyclomatic complexity 29 of function TestConfigReloadChangePermissions() is high (> 15) (gocyclo)
    • Line 245: warning: cyclomatic complexity 26 of function TestConfigReload() is high (> 15) (gocyclo)
    • Line 1168: warning: cyclomatic complexity 19 of function TestConfigReloadEnableClusterAuthorization() is high (> 15) (gocyclo)
    • Line 1350: warning: cyclomatic complexity 16 of function TestConfigReloadClusterRoutes() is high (> 15) (gocyclo)
    • server/parser_test.go
    • Line 77: warning: cyclomatic complexity 26 of function TestParsePong() is high (> 15) (gocyclo)
    • Line 29: warning: cyclomatic complexity 20 of function TestParsePing() is high (> 15) (gocyclo)
    • conf/lex.go
    • Line 1091: warning: cyclomatic complexity 18 of function (itemType).String() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!