Preparing report...

Report for github.com/evilsocket/sum

A+    Excellent!    Found 32 issues across 105 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!


golint75%

Golint is a linter for Go source code.

    • sum/node/storage/index.go
    • Line 39: warning: exported method Index.GetNextId should have comment or be unexported (golint)
    • Line 174: warning: exported method Index.CreateWithId should have comment or be unexported (golint)
    • Line 190: warning: exported method Index.CreateManyWIthId should have comment or be unexported (golint)
    • Line 269: warning: comment on exported method Index.DeleteMany should be of the form "DeleteMany ..." (golint)
    • sum/master/ast_raccoon.go
    • Line 8: warning: should not use dot imports (golint)
    • Line 33: warning: comment on exported function NewAstRaccoon should be of the form "NewAstRaccoon ..." (golint)
    • sum/master/mux_nodes.go
    • Line 6: warning: should not use dot imports (golint)
    • Line 9: warning: comment on exported method Service.AddNode should be of the form "AddNode ..." (golint)
    • Line 34: warning: comment on exported method Service.ListNodes should be of the form "ListNodes ..." (golint)
    • Line 50: warning: comment on exported method Service.DeleteNode should be of the form "DeleteNode ..." (golint)
    • sum/master/mux_runner.go
    • Line 17: warning: should not use dot imports (golint)
    • Line 33: warning: comment on exported method Service.Run should be of the form "Run ..." (golint)
    • Line 195: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • sum/master/mux_service.go
    • Line 53: warning: comment on exported function NewService should be of the form "NewService ..." (golint)
    • Line 75: warning: comment on exported function NewServiceFromConfig should be of the form "NewServiceFromConfig ..." (golint)
    • Line 99: warning: comment on exported method Service.UpdateNodes should be of the form "UpdateNodes ..." (golint)
    • Line 110: warning: exported method Service.NumRecords should have comment or be unexported (golint)
    • Line 123: warning: exported method Service.NumOracles should have comment or be unexported (golint)
    • sum/cmd/sumcli/handlers/handlers.go
    • Line 26: warning: exported var Handlers should have comment or be unexported (golint)
    • Line 27: warning: exported var Completers should have comment or be unexported (golint)
    • Line 66: warning: exported function Dispatch should have comment or be unexported (golint)
    • Line 84: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • sum/master/node.go
    • Line 6: warning: should not use dot imports (golint)
    • Line 12: warning: comment on exported type NodeInfo should be of the form "NodeInfo ..." (with optional leading article) (golint)
    • Line 28: warning: comment on exported method NodeInfo.UpdateStatus should be of the form "UpdateStatus ..." (golint)
    • Line 45: warning: comment on exported method NodeInfo.Status should be of the form "Status ..." (golint)
    • Line 52: warning: comment on exported function CreateNode should be of the form "CreateNode ..." (golint)
    • sum/master/service.go
    • Line 8: warning: should not use dot imports (golint)
    • Line 11: warning: comment on exported method Service.Info should be of the form "Info ..." (golint)
    • sum/master/service_legacy_test.go
    • Line 155: 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 172: 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)
    • sum/node/wrapper/records.go
    • Line 24: warning: exported method Records.New should have comment or be unexported (golint)
    • Line 24: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • sum/master/config.go
    • Line 10: warning: exported type NodeConfig should have comment or be unexported (golint)
    • Line 15: warning: exported type Config should have comment or be unexported (golint)
    • Line 19: warning: exported function LoadConfig should have comment or be unexported (golint)
    • Line 31: warning: exported function StoreConfig should have comment or be unexported (golint)
    • sum/master/mux_oracles.go
    • Line 7: warning: should not use dot imports (golint)
    • Line 11: warning: comment on exported method Service.CreateOracle should be of the form "CreateOracle ..." (golint)
    • Line 42: warning: comment on exported method Service.UpdateOracle should be of the form "UpdateOracle ..." (golint)
    • Line 64: warning: comment on exported method Service.ReadOracle should be of the form "ReadOracle ..." (golint)
    • Line 71: 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 76: warning: comment on exported method Service.FindOracle should be of the form "FindOracle ..." (golint)
    • Line 90: warning: comment on exported method Service.ListOracles should be of the form "ListOracles ..." (golint)
    • Line 143: warning: comment on exported method Service.DeleteOracle should be of the form "DeleteOracle ..." (golint)
    • sum/master/mux_records.go
    • Line 8: warning: should not use dot imports (golint)
    • Line 43: warning: comment on exported method Service.CreateRecord should be of the form "CreateRecord ..." (golint)
    • Line 71: warning: comment on exported method Service.UpdateRecord should be of the form "UpdateRecord ..." (golint)
    • Line 106: warning: comment on exported method Service.ReadRecord should be of the form "ReadRecord ..." (golint)
    • Line 143: warning: comment on exported method Service.ListRecords should be of the form "ListRecords ..." (golint)
    • Line 241: warning: comment on exported method Service.DeleteRecord should be of the form "DeleteRecord ..." (golint)
    • Line 288: warning: comment on exported method Service.FindRecords should be of the form "FindRecords ..." (golint)
    • Line 323: warning: comment on exported method Service.CreateRecordWithId should be of the form "CreateRecordWithId ..." (golint)
    • Line 368: warning: comment on exported method Service.CreateRecordsWithId should be of the form "CreateRecordsWithId ..." (golint)
    • Line 398: 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 453: warning: exported method Service.DeleteRecords should have comment or be unexported (golint)
    • sum/node/storage/records.go
    • Line 125: warning: exported method Records.Create should have comment or be unexported (golint)
    • Line 139: warning: exported method Records.CreateWithId should have comment or be unexported (golint)
    • Line 147: warning: exported method Records.CreateManyWIthId should have comment or be unexported (golint)
    • Line 167: warning: exported method Records.Update should have comment or be unexported (golint)
    • Line 188: warning: exported method Records.DeleteMany should have comment or be unexported (golint)
    • sum/node/service/records.go
    • Line 33: warning: exported method Service.CreateRecordWithId should have comment or be unexported (golint)
    • Line 40: warning: exported method Service.CreateRecordsWithId should have comment or be unexported (golint)
    • Line 125: warning: exported method Service.DeleteRecords should have comment or be unexported (golint)
    • sum/master/context.go
    • Line 23: warning: exported function SetMaxMsgSize should have comment or be unexported (golint)
    • Line 27: warning: exported function SetCommunicationTimeout should have comment or be unexported (golint)
    • sum/node/backend/backend.go
    • Line 18: warning: exported function Available should have comment or be unexported (golint)
    • Line 20: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)

gocyclo96%

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.


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


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!