Preparing report...

Report for github.com/subspacecommunity/subspace

(v1.5.0)

A    Great!    Found 6 issues across 7 files

Tweet

gofmt85%

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!


gocyclo57%

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.

    • cmd/subspace/handlers.go
    • Line 379: warning: cyclomatic complexity 21 of function profileAddHandler() is high (> 15) (gocyclo)
    • Line 160: warning: cyclomatic complexity 17 of function forgotHandler() is high (> 15) (gocyclo)

golint42%

Golint is a linter for Go source code.

    • cmd/subspace/utils.go
    • Line 17: warning: exported function RandomString should have comment or be unexported (golint)
    • Line 25: warning: exported function Overwrite should have comment or be unexported (golint)
    • cmd/subspace/web.go
    • Line 25: warning: exported var SessionCookieName should have comment or be unexported (golint)
    • Line 29: warning: exported type Session should have comment or be unexported (golint)
    • Line 36: warning: exported type Web should have comment or be unexported (golint)
    • Line 69: warning: exported function Error should have comment or be unexported (golint)
    • Line 77: warning: exported method Web.HTML should have comment or be unexported (golint)
    • Line 143: warning: exported method Web.Redirect should have comment or be unexported (golint)
    • Line 148: warning: exported function WebHandler should have comment or be unexported (golint)
    • Line 250: warning: exported function Log should have comment or be unexported (golint)
    • Line 284: warning: exported function ValidateSession should have comment or be unexported (golint)
    • Line 302: warning: exported method Web.SignoutSession should have comment or be unexported (golint)
    • Line 327: warning: exported method Web.SigninSession should have comment or be unexported (golint)
    • cmd/subspace/config.go
    • Line 25: warning: exported var ErrProfileNotFound should have comment or be unexported (golint)
    • Line 30: warning: exported type User should have comment or be unexported (golint)
    • Line 39: warning: exported type Profile should have comment or be unexported (golint)
    • Line 50: warning: exported method Profile.NameClean should have comment or be unexported (golint)
    • Line 54: warning: exported method Profile.WireGuardConfigPath should have comment or be unexported (golint)
    • Line 58: warning: exported method Profile.WireGuardConfigName should have comment or be unexported (golint)
    • Line 62: warning: exported type Info should have comment or be unexported (golint)
    • Line 85: warning: exported type Config should have comment or be unexported (golint)
    • Line 97: warning: exported function NewConfig should have comment or be unexported (golint)
    • Line 123: warning: exported method Config.Lock should have comment or be unexported (golint)
    • Line 127: warning: exported method Config.Unlock should have comment or be unexported (golint)
    • Line 131: warning: exported method Config.RLock should have comment or be unexported (golint)
    • Line 135: warning: exported method Config.RUnlock should have comment or be unexported (golint)
    • Line 183: warning: exported method Config.DeleteProfile should have comment or be unexported (golint)
    • Line 198: warning: exported method Config.UpdateProfile should have comment or be unexported (golint)
    • Line 211: warning: exported method Config.AddProfile should have comment or be unexported (golint)
    • Line 235: warning: exported method Config.FindProfile should have comment or be unexported (golint)
    • Line 254: warning: exported method Config.ListProfilesByUser should have comment or be unexported (golint)
    • Line 274: warning: exported method Config.ListProfiles should have comment or be unexported (golint)
    • Line 289: warning: exported method Config.FindInfo should have comment or be unexported (golint)
    • Line 295: warning: exported method Config.UpdateInfo should have comment or be unexported (golint)
    • Line 304: warning: exported method Config.DeleteUser should have comment or be unexported (golint)
    • Line 323: warning: exported method Config.UpdateUser should have comment or be unexported (golint)
    • Line 336: warning: exported method Config.AddUser should have comment or be unexported (golint)
    • Line 354: warning: exported method Config.FindUserByEmail should have comment or be unexported (golint)
    • Line 378: warning: exported method Config.FindUser should have comment or be unexported (golint)
    • Line 402: warning: exported method Config.ListUsers should have comment or be unexported (golint)
    • Line 430: warning: exported method Config.ResetTotp should have comment or be unexported (golint)
    • Line 443: warning: exported method Config.GenerateTOTP should have comment or be unexported (golint)
    • cmd/subspace/mailer.go
    • Line 20: warning: exported type Mailer should have comment or be unexported (golint)
    • Line 22: warning: exported function NewMailer should have comment or be unexported (golint)
    • Line 26: warning: exported method Mailer.Forgot should have comment or be unexported (golint)
    • Line 87: warning: exported method Mailer.Render 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!