Preparing report...

Report for github.com/gillesdemey/npm-registry

A    Great!    Found 19 issues across 26 files

Tweet

gofmt92%

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!


gocyclo100%

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.

No problems detected. Good job!


golint26%

Golint is a linter for Go source code.

    • npm-registry/auth/htpasswd.go
    • Line 10: warning: exported function NewHtpasswdFile should have comment or be unexported (golint)
    • Line 14: warning: exported type HtpasswdFile should have comment or be unexported (golint)
    • Line 20: warning: exported method HtpasswdFile.Reload should have comment or be unexported (golint)
    • Line 25: warning: don't use underscores in Go names; var csv_reader should be csvReader (golint)
    • Line 41: warning: exported method HtpasswdFile.ReloadIfNeeded should have comment or be unexported (golint)
    • Line 52: warning: exported method HtpasswdFile.GetPasswordForUser should have comment or be unexported (golint)
    • Line 58: warning: exported method HtpasswdFile.CompareUsernameAndPassword should have comment or be unexported (golint)
    • npm-registry/routes/auth_test.go
    • Line 58: warning: should not use basic type untyped string as key in context.WithValue (golint)
    • Line 59: warning: should not use basic type untyped string as key in context.WithValue (golint)
    • Line 73: warning: should not use basic type untyped string as key in context.WithValue (golint)
    • npm-registry/server/server.go
    • Line 15: warning: exported function New should have comment or be unexported (golint)
    • Line 23: warning: should not use basic type untyped string as key in context.WithValue (golint)
    • Line 24: warning: should not use basic type untyped string as key in context.WithValue (golint)
    • Line 25: warning: should not use basic type untyped string as key in context.WithValue (golint)
    • npm-registry/routes/routes.go
    • Line 11: warning: exported function Root should have comment or be unexported (golint)
    • Line 16: warning: exported function Noop should have comment or be unexported (golint)
    • Line 20: warning: exported function StorageFromContext should have comment or be unexported (golint)
    • Line 24: warning: exported function RendererFromContext should have comment or be unexported (golint)
    • npm-registry/model/user.go
    • Line 3: warning: exported type User should have comment or be unexported (golint)
    • Line 7: warning: exported type Login should have comment or be unexported (golint)
    • npm-registry/packages/packages.go
    • Line 10: warning: exported function RewriteTarballLocation should have comment or be unexported (golint)
    • Line 24: warning: exported function RewriteScopedTarballs should have comment or be unexported (golint)
    • Line 38: warning: exported function SplitPackageName should have comment or be unexported (golint)
    • Line 47: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • npm-registry/storage/storage.go
    • Line 5: warning: exported type TarballStoreRetriever should have comment or be unexported (golint)
    • Line 10: warning: exported type MetaDataStoreRetriever should have comment or be unexported (golint)
    • Line 15: warning: exported type UserStoreRetriever should have comment or be unexported (golint)
    • Line 19: warning: exported type TokenRetriever should have comment or be unexported (golint)
    • Line 23: warning: exported type Engine should have comment or be unexported (golint)
    • npm-registry/routes/auth.go
    • Line 12: warning: comment on exported function Login should be of the form "Login ..." (golint)
    • Line 46: warning: comment on exported function Whoami should be of the form "Whoami ..." (golint)
    • npm-registry/routes/middleware.go
    • Line 12: warning: exported function ValidateToken should have comment or be unexported (golint)
    • Line 29: warning: should not use basic type untyped string as key in context.WithValue (golint)
    • Line 30: warning: should not use basic type untyped string as key in context.WithValue (golint)
    • npm-registry/routes/packages.go
    • Line 125: warning: comment on exported function PublishPackage should be of the form "PublishPackage ..." (golint)
    • Line 149: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • npm-registry/mocks/storage.go
    • Line 8: warning: exported type MockedStorage should have comment or be unexported (golint)
    • Line 12: warning: exported method MockedStorage.StoreTarball should have comment or be unexported (golint)
    • Line 16: warning: exported method MockedStorage.RetrieveTarball should have comment or be unexported (golint)
    • Line 21: warning: exported method MockedStorage.StoreMetadata should have comment or be unexported (golint)
    • Line 25: warning: exported method MockedStorage.RetrieveMetadata should have comment or be unexported (golint)
    • Line 30: warning: exported method MockedStorage.StoreUser should have comment or be unexported (golint)
    • Line 34: warning: exported method MockedStorage.StoreUserToken should have comment or be unexported (golint)
    • Line 39: warning: exported method MockedStorage.RetrieveUsernameFromToken should have comment or be unexported (golint)
    • npm-registry/auth/auth.go
    • Line 3: warning: exported type AuthProvider should have comment or be unexported (golint)
    • Line 7: warning: exported type HtpasswdProvider should have comment or be unexported (golint)
    • Line 11: warning: exported function NewHtpasswdProvider should have comment or be unexported (golint)
    • npm-registry/storage-engines/fs.go
    • Line 18: warning: exported type FSStorage should have comment or be unexported (golint)
    • Line 22: warning: exported function NewFSStorage should have comment or be unexported (golint)
    • Line 33: warning: exported method FSStorage.StoreTarball should have comment or be unexported (golint)
    • Line 65: warning: exported method FSStorage.RetrieveTarball should have comment or be unexported (golint)
    • Line 85: warning: exported method FSStorage.RetrieveUsernameFromToken should have comment or be unexported (golint)
    • Line 100: warning: exported method FSStorage.StoreUserToken should have comment or be unexported (golint)
    • Line 121: warning: exported method FSStorage.RetrieveMetadata should have comment or be unexported (golint)
    • Line 141: warning: exported method FSStorage.StoreMetadata 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!