Preparing report...

Report for github.com/paysuper/paysuper-checkout

(v1.4.0)

A    Great!    Found 34 issues across 41 files

Tweet

gofmt90%

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!


golint21%

Golint is a linter for Go source code.

    • paysuper-checkout/internal/validators/set.go
    • Line 15: warning: exported type ValidatorSet should have comment or be unexported (golint)
    • Line 27: warning: comment on exported method ValidatorSet.PhoneValidator should be of the form "PhoneValidator ..." (golint)
    • Line 33: warning: comment on exported method ValidatorSet.UuidValidator should be of the form "UuidValidator ..." (golint)
    • Line 39: warning: comment on exported method ValidatorSet.ZipUsaValidator should be of the form "ZipUsaValidator ..." (golint)
    • Line 44: warning: comment on exported method ValidatorSet.NameValidator should be of the form "NameValidator ..." (golint)
    • Line 49: warning: comment on exported method ValidatorSet.CityValidator should be of the form "CityValidator ..." (golint)
    • Line 54: warning: comment on exported method ValidatorSet.UserLocaleValidator should be of the form "UserLocaleValidator ..." (golint)
    • Line 59: warning: comment on exported method ValidatorSet.DateValidator should be of the form "DateValidator ..." (golint)
    • Line 65: warning: comment on exported function New should be of the form "New ..." (golint)
    • paysuper-checkout/pkg/http/common.go
    • Line 6: warning: exported const Prefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 11: warning: comment on exported type Dispatcher should be of the form "Dispatcher ..." (with optional leading article) (golint)
    • paysuper-checkout/pkg/micro/micro.go
    • Line 14: warning: comment on exported type Micro should be of the form "Micro ..." (with optional leading article) (golint)
    • Line 21: warning: comment on exported method Micro.Client should be of the form "Client ..." (golint)
    • Line 43: warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint)
    • Line 55: warning: comment on exported method Config.OnReload should be of the form "OnReload ..." (golint)
    • Line 60: warning: comment on exported method Config.Reload should be of the form "Reload ..." (golint)
    • Line 65: warning: comment on exported function New should be of the form "New ..." (golint)
    • paysuper-checkout/internal/dispatcher/common/binder.go
    • Line 12: warning: exported var BinderDefault should have comment or be unexported (golint)
    • Line 16: warning: exported type Binder should have comment or be unexported (golint)
    • Line 18: warning: exported method Binder.Bind should have comment or be unexported (golint)
    • Line 30: warning: exported type OrderJsonBinder should have comment or be unexported (golint)
    • Line 31: warning: exported type PaymentCreateProcessBinder should have comment or be unexported (golint)
    • Line 33: warning: comment on exported method OrderJsonBinder.Bind should be of the form "Bind ..." (golint)
    • Line 58: warning: comment on exported method PaymentCreateProcessBinder.Bind should be of the form "Bind ..." (golint)
    • paysuper-checkout/internal/dispatcher/common/common.go
    • Line 13: warning: exported const Prefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: comment on exported function ExtractRawBodyContext should be of the form "ExtractRawBodyContext ..." (golint)
    • Line 27: warning: comment on exported function ExtractBinderContext should be of the form "ExtractBinderContext ..." (golint)
    • Line 35: warning: comment on exported function SetRawBodyContext should be of the form "SetRawBodyContext ..." (golint)
    • Line 40: warning: comment on exported function SetBinder should be of the form "SetBinder ..." (golint)
    • Line 45: warning: comment on exported type Groups should be of the form "Groups ..." (with optional leading article) (golint)
    • Line 50: warning: comment on exported type Handler should be of the form "Handler ..." (with optional leading article) (golint)
    • Line 55: warning: comment on exported type Validator should be of the form "Validator ..." (with optional leading article) (golint)
    • Line 60: warning: comment on exported type Services should be of the form "Services ..." (with optional leading article) (golint)
    • Line 65: warning: comment on exported type Handlers should be of the form "Handlers ..." (with optional leading article) (golint)
    • Line 68: warning: comment on exported type HandlerSet should be of the form "HandlerSet ..." (with optional leading article) (golint)
    • Line 75: warning: comment on exported method HandlerSet.BindAndValidate should be of the form "BindAndValidate ..." (golint)
    • paysuper-checkout/internal/dispatcher/middlewares.go
    • Line 13: warning: comment on exported method Dispatcher.RecoverMiddleware should be of the form "RecoverMiddleware ..." (golint)
    • Line 32: warning: comment on exported method Dispatcher.RawBodyPreMiddleware should be of the form "RawBodyPreMiddleware ..." (golint)
    • Line 43: warning: comment on exported method Dispatcher.BodyDumpMiddleware should be of the form "BodyDumpMiddleware ..." (golint)
    • paysuper-checkout/pkg/micro/provider.go
    • Line 11: warning: comment on exported function Cfg should be of the form "Cfg ..." (golint)
    • Line 20: warning: comment on exported function CfgTest should be of the form "CfgTest ..." (golint)
    • Line 28: warning: comment on exported function Provider should be of the form "Provider ..." (golint)
    • Line 34: warning: comment on exported function ProviderTest should be of the form "ProviderTest ..." (golint)
    • Line 41: warning: exported var WireSet should have comment or be unexported (golint)
    • paysuper-checkout/internal/dispatcher/provider.go
    • Line 16: warning: comment on exported function ProviderCfg should be of the form "ProviderCfg ..." (golint)
    • Line 26: warning: comment on exported function ProviderGlobalCfg should be of the form "ProviderGlobalCfg ..." (golint)
    • Line 33: warning: comment on exported function ProviderServices should be of the form "ProviderServices ..." (golint)
    • Line 40: warning: comment on exported function ProviderValidators should be of the form "ProviderValidators ..." (golint)
    • Line 67: warning: comment on exported function ProviderDispatcher should be of the form "ProviderDispatcher ..." (golint)
    • Line 74: warning: comment on exported var WireSet should be of the form "WireSet ..." (golint)
    • Line 83: warning: comment on exported var WireTestSet should be of the form "WireTestSet ..." (golint)
    • paysuper-checkout/pkg/http/http.go
    • Line 12: warning: comment on exported type HTTP should be of the form "HTTP ..." (with optional leading article) (golint)
    • Line 20: warning: comment on exported method HTTP.ListenAndServe should be of the form "ListenAndServe ..." (golint)
    • Line 54: warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint)
    • Line 61: warning: comment on exported method Config.OnReload should be of the form "OnReload ..." (golint)
    • Line 66: warning: comment on exported method Config.Reload should be of the form "Reload ..." (golint)
    • Line 71: warning: comment on exported function New should be of the form "New ..." (golint)
    • paysuper-checkout/internal/handlers/country.go
    • Line 16: warning: exported type CountryRoute should have comment or be unexported (golint)
    • Line 22: warning: exported function NewCountryRoute should have comment or be unexported (golint)
    • Line 31: warning: exported method CountryRoute.Route should have comment or be unexported (golint)
    • paysuper-checkout/internal/handlers/customer.go
    • Line 17: warning: exported type CustomerRoute should have comment or be unexported (golint)
    • Line 23: warning: exported function NewCustomerRoute should have comment or be unexported (golint)
    • Line 32: warning: exported method CustomerRoute.Route should have comment or be unexported (golint)
    • paysuper-checkout/internal/handlers/order.go
    • Line 30: warning: exported type CreateOrderJsonProjectResponse should have comment or be unexported (golint)
    • Line 37: warning: exported type ReCreateOrderRequest should have comment or be unexported (golint)
    • Line 42: warning: exported type ListOrdersRequest should have comment or be unexported (golint)
    • Line 55: warning: exported type OrderRoute should have comment or be unexported (golint)
    • Line 61: warning: exported function NewOrderRoute should have comment or be unexported (golint)
    • Line 70: warning: exported method OrderRoute.Route should have comment or be unexported (golint)
    • paysuper-checkout/pkg/http/provider.go
    • Line 11: warning: comment on exported function Cfg should be of the form "Cfg ..." (golint)
    • Line 20: warning: comment on exported function CfgTest should be of the form "CfgTest ..." (golint)
    • Line 28: warning: comment on exported function Provider should be of the form "Provider ..." (golint)
    • Line 35: warning: exported var WireSet should have comment or be unexported (golint)
    • paysuper-checkout/internal/test/test.go
    • Line 21: warning: comment on exported type EchoReqResCaller should be of the form "EchoReqResCaller ..." (with optional leading article) (golint)
    • Line 27: warning: comment on exported function NewTestRequest should be of the form "NewTestRequest ..." (golint)
    • Line 35: warning: exported type Middleware should have comment or be unexported (golint)
    • Line 40: warning: exported type MiddlewareTestUp should have comment or be unexported (golint)
    • Line 45: warning: exported type QueryBuilder should have comment or be unexported (golint)
    • Line 56: warning: comment on exported method QueryBuilder.Params should be of the form "Params ..." (golint)
    • Line 62: warning: comment on exported method QueryBuilder.AddCookie should be of the form "AddCookie ..." (golint)
    • Line 68: warning: comment on exported method QueryBuilder.SetQueryParam should be of the form "SetQueryParam ..." (golint)
    • Line 74: warning: comment on exported method QueryBuilder.SetQueryParams should be of the form "SetQueryParams ..." (golint)
    • Line 84: warning: comment on exported method QueryBuilder.Init should be of the form "Init ..." (golint)
    • Line 90: warning: comment on exported method QueryBuilder.BodyString should be of the form "BodyString ..." (golint)
    • Line 96: warning: comment on exported method QueryBuilder.BodyBytes should be of the form "BodyBytes ..." (golint)
    • Line 102: warning: comment on exported method QueryBuilder.Method should be of the form "Method ..." (golint)
    • Line 108: warning: comment on exported method QueryBuilder.Path should be of the form "Path ..." (golint)
    • Line 114: warning: comment on exported method QueryBuilder.Body should be of the form "Body ..." (golint)
    • Line 120: warning: comment on exported method QueryBuilder.AddHeader should be of the form "AddHeader ..." (golint)
    • Line 130: warning: comment on exported method QueryBuilder.SetHeaders should be of the form "SetHeaders ..." (golint)
    • Line 141: warning: comment on exported method QueryBuilder.Exec should be of the form "Exec ..." (golint)
    • Line 165: warning: comment on exported method QueryBuilder.ExecFileUpload should be of the form "ExecFileUpload ..." (golint)
    • Line 208: warning: comment on exported function NewQueryBuilder should be of the form "NewQueryBuilder ..." (golint)
    • Line 213: warning: comment on exported method MiddlewareTestUp.Post should be of the form "Post ..." (golint)
    • Line 218: warning: comment on exported method MiddlewareTestUp.Pre should be of the form "Pre ..." (golint)
    • Line 223: warning: comment on exported method MiddlewareTestUp.ListUse should be of the form "ListUse ..." (golint)
    • Line 228: warning: comment on exported method MiddlewareTestUp.ListPre should be of the form "ListPre ..." (golint)
    • Line 233: warning: exported type MiddlewareHandlerFunc should have comment or be unexported (golint)
    • Line 235: warning: comment on exported method EchoReqResCaller.Request should be of the form "Request ..." (golint)
    • Line 259: warning: comment on exported method EchoReqResCaller.Builder should be of the form "Builder ..." (golint)
    • Line 264: warning: comment on exported function DefaultSettings should be of the form "DefaultSettings ..." (golint)
    • Line 278: warning: comment on exported function SetUp should be of the form "SetUp ..." (golint)
    • Line 303: warning: comment on exported function ReqInitJSON should be of the form "ReqInitJSON ..." (golint)
    • Line 310: warning: comment on exported function ReqInitMultipartForm should be of the form "ReqInitMultipartForm ..." (golint)
    • Line 317: warning: comment on exported function ReqInitApplicationForm should be of the form "ReqInitApplicationForm ..." (golint)
    • Line 324: warning: comment on exported function ReqInitXML should be of the form "ReqInitXML ..." (golint)
    • paysuper-checkout/internal/dispatcher/common/errors.go
    • Line 7: warning: comment on exported function NewManagementApiResponseError should be of the form "NewManagementApiResponseError ..." (golint)
    • Line 18: warning: comment on exported function NewValidationError should be of the form "NewValidationError ..." (golint)
    • Line 24: warning: exported var ErrorUnknown should have comment or be unexported (golint)
    • paysuper-checkout/internal/dispatcher/common/template.go
    • Line 10: warning: exported var FuncMap should have comment or be unexported (golint)
    • Line 17: warning: comment on exported type Template should be of the form "Template ..." (with optional leading article) (golint)
    • Line 22: warning: comment on exported method Template.Render should be of the form "Render ..." (golint)
    • Line 27: warning: comment on exported function NewTemplate should be of the form "NewTemplate ..." (golint)
    • paysuper-checkout/internal/dispatcher/dispatcher.go
    • Line 20: warning: comment on exported type Dispatcher should be of the form "Dispatcher ..." (with optional leading article) (golint)
    • Line 30: warning: comment on exported method Dispatcher.Dispatch should be of the form "Dispatch ..." (golint)
    • Line 126: warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint)
    • Line 134: warning: comment on exported method Config.OnReload should be of the form "OnReload ..." (golint)
    • Line 139: warning: comment on exported method Config.Reload should be of the form "Reload ..." (golint)
    • Line 144: warning: comment on exported type AppSet should be of the form "AppSet ..." (with optional leading article) (golint)
    • Line 150: warning: comment on exported function New should be of the form "New ..." (golint)
    • paysuper-checkout/internal/handlers/payment.go
    • Line 19: warning: exported type PaymentRoute should have comment or be unexported (golint)
    • Line 25: warning: exported type RedirectResponse should have comment or be unexported (golint)
    • Line 32: warning: exported function NewPaymentRoute should have comment or be unexported (golint)
    • Line 41: warning: exported method PaymentRoute.Route should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!