Preparing report...

Report for github.com/luk4z7/pagarme-go

A+    Excellent!    Found 36 issues across 62 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!


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!


golint43%

Golint is a linter for Go source code.

    • pagarme-go/lib/subscription/event/event.go
    • Line 17: warning: exported type SubscriptionEvent should have comment or be unexported (golint)
    • Line 25: warning: error should be the last type when returning multiple items (golint)
    • Line 25: warning: exported method SubscriptionEvent.Get should have comment or be unexported (golint)
    • Line 31: warning: error should be the last type when returning multiple items (golint)
    • Line 31: warning: exported method SubscriptionEvent.GetAll should have comment or be unexported (golint)
    • pagarme-go/lib/zipcode/zipcode.go
    • Line 20: warning: exported type Zipcode should have comment or be unexported (golint)
    • Line 28: warning: error should be the last type when returning multiple items (golint)
    • Line 28: warning: exported method Zipcode.Get should have comment or be unexported (golint)
    • pagarme-go/config/apikey.go
    • Line 11: warning: exported type Config should have comment or be unexported (golint)
    • Line 15: warning: exported type ApiKey should have comment or be unexported (golint)
    • Line 19: warning: exported method ApiKey.GetApiKey should have comment or be unexported (golint)
    • pagarme-go/lib/search/search.go
    • Line 20: warning: exported type Search should have comment or be unexported (golint)
    • Line 27: warning: exported type Shards should have comment or be unexported (golint)
    • Line 33: warning: exported type Hits should have comment or be unexported (golint)
    • Line 39: warning: exported type HitsInto should have comment or be unexported (golint)
    • Line 47: warning: error should be the last type when returning multiple items (golint)
    • Line 47: warning: exported method Search.Get should have comment or be unexported (golint)
    • pagarme-go/lib/transaction/payable/payable.go
    • Line 21: warning: exported type TransactionPayable should have comment or be unexported (golint)
    • Line 25: warning: error should be the last type when returning multiple items (golint)
    • Line 25: warning: exported method TransactionPayable.Get should have comment or be unexported (golint)
    • Line 31: warning: error should be the last type when returning multiple items (golint)
    • Line 31: warning: exported method TransactionPayable.GetAll should have comment or be unexported (golint)
    • pagarme-go/lib/recipient/balance/operation/operation.go
    • Line 21: warning: exported type OperationRecipient should have comment or be unexported (golint)
    • Line 25: warning: error should be the last type when returning multiple items (golint)
    • Line 25: warning: exported method OperationRecipient.Get should have comment or be unexported (golint)
    • Line 31: warning: error should be the last type when returning multiple items (golint)
    • Line 31: warning: exported method OperationRecipient.GetAll should have comment or be unexported (golint)
    • pagarme-go/lib/transaction/antifraudanalysis/antifraudanalysis.go
    • Line 21: warning: exported type AntifraudAnalysis should have comment or be unexported (golint)
    • Line 32: warning: error should be the last type when returning multiple items (golint)
    • Line 32: warning: exported method AntifraudAnalysis.Get should have comment or be unexported (golint)
    • Line 38: warning: error should be the last type when returning multiple items (golint)
    • Line 38: warning: exported method AntifraudAnalysis.GetAll should have comment or be unexported (golint)
    • pagarme-go/lib/transaction/event/event.go
    • Line 17: warning: exported type TransactionEvent should have comment or be unexported (golint)
    • Line 25: warning: error should be the last type when returning multiple items (golint)
    • Line 25: warning: exported method TransactionEvent.Get should have comment or be unexported (golint)
    • Line 31: warning: error should be the last type when returning multiple items (golint)
    • Line 31: warning: exported method TransactionEvent.GetAll should have comment or be unexported (golint)
    • pagarme-go/error/error.go
    • Line 7: warning: exported type ErrorsAPI should have comment or be unexported (golint)
    • Line 13: warning: exported type Errors should have comment or be unexported (golint)
    • Line 19: warning: exported type Err should have comment or be unexported (golint)
    • Line 27: warning: comment on exported function Check should be of the form "Check ..." (golint)
    • pagarme-go/lib/card/card.go
    • Line 21: warning: exported type Card should have comment or be unexported (golint)
    • Line 36: warning: error should be the last type when returning multiple items (golint)
    • Line 36: warning: exported method Card.Create should have comment or be unexported (golint)
    • Line 41: warning: error should be the last type when returning multiple items (golint)
    • Line 41: warning: exported method Card.Get should have comment or be unexported (golint)
    • pagarme-go/lib/transaction/splitrule/splitrule.go
    • Line 21: warning: exported type SplitRule should have comment or be unexported (golint)
    • Line 34: warning: error should be the last type when returning multiple items (golint)
    • Line 34: warning: exported method SplitRule.Get should have comment or be unexported (golint)
    • Line 40: warning: error should be the last type when returning multiple items (golint)
    • Line 40: warning: exported method SplitRule.GetAll should have comment or be unexported (golint)
    • pagarme-go/lib/customer/customer.go
    • Line 21: warning: exported type Customer should have comment or be unexported (golint)
    • Line 35: warning: exported type Addresses should have comment or be unexported (golint)
    • Line 48: warning: exported type Phones should have comment or be unexported (golint)
    • Line 56: warning: error should be the last type when returning multiple items (golint)
    • Line 56: warning: exported method Customer.Create should have comment or be unexported (golint)
    • Line 61: warning: error should be the last type when returning multiple items (golint)
    • Line 61: warning: exported method Customer.Get should have comment or be unexported (golint)
    • Line 67: warning: error should be the last type when returning multiple items (golint)
    • Line 67: warning: exported method Customer.GetAll should have comment or be unexported (golint)
    • pagarme-go/lib/bank/account.go
    • Line 21: warning: exported type Account should have comment or be unexported (golint)
    • Line 35: warning: error should be the last type when returning multiple items (golint)
    • Line 35: warning: exported method Account.Create should have comment or be unexported (golint)
    • Line 40: warning: error should be the last type when returning multiple items (golint)
    • Line 40: warning: exported method Account.Get should have comment or be unexported (golint)
    • Line 46: warning: error should be the last type when returning multiple items (golint)
    • Line 46: warning: exported method Account.GetAll should have comment or be unexported (golint)
    • pagarme-go/lib/transaction/transaction.go
    • Line 25: warning: comment on exported type Transaction should be of the form "Transaction ..." (with optional leading article) (golint)
    • Line 124: warning: exported type Metadata should have comment or be unexported (golint)
    • Line 128: warning: exported type AntifraudMetadata should have comment or be unexported (golint)
    • Line 130: warning: error should be the last type when returning multiple items (golint)
    • Line 130: warning: exported method Transaction.Create should have comment or be unexported (golint)
    • Line 135: warning: error should be the last type when returning multiple items (golint)
    • Line 135: warning: exported method Transaction.Get should have comment or be unexported (golint)
    • Line 141: warning: error should be the last type when returning multiple items (golint)
    • Line 141: warning: exported method Transaction.GetAll should have comment or be unexported (golint)
    • pagarme-go/lib/plan/plan.go
    • Line 21: warning: comment on exported type Plan should be of the form "Plan ..." (with optional leading article) (golint)
    • Line 44: warning: error should be the last type when returning multiple items (golint)
    • Line 44: warning: exported method Plan.Create should have comment or be unexported (golint)
    • Line 49: warning: error should be the last type when returning multiple items (golint)
    • Line 49: warning: exported method Plan.Get should have comment or be unexported (golint)
    • Line 55: warning: error should be the last type when returning multiple items (golint)
    • Line 55: warning: exported method Plan.GetAll should have comment or be unexported (golint)
    • Line 61: warning: error should be the last type when returning multiple items (golint)
    • Line 61: warning: exported method Plan.Update should have comment or be unexported (golint)
    • pagarme-go/lib/payable/payable.go
    • Line 21: warning: exported type Payable should have comment or be unexported (golint)
    • Line 36: warning: error should be the last type when returning multiple items (golint)
    • Line 36: warning: exported method Payable.Get should have comment or be unexported (golint)
    • Line 42: warning: error should be the last type when returning multiple items (golint)
    • Line 42: warning: exported method Payable.GetAll should have comment or be unexported (golint)
    • pagarme-go/lib/subscription/postback/postback.go
    • Line 17: warning: exported type SubscriptionPostback should have comment or be unexported (golint)
    • Line 25: warning: error should be the last type when returning multiple items (golint)
    • Line 25: warning: exported method SubscriptionPostback.Get should have comment or be unexported (golint)
    • Line 31: warning: error should be the last type when returning multiple items (golint)
    • Line 31: warning: exported method SubscriptionPostback.GetAll should have comment or be unexported (golint)
    • Line 38: warning: error should be the last type when returning multiple items (golint)
    • Line 38: warning: exported method SubscriptionPostback.Redeliver should have comment or be unexported (golint)
    • pagarme-go/lib/recipient/balance/balance.go
    • Line 17: warning: exported type BalanceRecipient should have comment or be unexported (golint)
    • Line 25: warning: error should be the last type when returning multiple items (golint)
    • Line 25: warning: exported method BalanceRecipient.Get should have comment or be unexported (golint)
    • pagarme-go/lib/balance/balance.go
    • Line 20: warning: comment on exported type BalanceAmount should be of the form "BalanceAmount ..." (with optional leading article) (golint)
    • Line 31: warning: error should be the last type when returning multiple items (golint)
    • Line 31: warning: exported method BalanceAmount.GetAll should have comment or be unexported (golint)
    • pagarme-go/repository/repository.go
    • Line 27: warning: comment on exported method Repository.Get should be of the form "Get ..." (golint)
    • Line 40: warning: error should be the last type when returning multiple items (golint)
    • Line 59: warning: comment on exported method Repository.Create should be of the form "Create ..." (golint)
    • Line 61: warning: error should be the last type when returning multiple items (golint)
    • Line 66: warning: error should be the last type when returning multiple items (golint)
    • Line 66: warning: exported method Repository.Update should have comment or be unexported (golint)
    • Line 66: warning: receiver name s should be consistent with previous receiver name r for Repository (golint)
    • Line 72: warning: error should be the last type when returning multiple items (golint)
    • Line 100: warning: error should be the last type when returning multiple items (golint)
    • pagarme-go/lib/transaction/operation/operation.go
    • Line 17: warning: exported type TransactionOperation should have comment or be unexported (golint)
    • Line 25: warning: error should be the last type when returning multiple items (golint)
    • Line 25: warning: exported method TransactionOperation.Get should have comment or be unexported (golint)
    • Line 31: warning: error should be the last type when returning multiple items (golint)
    • Line 31: warning: exported method TransactionOperation.GetAll should have comment or be unexported (golint)
    • pagarme-go/lib/recipient/recipient.go
    • Line 22: warning: exported type Recipient should have comment or be unexported (golint)
    • Line 36: warning: error should be the last type when returning multiple items (golint)
    • Line 36: warning: exported method Recipient.Create should have comment or be unexported (golint)
    • Line 41: warning: error should be the last type when returning multiple items (golint)
    • Line 41: warning: exported method Recipient.Get should have comment or be unexported (golint)
    • Line 47: warning: error should be the last type when returning multiple items (golint)
    • Line 47: warning: exported method Recipient.GetAll should have comment or be unexported (golint)
    • Line 53: warning: error should be the last type when returning multiple items (golint)
    • Line 53: warning: exported method Recipient.Update should have comment or be unexported (golint)
    • pagarme-go/lib/transfer/transfer.go
    • Line 22: warning: comment on exported type Transfer should be of the form "Transfer ..." (with optional leading article) (golint)
    • Line 57: warning: error should be the last type when returning multiple items (golint)
    • Line 57: warning: exported method Transfer.Create should have comment or be unexported (golint)
    • Line 62: warning: error should be the last type when returning multiple items (golint)
    • Line 62: warning: exported method Transfer.Get should have comment or be unexported (golint)
    • Line 68: warning: error should be the last type when returning multiple items (golint)
    • Line 68: warning: exported method Transfer.GetAll should have comment or be unexported (golint)
    • Line 74: warning: error should be the last type when returning multiple items (golint)
    • Line 74: warning: exported method Transfer.Update should have comment or be unexported (golint)
    • Line 80: warning: error should be the last type when returning multiple items (golint)
    • Line 80: warning: exported method Transfer.Cancel should have comment or be unexported (golint)
    • pagarme-go/auth/auth.go
    • Line 16: warning: exported type Headers should have comment or be unexported (golint)
    • Line 18: warning: comment on exported function BasicAuth should be of the form "BasicAuth ..." (golint)
    • Line 24: warning: comment on exported function Init should be of the form "Init ..." (golint)
    • pagarme-go/lib/balance/operation/operation.go
    • Line 21: warning: comment on exported type BalanceOperation should be of the form "BalanceOperation ..." (with optional leading article) (golint)
    • Line 40: warning: comment on exported type BalanceMovement should be of the form "BalanceMovement ..." (with optional leading article) (golint)
    • Line 75: warning: error should be the last type when returning multiple items (golint)
    • Line 75: warning: exported method BalanceOperation.Get should have comment or be unexported (golint)
    • Line 81: warning: error should be the last type when returning multiple items (golint)
    • Line 81: warning: exported method BalanceOperation.GetAll should have comment or be unexported (golint)
    • pagarme-go/lib/operation/operation.go
    • Line 9: warning: comment on exported type Operation should be of the form "Operation ..." (with optional leading article) (golint)
    • Line 46: warning: exported type Metadata should have comment or be unexported (golint)
    • Line 50: warning: exported type Environment should have comment or be unexported (golint)
    • pagarme-go/lib/subscription/subscription.go
    • Line 25: warning: comment on exported type Subscription should be of the form "Subscription ..." (with optional leading article) (golint)
    • Line 66: warning: exported type Metadata should have comment or be unexported (golint)
    • Line 68: warning: error should be the last type when returning multiple items (golint)
    • Line 68: warning: exported method Subscription.Cancel should have comment or be unexported (golint)
    • Line 74: warning: error should be the last type when returning multiple items (golint)
    • Line 74: warning: exported method Subscription.Create should have comment or be unexported (golint)
    • Line 79: warning: error should be the last type when returning multiple items (golint)
    • Line 79: warning: exported method Subscription.Get should have comment or be unexported (golint)
    • Line 85: warning: error should be the last type when returning multiple items (golint)
    • Line 85: warning: exported method Subscription.GetAll should have comment or be unexported (golint)
    • Line 91: warning: error should be the last type when returning multiple items (golint)
    • Line 91: warning: exported method Subscription.Update should have comment or be unexported (golint)
    • pagarme-go/lib/transaction/postback/postback.go
    • Line 17: warning: exported type TransactionPostback should have comment or be unexported (golint)
    • Line 25: warning: error should be the last type when returning multiple items (golint)
    • Line 25: warning: exported method TransactionPostback.Get should have comment or be unexported (golint)
    • Line 31: warning: error should be the last type when returning multiple items (golint)
    • Line 31: warning: exported method TransactionPostback.GetAll should have comment or be unexported (golint)
    • Line 38: warning: error should be the last type when returning multiple items (golint)
    • Line 38: warning: exported method TransactionPostback.Redeliver should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell95%

Misspell Finds commonly misspelled English words