Preparing report...

Report for github.com/keratin/authn-server

A    Great!    Found 128 issues across 214 files

Tweet

gofmt81%

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!


gocyclo99%

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.


golint52%

Golint is a linter for Go source code.

    • authn-server/app/tokens/sessions/session.go
    • Line 16: warning: exported type Claims should have comment or be unexported (golint)
    • Line 22: warning: exported method Claims.Sign should have comment or be unexported (golint)
    • Line 33: warning: exported function Parse should have comment or be unexported (golint)
    • Line 59: warning: exported function New should have comment or be unexported (golint)
    • authn-server/app/data/data.go
    • Line 18: warning: exported function NewDB should have comment or be unexported (golint)
    • Line 31: warning: exported function MigrateDB should have comment or be unexported (golint)
    • Line 64: warning: exported function IsUniquenessError should have comment or be unexported (golint)
    • authn-server/app/services/validations.go
    • Line 10: warning: exported var ErrMissing should have comment or be unexported (golint)
    • Line 11: warning: exported var ErrTaken should have comment or be unexported (golint)
    • Line 12: warning: exported var ErrFormatInvalid should have comment or be unexported (golint)
    • Line 13: warning: exported var ErrInsecure should have comment or be unexported (golint)
    • Line 14: warning: exported var ErrFailed should have comment or be unexported (golint)
    • Line 15: warning: exported var ErrLocked should have comment or be unexported (golint)
    • Line 16: warning: exported var ErrExpired should have comment or be unexported (golint)
    • Line 17: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • Line 18: warning: exported var ErrInvalidOrExpired should have comment or be unexported (golint)
    • Line 20: warning: exported type FieldError should have comment or be unexported (golint)
    • Line 33: warning: exported type FieldErrors should have comment or be unexported (golint)
    • Line 43: warning: exported function PasswordValidator should have comment or be unexported (golint)
    • Line 57: warning: exported function UsernameValidator should have comment or be unexported (golint)
    • authn-server/app/tokens/resets/password_reset.go
    • Line 16: warning: exported type Claims should have comment or be unexported (golint)
    • Line 22: warning: exported method Claims.Sign should have comment or be unexported (golint)
    • Line 33: warning: exported method Claims.LockExpired should have comment or be unexported (golint)
    • Line 40: warning: exported function Parse should have comment or be unexported (golint)
    • Line 67: warning: exported function New should have comment or be unexported (golint)
    • authn-server/server/sessions/util.go
    • Line 11: warning: exported function Get should have comment or be unexported (golint)
    • Line 19: warning: exported function GetAccountID should have comment or be unexported (golint)
    • Line 27: warning: exported function Set should have comment or be unexported (golint)
    • Line 42: warning: exported function GetRefreshToken should have comment or be unexported (golint)
    • authn-server/app/data/sqlite3/refresh_token_store.go
    • Line 17: warning: exported type RefreshTokenStore should have comment or be unexported (golint)
    • Line 22: warning: exported method RefreshTokenStore.Clean should have comment or be unexported (golint)
    • Line 34: warning: exported method RefreshTokenStore.Create should have comment or be unexported (golint)
    • Line 53: warning: exported method RefreshTokenStore.Find should have comment or be unexported (golint)
    • Line 70: warning: exported method RefreshTokenStore.Touch should have comment or be unexported (golint)
    • Line 80: warning: exported method RefreshTokenStore.FindAll should have comment or be unexported (golint)
    • Line 103: warning: exported method RefreshTokenStore.Revoke should have comment or be unexported (golint)
    • authn-server/server/handlers/envelope.go
    • Line 11: warning: exported type ServiceData should have comment or be unexported (golint)
    • Line 15: warning: exported type ServiceErrors should have comment or be unexported (golint)
    • Line 19: warning: exported type RequestError should have comment or be unexported (golint)
    • Line 23: warning: exported function WriteData should have comment or be unexported (golint)
    • Line 27: warning: exported function WriteErrors should have comment or be unexported (golint)
    • Line 47: warning: exported function WriteNotFound should have comment or be unexported (golint)
    • Line 51: warning: exported function WriteJSON should have comment or be unexported (golint)
    • authn-server/lib/parse/request.go
    • Line 16: warning: exported const UnsupportedMediaType should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type ErrorCode should have comment or be unexported (golint)
    • Line 22: warning: exported type Error should have comment or be unexported (golint)
    • authn-server/app/app.go
    • Line 17: warning: exported type App should have comment or be unexported (golint)
    • Line 31: warning: exported function NewApp should have comment or be unexported (golint)
    • authn-server/app/data/postgres/account_store.go
    • Line 11: warning: exported type AccountStore should have comment or be unexported (golint)
    • Line 15: warning: exported method AccountStore.Find should have comment or be unexported (golint)
    • Line 29: warning: exported method AccountStore.FindByUsername should have comment or be unexported (golint)
    • Line 40: warning: exported method AccountStore.FindByOauthAccount should have comment or be unexported (golint)
    • Line 51: warning: exported method AccountStore.Create should have comment or be unexported (golint)
    • Line 91: warning: exported method AccountStore.AddOauthAccount should have comment or be unexported (golint)
    • Line 108: warning: exported method AccountStore.GetOauthAccounts should have comment or be unexported (golint)
    • Line 114: warning: exported method AccountStore.Archive should have comment or be unexported (golint)
    • Line 129: warning: exported method AccountStore.Lock should have comment or be unexported (golint)
    • Line 134: warning: exported method AccountStore.Unlock should have comment or be unexported (golint)
    • Line 139: warning: exported method AccountStore.RequireNewPassword should have comment or be unexported (golint)
    • Line 144: warning: exported method AccountStore.SetPassword should have comment or be unexported (golint)
    • Line 157: warning: exported method AccountStore.UpdateUsername should have comment or be unexported (golint)
    • Line 162: warning: exported method AccountStore.SetLastLogin should have comment or be unexported (golint)
    • authn-server/app/data/sqlite3/blob_store.go
    • Line 16: warning: exported type BlobStore should have comment or be unexported (golint)
    • Line 22: warning: exported method BlobStore.Clean should have comment or be unexported (golint)
    • Line 45: warning: exported method BlobStore.WriteNX should have comment or be unexported (golint)
    • authn-server/app/data/encrypted_blob_store.go
    • Line 5: warning: exported type EncryptedBlobStore should have comment or be unexported (golint)
    • Line 10: warning: exported function NewEncryptedBlobStore should have comment or be unexported (golint)
    • Line 26: warning: exported method EncryptedBlobStore.WriteNX should have comment or be unexported (golint)
    • authn-server/server/test/asserts.go
    • Line 20: warning: exported function AssertData should have comment or be unexported (golint)
    • Line 28: warning: exported function AssertErrors should have comment or be unexported (golint)
    • Line 36: warning: exported function AssertSession should have comment or be unexported (golint)
    • Line 44: warning: exported function AssertIDTokenResponse should have comment or be unexported (golint)
    • Line 64: warning: exported function AssertRedirect should have comment or be unexported (golint)
    • authn-server/app/data/private/key.go
    • Line 13: warning: exported type Key should have comment or be unexported (golint)
    • Line 18: warning: comment on exported function NewKey should be of the form "NewKey ..." (golint)
    • Line 35: warning: comment on exported function GenerateKey should be of the form "GenerateKey ..." (golint)
    • authn-server/app/data/mock/blob_store.go
    • Line 6: warning: exported type BlobStore should have comment or be unexported (golint)
    • Line 15: warning: exported function NewBlobStore should have comment or be unexported (golint)
    • Line 32: warning: exported method BlobStore.WriteNX should have comment or be unexported (golint)
    • authn-server/app/data/sqlite3/account_store.go
    • Line 11: warning: exported type AccountStore should have comment or be unexported (golint)
    • Line 15: warning: exported method AccountStore.Find should have comment or be unexported (golint)
    • Line 29: warning: exported method AccountStore.FindByUsername should have comment or be unexported (golint)
    • Line 40: warning: exported method AccountStore.FindByOauthAccount should have comment or be unexported (golint)
    • Line 51: warning: exported method AccountStore.Create should have comment or be unexported (golint)
    • Line 79: warning: exported method AccountStore.AddOauthAccount should have comment or be unexported (golint)
    • Line 96: warning: exported method AccountStore.GetOauthAccounts should have comment or be unexported (golint)
    • Line 102: warning: exported method AccountStore.Archive should have comment or be unexported (golint)
    • Line 111: warning: exported method AccountStore.Lock should have comment or be unexported (golint)
    • Line 116: warning: exported method AccountStore.Unlock should have comment or be unexported (golint)
    • Line 121: warning: exported method AccountStore.RequireNewPassword should have comment or be unexported (golint)
    • Line 126: warning: exported method AccountStore.SetPassword should have comment or be unexported (golint)
    • Line 131: warning: exported method AccountStore.UpdateUsername should have comment or be unexported (golint)
    • Line 136: warning: exported method AccountStore.SetLastLogin should have comment or be unexported (golint)
    • authn-server/app/data/redis/refresh_token_store.go
    • Line 14: warning: exported type RefreshTokenStore should have comment or be unexported (golint)
    • Line 31: warning: exported method RefreshTokenStore.Find should have comment or be unexported (golint)
    • Line 45: warning: exported method RefreshTokenStore.Touch should have comment or be unexported (golint)
    • Line 59: warning: exported method RefreshTokenStore.FindAll should have comment or be unexported (golint)
    • Line 73: warning: exported method RefreshTokenStore.Create should have comment or be unexported (golint)
    • Line 96: warning: exported method RefreshTokenStore.Revoke should have comment or be unexported (golint)
    • authn-server/app/data/mysql/account_store.go
    • Line 11: warning: exported type AccountStore should have comment or be unexported (golint)
    • Line 15: warning: exported method AccountStore.Find should have comment or be unexported (golint)
    • Line 29: warning: exported method AccountStore.FindByUsername should have comment or be unexported (golint)
    • Line 40: warning: exported method AccountStore.FindByOauthAccount should have comment or be unexported (golint)
    • Line 51: warning: exported method AccountStore.Create should have comment or be unexported (golint)
    • Line 79: warning: exported method AccountStore.AddOauthAccount should have comment or be unexported (golint)
    • Line 96: warning: exported method AccountStore.GetOauthAccounts should have comment or be unexported (golint)
    • Line 102: warning: exported method AccountStore.Archive should have comment or be unexported (golint)
    • Line 111: warning: exported method AccountStore.Lock should have comment or be unexported (golint)
    • Line 116: warning: exported method AccountStore.Unlock should have comment or be unexported (golint)
    • Line 121: warning: exported method AccountStore.RequireNewPassword should have comment or be unexported (golint)
    • Line 126: warning: exported method AccountStore.SetPassword should have comment or be unexported (golint)
    • Line 131: warning: exported method AccountStore.UpdateUsername should have comment or be unexported (golint)
    • Line 136: warning: exported method AccountStore.SetLastLogin 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.


misspell99%

Misspell Finds commonly misspelled English words