Preparing report...

Report for github.com/sosedoff/wg-registry

A+    Excellent!    Found 11 issues across 25 files

Tweet

gofmt96%

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!


gocyclo96%

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.


golint60%

Golint is a linter for Go source code.

    • wg-registry/store/db_store.go
    • Line 12: warning: exported type DbStore should have comment or be unexported (golint)
    • Line 16: warning: exported function NewDatabaseStore should have comment or be unexported (golint)
    • Line 24: warning: exported method DbStore.AutoMigrate should have comment or be unexported (golint)
    • Line 32: warning: exported method DbStore.UserCount should have comment or be unexported (golint)
    • Line 38: warning: exported method DbStore.FindUserByID should have comment or be unexported (golint)
    • Line 48: warning: exported method DbStore.FindUserByEmail should have comment or be unexported (golint)
    • Line 58: warning: exported method DbStore.FindServer should have comment or be unexported (golint)
    • Line 68: warning: exported method DbStore.SaveServer should have comment or be unexported (golint)
    • Line 75: warning: exported method DbStore.CreateServer should have comment or be unexported (golint)
    • Line 82: warning: exported method DbStore.FindDevice should have comment or be unexported (golint)
    • Line 88: warning: exported method DbStore.FindUserDevice should have comment or be unexported (golint)
    • Line 100: warning: exported method DbStore.AllDevices should have comment or be unexported (golint)
    • Line 106: warning: exported method DbStore.AllUsers should have comment or be unexported (golint)
    • Line 112: warning: exported method DbStore.GetDevicesByUser should have comment or be unexported (golint)
    • Line 118: warning: exported method DbStore.CreateUser should have comment or be unexported (golint)
    • Line 122: warning: exported method DbStore.CreateDevice should have comment or be unexported (golint)
    • Line 141: warning: exported method DbStore.DeleteUserDevice should have comment or be unexported (golint)
    • Line 145: warning: exported method DbStore.AllocatedIPV4 should have comment or be unexported (golint)
    • wg-registry/store/file_store.go
    • Line 16: warning: exported type FileData should have comment or be unexported (golint)
    • Line 26: warning: exported type FileStore should have comment or be unexported (golint)
    • Line 32: warning: exported function NewFileStore should have comment or be unexported (golint)
    • Line 80: 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 100: warning: exported method FileStore.AutoMigrate should have comment or be unexported (golint)
    • Line 121: warning: exported method FileStore.UserCount should have comment or be unexported (golint)
    • Line 125: warning: exported method FileStore.FindUserByID should have comment or be unexported (golint)
    • Line 139: warning: exported method FileStore.FindUserByEmail should have comment or be unexported (golint)
    • Line 151: warning: exported method FileStore.FindServer should have comment or be unexported (golint)
    • Line 162: warning: exported method FileStore.SaveServer should have comment or be unexported (golint)
    • Line 173: warning: exported method FileStore.CreateServer should have comment or be unexported (golint)
    • Line 189: warning: exported method FileStore.FindDevice should have comment or be unexported (golint)
    • Line 204: warning: exported method FileStore.FindUserDevice should have comment or be unexported (golint)
    • Line 219: warning: exported method FileStore.AllDevices should have comment or be unexported (golint)
    • Line 226: warning: exported method FileStore.AllUsers should have comment or be unexported (golint)
    • Line 233: warning: exported method FileStore.GetDevicesByUser should have comment or be unexported (golint)
    • Line 249: warning: exported method FileStore.CreateUser should have comment or be unexported (golint)
    • Line 264: warning: exported method FileStore.CreateDevice should have comment or be unexported (golint)
    • Line 293: warning: exported method FileStore.DeleteUserDevice should have comment or be unexported (golint)
    • Line 307: warning: exported method FileStore.AllocatedIPV4 should have comment or be unexported (golint)
    • wg-registry/model/device.go
    • Line 30: warning: exported method Device.SetPeerInfo should have comment or be unexported (golint)
    • Line 34: warning: exported method Device.GetPeerInfo should have comment or be unexported (golint)
    • wg-registry/service/auth.go
    • Line 15: warning: exported type GoogleAuth should have comment or be unexported (golint)
    • Line 27: warning: exported type AuthConfig should have comment or be unexported (golint)
    • wg-registry/service/autocert.go
    • Line 11: warning: exported type LetsEncryptConfig should have comment or be unexported (golint)
    • Line 19: warning: exported function NewCertManager should have comment or be unexported (golint)
    • wg-registry/cli/cli.go
    • Line 11: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 30: warning: exported function Run 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!