Preparing report...

Report for github.com/staticbackendhq/core

A+    Excellent!    Found 31 issues across 47 files

Tweet

gofmt97%

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!


gocyclo95%

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.

    • core/account.go
    • Line 34: warning: cyclomatic complexity 24 of function (*accounts).create() is high (> 15) (gocyclo)

golint40%

Golint is a linter for Go source code.

    • core/storage/s3.go
    • Line 13: warning: exported type S3 should have comment or be unexported (golint)
    • Line 15: warning: exported method S3.Save should have comment or be unexported (golint)
    • Line 41: warning: exported method S3.Delete should have comment or be unexported (golint)
    • core/realtime/broker.go
    • Line 16: warning: exported type Validator should have comment or be unexported (golint)
    • Line 18: warning: exported type ConnectionData should have comment or be unexported (golint)
    • Line 23: warning: exported type Broker should have comment or be unexported (golint)
    • Line 36: warning: exported function NewBroker should have comment or be unexported (golint)
    • Line 102: warning: exported method Broker.Accept should have comment or be unexported (golint)
    • core/internal/account.go
    • Line 24: warning: exported method Auth.ReconstructToken should have comment or be unexported (golint)
    • Line 41: warning: exported type Account should have comment or be unexported (golint)
    • Line 46: warning: exported type Token should have comment or be unexported (golint)
    • Line 55: warning: exported type Login should have comment or be unexported (golint)
    • Line 60: warning: exported type Customer should have comment or be unexported (golint)
    • Line 70: warning: exported function EmailExists should have comment or be unexported (golint)
    • Line 78: warning: exported function FindToken should have comment or be unexported (golint)
    • Line 84: warning: exported function FindRootToken should have comment or be unexported (golint)
    • Line 95: warning: exported function GetRootForBase should have comment or be unexported (golint)
    • Line 104: warning: exported function FindTokenByEmail should have comment or be unexported (golint)
    • Line 110: warning: exported function FindAccount should have comment or be unexported (golint)
    • Line 117: warning: exported function CreateAccount should have comment or be unexported (golint)
    • Line 124: warning: exported function CreateBase should have comment or be unexported (golint)
    • Line 131: warning: exported function FindDatabase should have comment or be unexported (golint)
    • Line 137: warning: exported function DatabaseExists should have comment or be unexported (golint)
    • Line 145: warning: exported function ListDatabases should have comment or be unexported (golint)
    • core/function/management.go
    • Line 37: warning: exported function Add should have comment or be unexported (golint)
    • Line 56: warning: exported function Update should have comment or be unexported (golint)
    • Line 77: warning: exported function GetForExecution should have comment or be unexported (golint)
    • Line 96: warning: exported function GetByID should have comment or be unexported (golint)
    • Line 117: warning: exported function GetByName should have comment or be unexported (golint)
    • Line 133: warning: exported function List should have comment or be unexported (golint)
    • Line 158: warning: exported function ListByTrigger should have comment or be unexported (golint)
    • Line 184: warning: exported function Delete should have comment or be unexported (golint)
    • Line 195: warning: exported function Ran should have comment or be unexported (golint)
    • core/db/query.go
    • Line 9: warning: exported function ParseQuery should have comment or be unexported (golint)
    • core/email/ses.go
    • Line 14: warning: exported type AWSSES should have comment or be unexported (golint)
    • Line 16: warning: exported method AWSSES.Send should have comment or be unexported (golint)
    • core/internal/permission.go
    • Line 10: warning: exported type PermissionLevel should have comment or be unexported (golint)
    • Line 13: warning: exported const PermOwner should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported function GetPermission should have comment or be unexported (golint)
    • Line 44: warning: exported function WritePermission should have comment or be unexported (golint)
    • Line 56: warning: exported function ReadPermission should have comment or be unexported (golint)
    • Line 68: warning: exported function CanWrite should have comment or be unexported (golint)
    • Line 76: warning: exported function CanRead should have comment or be unexported (golint)
    • core/function/runtime.go
    • Line 18: warning: exported type ExecutionEnvironment should have comment or be unexported (golint)
    • Line 28: warning: exported type Result should have comment or be unexported (golint)
    • Line 33: warning: exported method ExecutionEnvironment.Execute should have comment or be unexported (golint)
    • core/email/dev.go
    • Line 8: warning: exported type Dev should have comment or be unexported (golint)
    • Line 10: warning: exported method Dev.Send should have comment or be unexported (golint)
    • core/internal/data.go
    • Line 10: warning: exported type BaseConfig should have comment or be unexported (golint)
    • Line 19: warning: comment on exported var HashSecret should be of the form "HashSecret ..." (golint)
    • Line 25: warning: exported const FieldID should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported const SystemID should have comment (or a comment on this block) or be unexported (golint)
    • Line 52: warning: exported type Command should have comment or be unexported (golint)
    • Line 61: warning: exported method Command.IsDBEvent should have comment or be unexported (golint)
    • core/middleware/auth.go
    • Line 18: warning: exported const RootRole should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported function RequireAuth should have comment or be unexported (golint)
    • Line 71: warning: context.Context should be the first parameter of a function (golint)
    • Line 71: warning: exported function ValidateAuthKey should have comment or be unexported (golint)
    • Line 125: warning: exported function RequireRoot should have comment or be unexported (golint)
    • Line 179: warning: exported function ValidateRootToken should have comment or be unexported (golint)
    • core/middleware/chain.go
    • Line 7: warning: exported type Middleware should have comment or be unexported (golint)
    • Line 9: warning: exported function Chain should have comment or be unexported (golint)
    • core/db.go
    • Line 20: warning: exported type Database should have comment or be unexported (golint)
    • core/cache/cache.go
    • Line 15: warning: exported type Cache should have comment or be unexported (golint)
    • Line 34: warning: exported method Cache.Get should have comment or be unexported (golint)
    • Line 38: warning: exported method Cache.Set should have comment or be unexported (golint)
    • Line 45: warning: exported method Cache.GetTyped should have comment or be unexported (golint)
    • Line 54: warning: exported method Cache.SetTyped should have comment or be unexported (golint)
    • Line 62: warning: exported method Cache.Inc should have comment or be unexported (golint)
    • Line 66: warning: exported method Cache.Dec should have comment or be unexported (golint)
    • Line 70: warning: exported method Cache.Subscribe should have comment or be unexported (golint)
    • Line 106: warning: exported method Cache.Publish should have comment or be unexported (golint)
    • Line 134: warning: exported method Cache.PublishDocument should have comment or be unexported (golint)
    • Line 166: warning: exported method Cache.HasPermission should have comment or be unexported (golint)
    • core/internal/form.go
    • Line 11: warning: exported function ListFormSubmissions should have comment or be unexported (golint)
    • Line 50: warning: exported function GetForms should have comment or be unexported (golint)
    • core/function/scheduler.go
    • Line 16: warning: exported type TaskScheduler should have comment or be unexported (golint)
    • Line 23: warning: exported const TaskTypeFunction should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported type Task should have comment or be unexported (golint)
    • Line 39: warning: exported type MetaMessage should have comment or be unexported (golint)
    • Line 44: warning: exported method TaskScheduler.Start should have comment or be unexported (golint)
    • core/db/base.go
    • Line 15: warning: exported type Base should have comment or be unexported (golint)
    • Line 19: warning: exported method Base.Add should have comment or be unexported (golint)
    • Line 42: warning: exported type PagedResult should have comment or be unexported (golint)
    • Line 49: warning: exported type ListParams should have comment or be unexported (golint)
    • Line 56: warning: exported method Base.List should have comment or be unexported (golint)
    • Line 131: warning: exported method Base.Query should have comment or be unexported (golint)
    • Line 211: warning: exported method Base.GetByID should have comment or be unexported (golint)
    • Line 247: warning: exported method Base.Update should have comment or be unexported (golint)
    • Line 301: warning: exported method Base.Delete should have comment or be unexported (golint)
    • Line 331: warning: exported method Base.ListCollections should have comment or be unexported (golint)
    • core/render.go
    • Line 60: warning: exported type Flash should have comment or be unexported (golint)
    • Line 65: warning: exported type ViewData should have comment or be unexported (golint)
    • core/internal/mailer.go
    • Line 4: warning: exported const MailProviderDev should have comment (or a comment on this block) or be unexported (golint)
    • core/middleware/context.go
    • Line 10: warning: exported type ContextKey should have comment or be unexported (golint)
    • Line 13: warning: exported const ContextAuth should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported function Extract should have comment or be unexported (golint)
    • core/storage/local.go
    • Line 11: warning: exported type Local should have comment or be unexported (golint)
    • Line 13: warning: exported method Local.Save should have comment or be unexported (golint)
    • Line 33: warning: exported method Local.Delete should have comment or be unexported (golint)
    • core/server.go
    • Line 31: warning: exported const AppEnvDev should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: exported var AppEnv should have comment or be unexported (golint)
    • core/ui.go
    • Line 308: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • core/url.go
    • Line 8: warning: exported function ShiftPath should have comment or be unexported (golint)
    • core/internal/storer.go
    • Line 6: warning: exported const StorageProviderLocal should have comment (or a comment on this block) or be unexported (golint)
    • Line 10: warning: exported type UploadFileData should have comment or be unexported (golint)
    • Line 15: warning: exported type Storer 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.


misspell91%

Misspell Finds commonly misspelled English words