Preparing report...

Report for github.com/BeanPay/api

A+    Excellent!    Found 14 issues across 33 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!


golint60%

Golint is a linter for Go source code.

    • api/database/models/payment.go
    • Line 9: warning: exported type Payment should have comment or be unexported (golint)
    • Line 29: warning: exported type PaymentRepository should have comment or be unexported (golint)
    • Line 57: warning: comment on exported method PaymentRepository.FetchAllUserPayments should be of the form "FetchAllUserPayments ..." (golint)
    • Line 74: warning: exported method PaymentRepository.FetchByID should have comment or be unexported (golint)
    • Line 87: warning: exported method PaymentRepository.Insert should have comment or be unexported (golint)
    • Line 100: warning: exported method PaymentRepository.Delete should have comment or be unexported (golint)
    • api/database/models/refresh_token.go
    • Line 9: warning: exported type RefreshToken should have comment or be unexported (golint)
    • Line 25: warning: exported type RefreshTokenRepository should have comment or be unexported (golint)
    • Line 29: warning: exported method RefreshTokenRepository.FetchByID should have comment or be unexported (golint)
    • Line 42: warning: exported method RefreshTokenRepository.FetchMostRecentInChain should have comment or be unexported (golint)
    • Line 55: warning: exported method RefreshTokenRepository.DeleteChain should have comment or be unexported (golint)
    • Line 70: warning: exported method RefreshTokenRepository.Insert should have comment or be unexported (golint)
    • api/database/connection_info.go
    • Line 7: warning: exported type ConnectionInfo should have comment or be unexported (golint)
    • Line 16: warning: exported method ConnectionInfo.ToURI should have comment or be unexported (golint)
    • api/database/connection.go
    • Line 8: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 12: warning: exported type Config should have comment or be unexported (golint)
    • Line 19: warning: exported function NewConnection should have comment or be unexported (golint)
    • api/database/ephemeral_database.go
    • Line 11: warning: comment on exported function NewTestEphemeralDatabase should be of the form "NewTestEphemeralDatabase ..." (golint)
    • Line 32: warning: exported function NewEphemeralDatabase should have comment or be unexported (golint)
    • api/server/test_server.go
    • Line 17: warning: exported function NewTestServer should have comment or be unexported (golint)
    • Line 64: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 68: warning: comment on exported method TestServer.SeedUser should be of the form "SeedUser ..." (golint)
    • Line 90: warning: comment on exported method TestServer.SeedBill should be of the form "SeedBill ..." (golint)
    • Line 116: warning: comment on exported method TestServer.SeedPayment should be of the form "SeedPayment ..." (golint)
    • Line 139: warning: exported method TestServer.Shutdown should have comment or be unexported (golint)
    • api/database/models/bill.go
    • Line 9: warning: exported type Bill should have comment or be unexported (golint)
    • Line 35: warning: exported type BillRepository should have comment or be unexported (golint)
    • Line 66: warning: exported method BillRepository.FetchAllUserBills should have comment or be unexported (golint)
    • Line 70: warning: exported method BillRepository.FetchByID should have comment or be unexported (golint)
    • Line 83: warning: exported method BillRepository.Insert should have comment or be unexported (golint)
    • Line 99: warning: exported method BillRepository.Update should have comment or be unexported (golint)
    • Line 121: warning: exported method BillRepository.Delete should have comment or be unexported (golint)
    • api/database/models/user.go
    • Line 9: warning: exported type User should have comment or be unexported (golint)
    • Line 27: warning: exported type UserRepository should have comment or be unexported (golint)
    • Line 31: warning: exported method UserRepository.FetchByEmail should have comment or be unexported (golint)
    • Line 44: warning: exported method UserRepository.FetchByID should have comment or be unexported (golint)
    • Line 57: warning: exported method UserRepository.Insert should have comment or be unexported (golint)
    • Line 67: warning: exported method UserRepository.Update should have comment or be unexported (golint)
    • Line 78: warning: exported method UserRepository.Delete should have comment or be unexported (golint)
    • api/server/jwt/signatory.go
    • Line 9: warning: exported type Claims should have comment or be unexported (golint)
    • Line 14: warning: exported type JwtSignatory should have comment or be unexported (golint)
    • Line 18: warning: exported method JwtSignatory.GenerateSignedToken should have comment or be unexported (golint)
    • Line 31: warning: exported method JwtSignatory.ParseToken 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!


misspell96%

Misspell Finds commonly misspelled English words