Preparing report...

Report for github.com/rudeigerc/broker-gateway

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


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.


golint21%

Golint is a linter for Go source code.

    • broker-gateway/service/trade.go
    • Line 10: warning: exported type Trade should have comment or be unexported (golint)
    • Line 13: warning: exported method Trade.NewTrade should have comment or be unexported (golint)
    • Line 21: warning: exported method Trade.Trades should have comment or be unexported (golint)
    • Line 31: warning: exported method Trade.TradeByID should have comment or be unexported (golint)
    • Line 41: warning: exported method Trade.TradesSnapshot should have comment or be unexported (golint)
    • Line 61: warning: exported method Trade.TradesWithPage should have comment or be unexported (golint)
    • Line 74: warning: exported method Trade.TradesWithCondition should have comment or be unexported (golint)
    • broker-gateway/matcher/matcher.go
    • Line 16: warning: exported type MatchHandler should have comment or be unexported (golint)
    • Line 20: warning: exported method MatchHandler.HandleMessage should have comment or be unexported (golint)
    • Line 48: warning: exported type Matcher should have comment or be unexported (golint)
    • Line 53: warning: exported function NewMatcher should have comment or be unexported (golint)
    • broker-gateway/handler/auth.go
    • Line 29: warning: exported function AuthHandler should have comment or be unexported (golint)
    • Line 56: warning: exported function ValidationHandler should have comment or be unexported (golint)
    • broker-gateway/broadcaster/hub.go
    • Line 19: warning: exported type Data should have comment or be unexported (golint)
    • Line 22: warning: exported type Message should have comment or be unexported (golint)
    • Line 29: warning: exported type FuturesData should have comment or be unexported (golint)
    • Line 34: warning: exported type TradeData should have comment or be unexported (golint)
    • Line 40: warning: exported type Hub should have comment or be unexported (golint)
    • Line 48: warning: exported function NewHub should have comment or be unexported (golint)
    • Line 58: warning: exported method Hub.RunBroadcaster should have comment or be unexported (golint)
    • Line 100: warning: exported method Hub.RunOrderBookWatcher should have comment or be unexported (golint)
    • Line 158: warning: exported method Hub.RunTradeWatcher should have comment or be unexported (golint)
    • broker-gateway/handler/admin.go
    • Line 30: warning: exported function AdminAuthHandler should have comment or be unexported (golint)
    • Line 52: warning: exported type OrderResponse should have comment or be unexported (golint)
    • Line 68: warning: exported function AdminOrderHandler should have comment or be unexported (golint)
    • Line 120: warning: exported type Trader should have comment or be unexported (golint)
    • Line 126: warning: exported type TradeResponse should have comment or be unexported (golint)
    • Line 136: warning: exported function AdminTradeHandler should have comment or be unexported (golint)
    • Line 212: warning: exported function AdminFirmHandler should have comment or be unexported (golint)
    • Line 223: warning: exported type Children should have comment or be unexported (golint)
    • Line 228: warning: exported type FuturesResponse should have comment or be unexported (golint)
    • Line 234: warning: exported function AdminFuturesHandler should have comment or be unexported (golint)
    • broker-gateway/matcher/executor.go
    • Line 18: warning: exported type Executor should have comment or be unexported (golint)
    • Line 22: warning: exported function NewExecutor should have comment or be unexported (golint)
    • Line 28: warning: exported method Executor.NewTrade should have comment or be unexported (golint)
    • broker-gateway/matcher/level_heap.go
    • Line 11: warning: exported type Level should have comment or be unexported (golint)
    • Line 16: warning: exported type LevelHeap should have comment or be unexported (golint)
    • Line 22: warning: exported method LevelHeap.Push should have comment or be unexported (golint)
    • Line 32: warning: exported method LevelHeap.Pop should have comment or be unexported (golint)
    • Line 48: warning: exported method LevelHeap.Remove should have comment or be unexported (golint)
    • Line 70: warning: exported function NewMinHeap should have comment or be unexported (golint)
    • Line 74: warning: exported method MinHeap.Less should have comment or be unexported (golint)
    • Line 81: warning: exported function NewMaxHeap should have comment or be unexported (golint)
    • Line 85: warning: exported method MaxHeap.Less should have comment or be unexported (golint)
    • broker-gateway/matcher/market_data.go
    • Line 17: warning: exported type MarketData should have comment or be unexported (golint)
    • Line 31: warning: exported function NewMarketData should have comment or be unexported (golint)
    • Line 282: warning: exported method MarketData.TriggerStopOrder should have comment or be unexported (golint)
    • Line 314: warning: exported method MarketData.BroadcastOrderBook should have comment or be unexported (golint)
    • broker-gateway/mapper/database.go
    • Line 10: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 15: warning: exported var DB should have comment or be unexported (golint)
    • Line 17: warning: exported function NewDB should have comment or be unexported (golint)
    • Line 36: warning: exported function NewEtcdClient should have comment or be unexported (golint)
    • broker-gateway/mapper/mapper.go
    • Line 5: warning: exported type Mapper should have comment or be unexported (golint)
    • Line 8: warning: exported function NewMapper should have comment or be unexported (golint)
    • Line 12: warning: exported method Mapper.Create should have comment or be unexported (golint)
    • Line 16: warning: exported method Mapper.FirstByID should have comment or be unexported (golint)
    • Line 20: warning: exported method Mapper.FirstByFirmName should have comment or be unexported (golint)
    • Line 24: warning: exported method Mapper.Save should have comment or be unexported (golint)
    • Line 28: warning: exported method Mapper.Update should have comment or be unexported (golint)
    • Line 32: warning: exported method Mapper.Delete should have comment or be unexported (golint)
    • Line 36: warning: exported method Mapper.WhereByUUID should have comment or be unexported (golint)
    • Line 40: warning: exported method Mapper.Find should have comment or be unexported (golint)
    • Line 44: warning: exported method Mapper.FindWithLimit should have comment or be unexported (golint)
    • Line 48: warning: exported method Mapper.FindWithPage should have comment or be unexported (golint)
    • Line 58: warning: exported method Mapper.FutureIDs should have comment or be unexported (golint)
    • Line 70: warning: exported method Mapper.FuturesNames should have comment or be unexported (golint)
    • Line 82: warning: exported method Mapper.FindByFuturesName should have comment or be unexported (golint)
    • Line 86: warning: exported method Mapper.FindByFuturesID should have comment or be unexported (golint)
    • Line 90: warning: exported method Mapper.FindTradesWithCondition should have comment or be unexported (golint)
    • Line 106: warning: exported method Mapper.FindTrades should have comment or be unexported (golint)
    • Line 122: warning: exported method Mapper.FindOrdersWithCondition should have comment or be unexported (golint)
    • Line 141: warning: exported method Mapper.FindOrders should have comment or be unexported (golint)
    • broker-gateway/handler/handler.go
    • Line 16: warning: exported type Error should have comment or be unexported (golint)
    • Line 22: warning: exported function StatusHandler should have comment or be unexported (golint)
    • Line 26: warning: exported function ErrorHandler should have comment or be unexported (golint)
    • broker-gateway/service/auth.go
    • Line 10: warning: exported type Auth should have comment or be unexported (golint)
    • Line 13: warning: exported method Auth.Sign should have comment or be unexported (golint)
    • Line 25: warning: exported method Auth.Validate should have comment or be unexported (golint)
    • Line 35: warning: exported method Auth.FirmNameByID should have comment or be unexported (golint)
    • Line 39: warning: exported method Auth.FirmIDByName should have comment or be unexported (golint)
    • broker-gateway/service/order.go
    • Line 11: warning: exported type Order should have comment or be unexported (golint)
    • Line 14: warning: exported method Order.NewOrder should have comment or be unexported (golint)
    • Line 22: warning: exported method Order.SaveOrder should have comment or be unexported (golint)
    • Line 30: warning: exported method Order.UpdateOrder should have comment or be unexported (golint)
    • Line 38: warning: exported method Order.CancelOrder should have comment or be unexported (golint)
    • Line 46: warning: exported method Order.OrderByID should have comment or be unexported (golint)
    • Line 56: warning: exported method Order.Orders should have comment or be unexported (golint)
    • Line 66: warning: exported method Order.OrdersWithPage should have comment or be unexported (golint)
    • Line 81: warning: exported method Order.OrdersWithCondition should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!