Preparing report...

Report for github.com/labd/commercetools-go-sdk

A+    Excellent!    Found 58 issues across 143 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!


golint76%

Golint is a linter for Go source code.

    • commercetools-go-sdk/commercetools/service_me.go
    • Line 164: warning: exported method MyCartUpdateWithIDInput.Validate should have comment or be unexported (golint)
    • Line 200: warning: exported method MyCartUpdateWithKeyInput.Validate should have comment or be unexported (golint)
    • Line 360: warning: exported method MyPaymentUpdateWithIDInput.Validate should have comment or be unexported (golint)
    • Line 396: warning: exported method MyPaymentUpdateWithKeyInput.Validate should have comment or be unexported (golint)
    • Line 517: warning: exported method MyShoppingListUpdateWithIDInput.Validate should have comment or be unexported (golint)
    • Line 553: warning: exported method MyShoppingListUpdateWithKeyInput.Validate should have comment or be unexported (golint)
    • commercetools-go-sdk/commercetools/service_order.go
    • Line 107: warning: exported method OrderUpdateWithIDInput.Validate should have comment or be unexported (golint)
    • Line 143: warning: exported method OrderUpdateWithOrderNumberInput.Validate should have comment or be unexported (golint)
    • Line 279: warning: exported method OrderEditUpdateWithIDInput.Validate should have comment or be unexported (golint)
    • Line 315: warning: exported method OrderEditUpdateWithKeyInput.Validate should have comment or be unexported (golint)
    • commercetools-go-sdk/commercetools/client.go
    • Line 23: warning: exported type ClientEndpoints should have comment or be unexported (golint)
    • Line 29: warning: exported type ClientCredentials should have comment or be unexported (golint)
    • Line 35: warning: exported type ClientConfig should have comment or be unexported (golint)
    • Line 115: warning: exported function NewClientEndpoints should have comment or be unexported (golint)
    • Line 172: warning: exported method Client.Endpoints should have comment or be unexported (golint)
    • Line 176: warning: exported method Client.ProjectKey should have comment or be unexported (golint)
    • commercetools-go-sdk/commercetools/service_in_store.go
    • Line 176: warning: exported method StoreCartUpdateWithIDInput.Validate should have comment or be unexported (golint)
    • Line 212: warning: exported method StoreCartUpdateWithKeyInput.Validate should have comment or be unexported (golint)
    • Line 386: warning: exported method StoreCustomerUpdateWithIDInput.Validate should have comment or be unexported (golint)
    • Line 422: warning: exported method StoreCustomerUpdateWithKeyInput.Validate should have comment or be unexported (golint)
    • Line 614: warning: exported method StoreMyCartUpdateWithIDInput.Validate should have comment or be unexported (golint)
    • Line 786: warning: exported method StoreOrderUpdateWithIDInput.Validate should have comment or be unexported (golint)
    • Line 822: warning: exported method StoreOrderUpdateWithOrderNumberInput.Validate should have comment or be unexported (golint)
    • Line 943: warning: exported method StoreShoppingListUpdateWithIDInput.Validate should have comment or be unexported (golint)
    • Line 979: warning: exported method StoreShoppingListUpdateWithKeyInput.Validate should have comment or be unexported (golint)

gocyclo81%

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.

    • commercetools-go-sdk/commercetools/types_me.go
    • Line 14: warning: cyclomatic complexity 55 of function mapDiscriminatorMyCartUpdateAction() is high (> 15) (gocyclo)
    • Line 214: warning: cyclomatic complexity 45 of function mapDiscriminatorMyCustomerUpdateAction() is high (> 15) (gocyclo)
    • Line 439: warning: cyclomatic complexity 41 of function mapDiscriminatorMyShoppingListUpdateAction() is high (> 15) (gocyclo)

ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell99%

Misspell Finds commonly misspelled English words

    • commercetools-go-sdk/commercetools/client.go
    • Line 180: warning: "accomodates" is a misspelling of "accommodates" (misspell)
    • Line 186: warning: "accomodates" is a misspelling of "accommodates" (misspell)
    • Line 192: warning: "accomodates" is a misspelling of "accommodates" (misspell)
    • Line 203: warning: "accomodates" is a misspelling of "accommodates" (misspell)
    • Line 217: warning: "accomodates" is a misspelling of "accommodates" (misspell)