Preparing report...

Report for github.com/GSabadini/go-transactions

A+    Excellent!    Found 13 issues across 39 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!


golint69%

Golint is a linter for Go source code.

    • go-transactions/domain/account.go
    • Line 10: warning: exported var ErrAccountAlreadyExists should have comment or be unexported (golint)
    • Line 26: warning: comment on exported type AccountUpdater should be of the form "AccountUpdater ..." (with optional leading article) (golint)
    • Line 57: warning: comment on exported method Account.PaymentOperation should be of the form "PaymentOperation ..." (golint)
    • Line 67: warning: comment on exported method Account.Deposit should be of the form "Deposit ..." (golint)
    • Line 72: warning: comment on exported method Account.Withdraw should be of the form "Withdraw ..." (golint)
    • go-transactions/usecase/find_account_by_id.go
    • Line 11: warning: comment on exported type FindAccountByIDUseCase should be of the form "FindAccountByIDUseCase ..." (with optional leading article) (golint)
    • Line 16: warning: comment on exported type FindAccountByIDInput should be of the form "FindAccountByIDInput ..." (with optional leading article) (golint)
    • Line 21: warning: comment on exported type FindAccountByIDPresenter should be of the form "FindAccountByIDPresenter ..." (with optional leading article) (golint)
    • Line 26: warning: comment on exported type FindAccountByIDOutput should be of the form "FindAccountByIDOutput ..." (with optional leading article) (golint)
    • Line 34: warning: comment on exported type FindAccountByIDDocumentOutput should be of the form "FindAccountByIDDocumentOutput ..." (with optional leading article) (golint)
    • go-transactions/usecase/create_transaction.go
    • Line 12: warning: comment on exported type CreateTransactionUseCase should be of the form "CreateTransactionUseCase ..." (with optional leading article) (golint)
    • Line 17: warning: comment on exported type CreateTransactionInput should be of the form "CreateTransactionInput ..." (with optional leading article) (golint)
    • Line 24: warning: comment on exported type CreateTransactionPresenter should be of the form "CreateTransactionPresenter ..." (with optional leading article) (golint)
    • Line 29: warning: comment on exported type CreateTransactionOutput should be of the form "CreateTransactionOutput ..." (with optional leading article) (golint)
    • Line 39: warning: comment on exported type CreateTransactionOperationOutput should be of the form "CreateTransactionOperationOutput ..." (with optional leading article) (golint)
    • go-transactions/adapter/api/middleware/correlation_id.go
    • Line 10: warning: exported type CorrelationID should have comment or be unexported (golint)
    • Line 12: warning: exported function NewCorrelationID should have comment or be unexported (golint)
    • Line 16: warning: exported method CorrelationID.Execute should have comment or be unexported (golint)
    • Line 23: warning: should not use basic type string as key in context.WithValue (golint)
    • go-transactions/domain/operation.go
    • Line 6: warning: exported const Debit should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported var ErrOperationInvalid should have comment or be unexported (golint)
    • go-transactions/usecase/create_account.go
    • Line 12: warning: comment on exported type CreateAccountUseCase should be of the form "CreateAccountUseCase ..." (with optional leading article) (golint)
    • Line 17: warning: comment on exported type CreateAccountInput should be of the form "CreateAccountInput ..." (with optional leading article) (golint)
    • Line 25: warning: comment on exported type CreateAccountPresenter should be of the form "CreateAccountPresenter ..." (with optional leading article) (golint)
    • Line 30: warning: comment on exported type CreateAccountOutput should be of the form "CreateAccountOutput ..." (with optional leading article) (golint)
    • Line 38: warning: comment on exported type CreateAccountDocumentOutput should be of the form "CreateAccountDocumentOutput ..." (with optional leading article) (golint)

license0%

Checks whether your project has a LICENSE file.


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!