Preparing report...

Report for github.com/cozy/cozy-apps-registry

A+    Excellent!    Found 13 issues across 57 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!


golint82%

Golint is a linter for Go source code.

    • cozy-apps-registry/registry/finders.go
    • Line 42: warning: exported const Concatenated should have comment (or a comment on this block) or be unexported (golint)
    • Line 76: warning: exported function FindApp should have comment or be unexported (golint)
    • Line 96: warning: exported type Attachment should have comment or be unexported (golint)
    • Line 103: warning: exported function FindAppAttachment should have comment or be unexported (golint)
    • Line 116: warning: exported function FindVersionAttachment should have comment or be unexported (golint)
    • Line 243: warning: exported function FindPendingVersion should have comment or be unexported (golint)
    • Line 248: warning: exported function FindPublishedVersion should have comment or be unexported (golint)
    • Line 253: warning: exported function FindVersion should have comment or be unexported (golint)
    • Line 436: warning: exported function FindLatestVersion should have comment or be unexported (golint)
    • Line 442: warning: exported function FindLatestVersionWithOverride should have comment or be unexported (golint)
    • Line 459: warning: exported function FindLatestVersionCacheMiss should have comment or be unexported (golint)
    • Line 534: warning: exported function FindAppVersionsCacheMiss should have comment or be unexported (golint)
    • Line 608: warning: exported type AppsListOptions should have comment or be unexported (golint)
    • Line 617: warning: exported function GetPendingVersions should have comment or be unexported (golint)
    • Line 671: warning: exported function GetAppsList should have comment or be unexported (golint)
    • Line 846: warning: exported function GetVersionsListFromCache should have comment or be unexported (golint)
    • Line 867: warning: exported function GetVersionsLatestFromCache should have comment or be unexported (golint)
    • Line 888: warning: exported function GetMaintainanceApps should have comment or be unexported (golint)
    • cozy-apps-registry/registry/registry.go
    • Line 46: warning: exported var ErrAppAlreadyExists should have comment or be unexported (golint)
    • Line 63: warning: exported type AppOptions should have comment or be unexported (golint)
    • Line 72: warning: exported type App should have comment or be unexported (golint)
    • Line 93: warning: exported type Locales should have comment or be unexported (golint)
    • Line 95: warning: exported type MaintenanceOptions should have comment or be unexported (golint)
    • Line 102: warning: exported type MaintenanceMessage should have comment or be unexported (golint)
    • Line 107: warning: exported type AppVersions should have comment or be unexported (golint)
    • Line 114: warning: exported type Developer should have comment or be unexported (golint)
    • Line 119: warning: exported type Platform should have comment or be unexported (golint)
    • Line 124: warning: exported type VersionOptions should have comment or be unexported (golint)
    • Line 136: warning: exported type Version should have comment or be unexported (golint)
    • Line 153: warning: exported type Partnership should have comment or be unexported (golint)
    • Line 189: warning: exported function IsValidApp should have comment or be unexported (golint)
    • Line 212: warning: exported function IsValidVersion should have comment or be unexported (golint)
    • Line 232: warning: exported method AppVersions.GetAll should have comment or be unexported (golint)
    • Line 240: warning: exported function CreateApp should have comment or be unexported (golint)
    • Line 276: warning: exported function ModifyApp should have comment or be unexported (golint)
    • Line 294: warning: exported function ActivateMaintenanceApp should have comment or be unexported (golint)
    • Line 308: warning: exported function DeactivateMaintenanceApp should have comment or be unexported (golint)
    • Line 319: warning: exported function DownloadVersion should have comment or be unexported (golint)
    • Line 386: warning: exported function CreatePendingVersion should have comment or be unexported (golint)
    • Line 390: warning: exported function CreateReleaseVersion should have comment or be unexported (golint)
    • Line 409: warning: exported method Version.Clone should have comment or be unexported (golint)
    • Line 418: warning: exported function ApprovePendingVersion should have comment or be unexported (golint)
    • Line 600: warning: comment on exported method Tarball.CheckSlug should be of the form "CheckSlug ..." (golint)
    • Line 1025: warning: comment on exported method Version.Delete should be of the form "Delete ..." (golint)
    • Line 1026: warning: receiver name v should be consistent with previous receiver name version for Version (golint)
    • Line 1048: warning: receiver name v should be consistent with previous receiver name version for Version (golint)
    • cozy-apps-registry/registry/virtual.go
    • Line 42: warning: exported function DeleteOverwrittenVersion should have comment or be unexported (golint)
    • Line 259: warning: exported function RegenerateOverwrittenTarballs should have comment or be unexported (golint)
    • Line 433: warning: exported function FindOverwrittenVersion should have comment or be unexported (golint)
    • Line 444: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 451: warning: exported function FindOverwrittenTarball should have comment or be unexported (golint)
    • cozy-apps-registry/errshttp/errors.go
    • Line 7: warning: exported type Error should have comment or be unexported (golint)
    • Line 12: warning: exported function NewError should have comment or be unexported (golint)
    • Line 23: warning: exported method Error.StatusCode should have comment or be unexported (golint)
    • cozy-apps-registry/base/config.go
    • Line 62: warning: exported method VirtualSpace.Init should have comment or be unexported (golint)
    • Line 74: warning: exported method VirtualSpace.VersionDB should have comment or be unexported (golint)
    • Line 79: warning: exported method VirtualSpace.OverrideDb should have comment or be unexported (golint)
    • cozy-apps-registry/auth/auth.go
    • Line 32: warning: exported var ErrEditorNotFound should have comment or be unexported (golint)
    • Line 42: warning: exported type EditorRegistry should have comment or be unexported (golint)
    • Line 46: warning: exported type Vault should have comment or be unexported (golint)
    • Line 54: warning: exported type Editor should have comment or be unexported (golint)
    • Line 63: warning: exported function NewEditorRegistry should have comment or be unexported (golint)
    • Line 67: warning: exported function CheckEditorName should have comment or be unexported (golint)
    • Line 74: warning: exported function VerifyTokenAuthentication should have comment or be unexported (golint)
    • Line 153: warning: exported method EditorRegistry.CreateEditorWithoutPublicKey should have comment or be unexported (golint)
    • Line 169: warning: exported method EditorRegistry.RevokeMasterTokens should have comment or be unexported (golint)
    • Line 174: warning: exported method EditorRegistry.RevokeEditorTokens should have comment or be unexported (golint)
    • Line 179: warning: exported function DecryptMasterSecret should have comment or be unexported (golint)
    • Line 222: warning: exported function IsSecretClear should have comment or be unexported (golint)
    • Line 226: warning: exported function EncryptMasterSecret should have comment or be unexported (golint)
    • Line 264: warning: exported function GenerateMasterSecret should have comment or be unexported (golint)
    • cozy-apps-registry/auth/editor.go
    • Line 35: warning: exported function NewEditorForTest should have comment or be unexported (golint)
    • Line 39: warning: exported method Editor.MarshalJSON should have comment or be unexported (golint)
    • Line 48: warning: exported method Editor.Name should have comment or be unexported (golint)
    • Line 52: warning: exported method Editor.AutoPublication should have comment or be unexported (golint)
    • Line 56: warning: exported method Editor.IsComplete should have comment or be unexported (golint)
    • Line 60: warning: exported method Editor.GenerateMasterToken should have comment or be unexported (golint)
    • Line 72: warning: exported method Editor.VerifyMasterToken should have comment or be unexported (golint)
    • Line 85: warning: exported method Editor.GenerateEditorToken should have comment or be unexported (golint)
    • Line 105: warning: exported method Editor.VerifyEditorToken should have comment or be unexported (golint)

gocyclo89%

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.


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!