Preparing report...

Report for gitlab.com/rburdet/cabify

A    Great!    Found 11 issues across 15 files

Tweet

gofmt86%

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!


gocyclo100%

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.

No problems detected. Good job!


golint40%

Golint is a linter for Go source code.

    • /gitlab.com/rburdet/cabify/handler/product.go
    • Line 9: warning: exported type ProductHandler should have comment or be unexported (golint)
    • Line 13: warning: exported function NewProductHandler should have comment or be unexported (golint)
    • Line 17: warning: exported method ProductHandler.ListAllProducts should have comment or be unexported (golint)
    • /gitlab.com/rburdet/cabify/db/db.go
    • Line 8: warning: exported type Db should have comment or be unexported (golint)
    • Line 19: warning: exported type PromotionDb should have comment or be unexported (golint)
    • Line 23: warning: exported function NewPromotionsDb should have comment or be unexported (golint)
    • Line 47: warning: exported method DbImpl.GetProduct should have comment or be unexported (golint)
    • Line 66: warning: exported method PromotionDb.GetStrategies should have comment or be unexported (golint)
    • /gitlab.com/rburdet/cabify/db/memdb.go
    • Line 7: warning: exported type MemDb should have comment or be unexported (golint)
    • Line 13: warning: exported type MemDbImpl should have comment or be unexported (golint)
    • Line 17: warning: exported function NewMemDbImpl should have comment or be unexported (golint)
    • Line 21: warning: exported method MemDbImpl.SaveBasket should have comment or be unexported (golint)
    • Line 25: warning: exported method MemDbImpl.GetBasket should have comment or be unexported (golint)
    • Line 29: warning: exported method MemDbImpl.DeleteBasket should have comment or be unexported (golint)
    • /gitlab.com/rburdet/cabify/model/basket.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 4: warning: exported type Basket should have comment or be unexported (golint)
    • Line 8: warning: exported type BasketProduct should have comment or be unexported (golint)
    • Line 13: warning: exported type BasketHelper should have comment or be unexported (golint)
    • Line 17: warning: exported function NewBasket should have comment or be unexported (golint)
    • Line 21: warning: exported method Basket.AddProduct should have comment or be unexported (golint)
    • Line 25: warning: exported method Basket.RemoveProduct should have comment or be unexported (golint)
    • Line 34: warning: exported method Basket.GetAllProducts should have comment or be unexported (golint)
    • Line 38: warning: exported method Basket.GetDiscountAmmount should have comment or be unexported (golint)
    • Line 46: warning: exported method Basket.GetTotalAmmount should have comment or be unexported (golint)
    • Line 54: warning: exported method Basket.RefreshDiscount should have comment or be unexported (golint)
    • /gitlab.com/rburdet/cabify/model/strategy.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 4: warning: exported type DiscountCalculator should have comment or be unexported (golint)
    • Line 8: warning: comment on exported type FreeProduct should be of the form "FreeProduct ..." (with optional leading article) (golint)
    • Line 13: warning: exported type BulkDiscount should have comment or be unexported (golint)
    • Line 19: warning: exported method FreeProduct.CalculateAmmount should have comment or be unexported (golint)
    • Line 36: warning: exported method BulkDiscount.CalculateAmmount should have comment or be unexported (golint)
    • /gitlab.com/rburdet/cabify/service/product.go
    • Line 8: warning: exported type ProductService should have comment or be unexported (golint)
    • Line 12: warning: exported function NewProductService should have comment or be unexported (golint)
    • Line 16: warning: exported method ProductService.ListAllProducts should have comment or be unexported (golint)
    • /gitlab.com/rburdet/cabify/service/basket.go
    • Line 10: warning: exported type BasketService should have comment or be unexported (golint)
    • Line 16: warning: exported function NewBasketService should have comment or be unexported (golint)
    • Line 26: warning: exported method BasketService.CreateBasket should have comment or be unexported (golint)
    • Line 32: warning: exported method BasketService.AddProduct should have comment or be unexported (golint)
    • Line 39: warning: exported method BasketService.RemoveProduct should have comment or be unexported (golint)
    • Line 46: warning: exported method BasketService.GetAllProducts should have comment or be unexported (golint)
    • Line 54: warning: exported method BasketService.GetTotalAmmount should have comment or be unexported (golint)
    • /gitlab.com/rburdet/cabify/handler/basket.go
    • Line 10: warning: exported type BasketHandler should have comment or be unexported (golint)
    • Line 14: warning: exported function NewBasketHandler should have comment or be unexported (golint)
    • Line 18: warning: exported method BasketHandler.CreateBasket should have comment or be unexported (golint)
    • Line 25: warning: exported method BasketHandler.AddProduct should have comment or be unexported (golint)
    • Line 38: warning: exported method BasketHandler.RemoveProduct should have comment or be unexported (golint)
    • Line 46: warning: exported method BasketHandler.GetAllProducts should have comment or be unexported (golint)
    • Line 52: warning: exported method BasketHandler.GetTotal should have comment or be unexported (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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!