Preparing report...

Report for github.com/ketchuphq/ketchup

A+    Excellent!    Found 61 issues across 113 files

Tweet

gofmt95%

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.


golint49%

Golint is a linter for Go source code.

    • ketchup/db/bolt/users.go
    • Line 12: warning: exported const USER_BUCKET should have comment or be unexported (golint)
    • Line 14: warning: exported method Module.GetUser should have comment or be unexported (golint)
    • Line 23: warning: exported method Module.GetUserByEmail should have comment or be unexported (golint)
    • Line 47: warning: exported method Module.GetUserByToken should have comment or be unexported (golint)
    • Line 71: warning: exported method Module.UpdateUser should have comment or be unexported (golint)
    • Line 89: warning: exported method Module.ListUsers should have comment or be unexported (golint)
    • ketchup/server/backup/module.go
    • Line 19: warning: exported type BackupConfig should have comment or be unexported (golint)
    • Line 25: warning: exported type Module should have comment or be unexported (golint)
    • Line 33: warning: exported method Module.Init should have comment or be unexported (golint)
    • Line 69: warning: exported method Module.WriteBackup should have comment or be unexported (golint)
    • ketchup/server/api/user.go
    • Line 16: warning: exported method Module.GetUser should have comment or be unexported (golint)
    • Line 35: warning: exported method Module.GetTLS should have comment or be unexported (golint)
    • Line 66: warning: exported method Module.EnableTLS should have comment or be unexported (golint)
    • Line 98: warning: exported method Module.Logout should have comment or be unexported (golint)
    • ketchup/db/module.go
    • Line 10: warning: exported type Module should have comment or be unexported (golint)
    • Line 14: warning: exported method Module.Init should have comment or be unexported (golint)
    • Line 25: warning: exported method Module.Register should have comment or be unexported (golint)
    • ketchup/db/sort.go
    • Line 9: warning: exported function SortPagesByUpdatedAt should have comment or be unexported (golint)
    • Line 20: warning: exported function SortRoutesByPath should have comment or be unexported (golint)
    • ketchup/main.go
    • Line 20: warning: exported type App should have comment or be unexported (golint)
    • Line 31: warning: exported method App.Init should have comment or be unexported (golint)
    • ketchup/plugins/pkg/clone.go
    • Line 45: warning: comment on exported function CloneToDir should be of the form "CloneToDir ..." (golint)
    • Line 83: warning: comment on exported function FetchDir should be of the form "FetchDir ..." (golint)
    • ketchup/server/content/templates/defaultstore/theme.go
    • Line 5: warning: exported type Theme should have comment or be unexported (golint)
    • Line 8: warning: exported method Theme.Ref should have comment or be unexported (golint)
    • Line 12: warning: exported method Theme.Proto should have comment or be unexported (golint)
    • Line 16: warning: exported method Theme.GetTemplate should have comment or be unexported (golint)
    • Line 20: warning: exported method Theme.GetAsset should have comment or be unexported (golint)
    • ketchup/db/interfaces.go
    • Line 9: warning: exported type AddressableProto should have comment or be unexported (golint)
    • Line 14: warning: exported type TimestampedProto should have comment or be unexported (golint)
    • ketchup/server/api/files.go
    • Line 16: warning: exported method Module.GetFile should have comment or be unexported (golint)
    • Line 36: warning: exported method Module.DeleteFile should have comment or be unexported (golint)
    • Line 44: warning: exported method Module.ListFiles should have comment or be unexported (golint)
    • Line 59: warning: exported method Module.UploadFile should have comment or be unexported (golint)
    • ketchup/server/content/templates/defaultstore/defaultstore.go
    • Line 58: warning: exported type DefaultStore should have comment or be unexported (golint)
    • Line 60: warning: exported method DefaultStore.List should have comment or be unexported (golint)
    • Line 64: warning: exported method DefaultStore.Add should have comment or be unexported (golint)
    • Line 68: warning: exported method DefaultStore.AddPackage should have comment or be unexported (golint)
    • Line 72: warning: exported method DefaultStore.Get should have comment or be unexported (golint)
    • Line 79: warning: exported method DefaultStore.GetAsset should have comment or be unexported (golint)
    • ketchup/db/bolt/data.go
    • Line 11: warning: exported const DATA_BUCKET should have comment or be unexported (golint)
    • Line 29: warning: exported method Module.UpdateData should have comment or be unexported (golint)
    • Line 35: warning: exported method Module.UpdateDataBatch should have comment or be unexported (golint)
    • ketchup/server/tls/module.go
    • Line 37: warning: exported type Module should have comment or be unexported (golint)
    • Line 50: warning: exported method Module.Init should have comment or be unexported (golint)
    • Line 167: warning: exported method Module.ObtainCert should have comment or be unexported (golint)
    • Line 182: warning: exported type LetsEncryptError should have comment or be unexported (golint)
    • ketchup/server/files/disk/diskstore.go
    • Line 13: warning: exported const KiloByte should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported type DiskStore should have comment or be unexported (golint)
    • Line 22: warning: exported function NewDiskStore should have comment or be unexported (golint)
    • Line 55: warning: exported method DiskStore.Get should have comment or be unexported (golint)
    • Line 67: warning: exported method DiskStore.Upload should have comment or be unexported (golint)
    • Line 87: warning: exported method DiskStore.Delete should have comment or be unexported (golint)
    • ketchup/server/tls/user.go
    • Line 13: warning: exported type Registration should have comment or be unexported (golint)
    • Line 22: warning: exported method Registration.Init should have comment or be unexported (golint)
    • Line 28: warning: exported method Registration.GetEmail should have comment or be unexported (golint)
    • Line 32: warning: exported method Registration.GetPrivateKey should have comment or be unexported (golint)
    • Line 36: warning: exported method Registration.GetRegistration should have comment or be unexported (golint)
    • ketchup/util/testutil/memlogger/memlogger.go
    • Line 11: warning: exported type MemoryLogger should have comment or be unexported (golint)
    • Line 17: warning: exported method MemoryLogger.Reset should have comment or be unexported (golint)
    • Line 23: warning: exported method MemoryLogger.Count should have comment or be unexported (golint)
    • Line 27: warning: exported method MemoryLogger.Info should have comment or be unexported (golint)
    • Line 31: warning: exported method MemoryLogger.Infof should have comment or be unexported (golint)
    • Line 35: warning: exported method MemoryLogger.Warning should have comment or be unexported (golint)
    • Line 39: warning: exported method MemoryLogger.Warningf should have comment or be unexported (golint)
    • Line 47: warning: exported method MemoryLogger.Errorf should have comment or be unexported (golint)
    • ketchup/server/api/themes.go
    • Line 14: warning: exported method Module.ListThemes should have comment or be unexported (golint)
    • Line 22: warning: exported method Module.GetTheme should have comment or be unexported (golint)
    • Line 42: warning: exported method Module.GetTemplate should have comment or be unexported (golint)
    • Line 61: warning: exported method Module.ThemeRegistry should have comment or be unexported (golint)
    • Line 96: warning: exported method Module.CheckThemeForUpdate should have comment or be unexported (golint)
    • Line 109: warning: exported method Module.UpdateTheme should have comment or be unexported (golint)
    • ketchup/server/content/templates/dummystore/theme.go
    • Line 5: warning: exported type Theme should have comment or be unexported (golint)
    • Line 10: warning: exported method Theme.Ref should have comment or be unexported (golint)
    • Line 17: warning: exported method Theme.Proto should have comment or be unexported (golint)
    • Line 21: warning: exported method Theme.GetTemplate should have comment or be unexported (golint)
    • Line 25: warning: exported method Theme.GetAsset should have comment or be unexported (golint)
    • ketchup/server/files/actions.go
    • Line 17: warning: exported method Module.Upload should have comment or be unexported (golint)
    • Line 58: warning: comment on exported method Module.Delete should be of the form "Delete ..." (golint)
    • ketchup/server/content/context/page.go
    • Line 50: warning: exported method PageContext.Theme should have comment or be unexported (golint)
    • Line 54: warning: exported method PageContext.Template should have comment or be unexported (golint)
    • Line 75: warning: exported type SortablePages should have comment or be unexported (golint)
    • Line 77: warning: exported method SortablePages.ByPublishedAt should have comment or be unexported (golint)
    • Line 84: warning: exported method SortablePages.Reverse should have comment or be unexported (golint)
    • ketchup/db/dummy/dummy.go
    • Line 14: warning: exported type DummyDB should have comment or be unexported (golint)
    • Line 24: warning: exported function New should have comment or be unexported (golint)
    • Line 34: warning: exported method DummyDB.GetUser should have comment or be unexported (golint)
    • Line 38: warning: exported method DummyDB.GetUserByEmail should have comment or be unexported (golint)
    • Line 47: warning: exported method DummyDB.GetUserByToken should have comment or be unexported (golint)
    • Line 56: warning: exported method DummyDB.UpdateUser should have comment or be unexported (golint)
    • Line 62: warning: exported method DummyDB.ListUsers should have comment or be unexported (golint)
    • Line 70: warning: exported method DummyDB.GetPage should have comment or be unexported (golint)
    • Line 74: warning: exported method DummyDB.UpdatePage should have comment or be unexported (golint)
    • Line 83: warning: exported method DummyDB.DeletePage should have comment or be unexported (golint)
    • Line 88: warning: exported method DummyDB.ListPages should have comment or be unexported (golint)
    • Line 99: warning: exported method DummyDB.GetRoute should have comment or be unexported (golint)
    • Line 103: warning: exported method DummyDB.UpdateRoute should have comment or be unexported (golint)
    • Line 112: warning: exported method DummyDB.DeleteRoute should have comment or be unexported (golint)
    • Line 117: warning: exported method DummyDB.ListRoutes should have comment or be unexported (golint)
    • Line 132: warning: exported method DummyDB.Debug should have comment or be unexported (golint)
    • Line 136: warning: exported method DummyDB.GetData should have comment or be unexported (golint)
    • Line 140: warning: exported method DummyDB.UpdateData should have comment or be unexported (golint)
    • Line 145: warning: exported method DummyDB.UpdateDataBatch should have comment or be unexported (golint)
    • Line 152: warning: exported method DummyDB.DeleteData should have comment or be unexported (golint)
    • Line 157: warning: exported method DummyDB.ListData should have comment or be unexported (golint)
    • Line 168: warning: exported method DummyDB.GetFile should have comment or be unexported (golint)
    • Line 172: warning: exported method DummyDB.GetFileByName should have comment or be unexported (golint)
    • Line 181: warning: exported method DummyDB.UpdateFile should have comment or be unexported (golint)
    • Line 186: warning: exported method DummyDB.DeleteFile should have comment or be unexported (golint)
    • Line 191: warning: exported method DummyDB.ListFiles should have comment or be unexported (golint)
    • ketchup/server/config/config.go
    • Line 15: warning: exported type Config should have comment or be unexported (golint)
    • Line 19: warning: exported type Module should have comment or be unexported (golint)
    • Line 24: warning: exported method Module.Init should have comment or be unexported (golint)
    • Line 57: warning: exported method Module.DataPath should have comment or be unexported (golint)
    • ketchup/server/api/module.go
    • Line 49: warning: exported type Module should have comment or be unexported (golint)
    • Line 74: warning: exported method Module.Init should have comment or be unexported (golint)
    • Line 153: warning: exported method Module.Debug should have comment or be unexported (golint)
    • ketchup/server/tls/store.go
    • Line 82: warning: exported method Module.GetAllRegisteredDomains should have comment or be unexported (golint)
    • Line 123: warning: exported method Module.SaveRegistration should have comment or be unexported (golint)
    • ketchup/server/content/templates/filestore/theme.go
    • Line 5: warning: exported type Theme should have comment or be unexported (golint)
    • Line 11: warning: exported method Theme.Ref should have comment or be unexported (golint)
    • Line 18: warning: exported method Theme.Proto should have comment or be unexported (golint)
    • Line 22: warning: exported method Theme.GetTemplate should have comment or be unexported (golint)
    • Line 26: warning: exported method Theme.GetAsset should have comment or be unexported (golint)
    • ketchup/server/content/templates/dummystore/dummy.go
    • Line 9: warning: exported type DummyTemplateStore should have comment or be unexported (golint)
    • Line 14: warning: exported function New should have comment or be unexported (golint)
    • Line 21: warning: exported method DummyTemplateStore.List should have comment or be unexported (golint)
    • Line 29: warning: exported method DummyTemplateStore.Add should have comment or be unexported (golint)
    • Line 34: warning: exported method DummyTemplateStore.AddPackage should have comment or be unexported (golint)
    • Line 38: warning: exported method DummyTemplateStore.Get should have comment or be unexported (golint)
    • Line 46: warning: exported method DummyTemplateStore.GetAsset should have comment or be unexported (golint)
    • ketchup/server/content/content/render.go
    • Line 13: warning: exported type ErrUnknownContentType should have comment or be unexported (golint)
    • Line 21: warning: exported function RenderContent should have comment or be unexported (golint)
    • Line 36: warning: exported function RenderData should have comment or be unexported (golint)
    • ketchup/db/fixtures/fixtures.go
    • Line 8: warning: exported var Pages should have comment or be unexported (golint)
    • Line 64: warning: exported var Routes should have comment or be unexported (golint)
    • Line 87: warning: exported var JSON should have comment or be unexported (golint)
    • ketchup/server/router/module.go
    • Line 18: warning: exported type Module should have comment or be unexported (golint)
    • Line 23: warning: exported method Module.Init should have comment or be unexported (golint)
    • Line 39: warning: exported method Module.InternalError should have comment or be unexported (golint)
    • Line 62: warning: exported method Module.NotFound should have comment or be unexported (golint)
    • ketchup/server/files/module.go
    • Line 18: warning: exported const FileURLPrefix should have comment or be unexported (golint)
    • Line 20: warning: exported type Store should have comment or be unexported (golint)
    • Line 26: warning: exported type Module should have comment or be unexported (golint)
    • Line 35: warning: exported method Module.Init should have comment or be unexported (golint)
    • Line 46: warning: exported method Module.URLForFile should have comment or be unexported (golint)
    • ketchup/admin/module.go
    • Line 23: warning: exported type Module should have comment or be unexported (golint)
    • Line 28: warning: exported method Module.Init should have comment or be unexported (golint)
    • ketchup/server/api/data.go
    • Line 57: warning: exported method Module.ListData should have comment or be unexported (golint)
    • Line 71: warning: exported method Module.GetData should have comment or be unexported (golint)
    • Line 86: warning: exported method Module.DeleteData should have comment or be unexported (golint)
    • Line 94: warning: exported method Module.UpdateData should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!