Preparing report...

Report for github.com/prologic/magic-link-auth

A    Great!    Found 5 issues across 5 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!


golint0%

Golint is a linter for Go source code.

    • magic-link-auth/auth.go
    • Line 32: warning: exported type AuthClaims should have comment or be unexported (golint)
    • Line 43: warning: exported function CreateAuthToken should have comment or be unexported (golint)
    • Line 59: warning: exported function HasValidAuthToken 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)
    • Line 74: warning: exported function GenerateHashString should have comment or be unexported (golint)
    • Line 84: warning: exported function SendAuthEmail should have comment or be unexported (golint)
    • magic-link-auth/email.go
    • Line 13: warning: exported var SMTP_SERVER should have comment or be unexported (golint)
    • Line 16: warning: exported type Sender should have comment or be unexported (golint)
    • Line 21: warning: exported function NewSender should have comment or be unexported (golint)
    • Line 28: warning: exported method Sender.SendMail should have comment or be unexported (golint)
    • magic-link-auth/handlers.go
    • Line 123: warning: exported method MagicLinkAuth.LoginHandler should have comment or be unexported (golint)
    • Line 138: warning: exported method MagicLinkAuth.AuthHandler should have comment or be unexported (golint)
    • Line 175: warning: exported method MagicLinkAuth.UnauthenticatedHandler should have comment or be unexported (golint)
    • Line 205: warning: exported method MagicLinkAuth.IsAuthenticated should have comment or be unexported (golint)
    • Line 218: warning: exported method MagicLinkAuth.ProtectedHandler should have comment or be unexported (golint)
    • Line 231: warning: exported method MagicLinkAuth.SaveMagicString should have comment or be unexported (golint)
    • Line 248: warning: exported method MagicLinkAuth.MagicLinkHandler should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign80%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!