Preparing report...

Report for github.com/hanakoa/alpaca

C    Needs some work    Found 32 issues across 38 files

Tweet

gofmt31%

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!


gocyclo94%

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.


golint21%

Golint is a linter for Go source code.

    • alpaca/services/auth/services/email_address.go
    • Line 25: warning: comment on exported const DefaultPageSize should be of the form "DefaultPageSize ..." (golint)
    • Line 27: warning: exported const MaxPageSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported type EmailAddressService should have comment or be unexported (golint)
    • Line 36: warning: exported function NewEmailAddressService should have comment or be unexported (golint)
    • Line 52: warning: comment on exported method EmailAddressService.GetEmailAddresses should be of the form "GetEmailAddresses ..." (golint)
    • Line 79: warning: exported method EmailAddressService.GetEmailAddress should have comment or be unexported (golint)
    • Line 102: warning: comment on exported method EmailAddressService.CreateEmailAddress should be of the form "CreateEmailAddress ..." (golint)
    • Line 184: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 191: warning: exported method EmailAddressService.UpdateEmailAddress should have comment or be unexported (golint)
    • Line 240: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 245: warning: comment on exported method EmailAddressService.DeleteEmailAddress should be of the form "DeleteEmailAddress ..." (golint)
    • Line 302: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • alpaca/services/auth/grpc/grpc_server.go
    • Line 17: warning: exported type GrpcServer should have comment or be unexported (golint)
    • Line 23: warning: exported method GrpcServer.ResetPassword should have comment or be unexported (golint)
    • Line 26: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 38: warning: exported method GrpcServer.GetAccount should have comment or be unexported (golint)
    • Line 43: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 49: warning: exported method GrpcServer.Run should have comment or be unexported (golint)
    • alpaca/services/auth/models/email_address.go
    • Line 31: warning: exported method EmailAddress.GetEmailAddressByEmailAddress should have comment or be unexported (golint)
    • Line 39: warning: exported method EmailAddress.GetEmailAddress should have comment or be unexported (golint)
    • Line 47: warning: exported method EmailAddress.GetDeletedEmailAddress should have comment or be unexported (golint)
    • Line 64: warning: exported method EmailAddress.DeleteEmailAddress should have comment or be unexported (golint)
    • Line 69: warning: exported method EmailAddress.CreateEmailAddress should have comment or be unexported (golint)
    • Line 78: warning: exported function GetEmailAddresses should have comment or be unexported (golint)
    • Line 110: warning: exported method EmailAddress.IsConfirmed should have comment or be unexported (golint)
    • Line 126: warning: exported method EmailAddress.Exists should have comment or be unexported (golint)
    • Line 134: warning: exported method EmailAddress.Count should have comment or be unexported (golint)
    • Line 141: warning: exported function GetEmailAddressesForAccount should have comment or be unexported (golint)
    • Line 170: warning: exported method EmailAddress.GetConfirmedEmailAddress should have comment or be unexported (golint)
    • Line 179: warning: exported method EmailAddress.MaskValue should have comment or be unexported (golint)
    • alpaca/services/auth/models/person.go
    • Line 12: warning: exported type Account should have comment or be unexported (golint)
    • Line 27: warning: exported method Account.GetAccountByUsername should have comment or be unexported (golint)
    • Line 38: warning: exported function GetAccountByEmailAddress should have comment or be unexported (golint)
    • Line 51: warning: exported function GetAccountByPhoneNumber should have comment or be unexported (golint)
    • Line 64: warning: exported method Account.GetDeletedAccount should have comment or be unexported (golint)
    • Line 76: warning: exported method Account.GetAccount should have comment or be unexported (golint)
    • Line 87: warning: exported method Account.UpdateAccount should have comment or be unexported (golint)
    • Line 97: warning: exported method Account.DeleteAccount should have comment or be unexported (golint)
    • Line 105: warning: exported method Account.CreateAccount should have comment or be unexported (golint)
    • Line 118: warning: exported function GetAccounts should have comment or be unexported (golint)
    • Line 153: warning: exported method Account.Exists should have comment or be unexported (golint)
    • Line 161: warning: exported method Account.Count should have comment or be unexported (golint)
    • Line 168: warning: exported method Account.UpdateCurrentPassword should have comment or be unexported (golint)
    • alpaca/services/password-reset/services/reset.go
    • Line 18: warning: exported type PasswordResetSvc should have comment or be unexported (golint)
    • Line 24: warning: exported type PasswordResetRequest should have comment or be unexported (golint)
    • Line 30: warning: exported method PasswordResetSvc.ResetPassword should have comment or be unexported (golint)
    • Line 69: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • alpaca/services/mfa/grpc/grpc_client.go
    • Line 12: warning: exported type MFAClient should have comment or be unexported (golint)
    • Line 14: warning: exported function NewMFAClient should have comment or be unexported (golint)
    • Line 19: warning: exported function Send2FACode should have comment or be unexported (golint)
    • alpaca/services/auth/models/password.go
    • Line 84: warning: exported method Password.GetPasswordForAccountID should have comment or be unexported (golint)
    • Line 94: warning: exported method Password.CreatePassword should have comment or be unexported (golint)
    • Line 111: warning: exported method Password.UpdatePassword should have comment or be unexported (golint)
    • Line 122: warning: exported function MatchesHash should have comment or be unexported (golint)
    • Line 127: warning: exported function GenerateHash should have comment or be unexported (golint)
    • alpaca/services/auth/services/person.go
    • Line 26: warning: exported const MinUsernameLength should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported type AccountService should have comment or be unexported (golint)
    • Line 36: warning: exported type CreateAccountRequest should have comment or be unexported (golint)
    • Line 41: warning: exported type LogSender should have comment or be unexported (golint)
    • Line 44: warning: exported method LogSender.Send should have comment or be unexported (golint)
    • Line 48: warning: exported function NewAccountService should have comment or be unexported (golint)
    • Line 58: warning: comment on exported method AccountService.GetAccounts should be of the form "GetAccounts ..." (golint)
    • Line 86: warning: exported method AccountService.GetAccount should have comment or be unexported (golint)
    • Line 110: warning: comment on exported method AccountService.CreateAccount should be of the form "CreateAccount ..." (golint)
    • Line 204: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 211: warning: exported method AccountService.UpdateAccount should have comment or be unexported (golint)
    • Line 262: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 269: warning: exported method AccountService.DeleteAccount should have comment or be unexported (golint)
    • alpaca/services/auth/services/token.go
    • Line 23: warning: exported type LoginRequest should have comment or be unexported (golint)
    • Line 29: warning: exported type TokenService should have comment or be unexported (golint)
    • Line 37: warning: exported type CookieConfiguration should have comment or be unexported (golint)
    • Line 153: warning: comment on exported type AlpacaClaims should be of the form "AlpacaClaims ..." (with optional leading article) (golint)
    • alpaca/services/auth/models/phone_number.go
    • Line 8: warning: exported type PhoneNumber should have comment or be unexported (golint)
    • Line 14: warning: exported method PhoneNumber.GetPhoneNumberByPhoneNumber should have comment or be unexported (golint)
    • Line 22: warning: exported method PhoneNumber.MaskValue should have comment or be unexported (golint)
    • Line 26: warning: exported function GetPhoneNumbersForAccount should have comment or be unexported (golint)
    • alpaca/services/password-reset/models/email_address.go
    • Line 9: warning: exported type EmailAddress should have comment or be unexported (golint)
    • Line 15: warning: exported method EmailAddress.GetConfirmedEmailAddress should have comment or be unexported (golint)
    • Line 41: warning: exported method EmailAddress.MaskValue should have comment or be unexported (golint)
    • Line 46: warning: exported function GetEmailAddressesForAccount should have comment or be unexported (golint)
    • alpaca/services/mfa/grpc/grpc_server.go
    • Line 19: warning: exported type GrpcServer should have comment or be unexported (golint)
    • Line 39: warning: exported method GrpcServer.Send2FACode should have comment or be unexported (golint)
    • Line 43: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 56: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 70: warning: exported method GrpcServer.Run should have comment or be unexported (golint)
    • alpaca/services/auth/services/password.go
    • Line 20: warning: exported type PasswordService should have comment or be unexported (golint)
    • Line 26: warning: exported method PasswordService.UpdatePasswordHelper should have comment or be unexported (golint)
    • Line 74: warning: exported method PasswordService.UpdatePassword should have comment or be unexported (golint)
    • alpaca/services/password-reset/models/phone_number.go
    • Line 8: warning: exported type PhoneNumber should have comment or be unexported (golint)
    • Line 14: warning: exported method PhoneNumber.GetPhoneNumberByPhoneNumber should have comment or be unexported (golint)
    • Line 22: warning: exported method PhoneNumber.MaskValue should have comment or be unexported (golint)
    • Line 26: warning: exported function GetPhoneNumbersForAccount should have comment or be unexported (golint)
    • alpaca/services/auth/grpc/grpc_client.go
    • Line 11: warning: exported type AuthClient should have comment or be unexported (golint)
    • Line 12: warning: exported type PassClient should have comment or be unexported (golint)
    • Line 14: warning: exported function NewPassClient should have comment or be unexported (golint)
    • Line 19: warning: exported function GetAccountIDForEmailAddress should have comment or be unexported (golint)
    • Line 23: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 28: warning: exported function ResetPassword should have comment or be unexported (golint)
    • alpaca/services/password-reset/services/options.go
    • Line 18: warning: exported type CodeOptionsRequest should have comment or be unexported (golint)
    • Line 30: warning: exported method CodeOptionsResponse.NumOptions should have comment or be unexported (golint)
    • Line 41: warning: exported method PasswordResetSvc.SendCodeOptions should have comment or be unexported (golint)
    • Line 114: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 119: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 125: warning: exported function GetAccountIdForAccount 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!