Preparing report...

Report for github.com/thomaso-mirodin/go-shorten

A+    Excellent!    Found 16 issues across 33 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!


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!


golint51%

Golint is a linter for Go source code.

    • go-shorten/storage/postgres.go
    • Line 10: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 14: warning: exported type Postgres should have comment or be unexported (golint)
    • Line 18: warning: exported function NewPostgres should have comment or be unexported (golint)
    • Line 46: warning: exported method Postgres.Load should have comment or be unexported (golint)
    • Line 168: warning: exported method Postgres.SaveName should have comment or be unexported (golint)
    • Line 180: warning: exported method Postgres.Search should have comment or be unexported (golint)
    • Line 227: warning: exported method Postgres.TopNForPeriod should have comment or be unexported (golint)
    • go-shorten/storage/filesystem.go
    • Line 12: warning: exported type Filesystem should have comment or be unexported (golint)
    • Line 17: warning: exported function NewFilesystem should have comment or be unexported (golint)
    • Line 33: warning: comment on exported function FlattenPath should be of the form "FlattenPath ..." (golint)
    • Line 38: warning: exported method Filesystem.SaveName should have comment or be unexported (golint)
    • Line 56: warning: exported method Filesystem.Load should have comment or be unexported (golint)
    • go-shorten/storage/inmem.go
    • Line 13: warning: exported type Inmem should have comment or be unexported (golint)
    • Line 35: warning: exported function NewInmem should have comment or be unexported (golint)
    • Line 45: warning: exported function NewInmemFromMap should have comment or be unexported (golint)
    • Line 57: warning: exported method Inmem.SaveName should have comment or be unexported (golint)
    • Line 72: warning: exported method Inmem.Load should have comment or be unexported (golint)
    • Line 93: warning: exported method Inmem.TopNForPeriod should have comment or be unexported (golint)
    • Line 108: warning: exported method Inmem.Search should have comment or be unexported (golint)
    • go-shorten/storage/multistorage/loader.go
    • Line 10: warning: comment on exported type Loader should be of the form "Loader ..." (with optional leading article) (golint)
    • Line 29: warning: exported var ErrUnexpectedMultipleAnswers should have comment or be unexported (golint)
    • go-shorten/handlers/handlers.go
    • Line 14: warning: exported function Healthcheck should have comment or be unexported (golint)
    • Line 29: warning: exported function GetShort should have comment or be unexported (golint)
    • Line 60: warning: exported function SetShort should have comment or be unexported (golint)
    • go-shorten/storage/s3.go
    • Line 20: warning: exported type S3 should have comment or be unexported (golint)
    • Line 28: warning: exported function NewS3 should have comment or be unexported (golint)
    • Line 118: warning: exported method S3.SaveName should have comment or be unexported (golint)
    • Line 130: warning: exported method S3.Load should have comment or be unexported (golint)
    • go-shorten/storage/regex.go
    • Line 14: warning: exported type Regex should have comment or be unexported (golint)
    • Line 18: warning: exported function NewRegexFromList should have comment or be unexported (golint)
    • Line 37: warning: exported method Regex.Load should have comment or be unexported (golint)
    • Line 49: warning: exported method Regex.SaveName should have comment or be unexported (golint)
    • go-shorten/storage/storage.go
    • Line 1: warning: package comment should be of the form "Package storage ..." (golint)
    • Line 11: warning: exported type Storage should have comment or be unexported (golint)
    • Line 16: warning: exported type NamedStorage should have comment or be unexported (golint)
    • Line 22: warning: exported type SearchableStorage should have comment or be unexported (golint)
    • Line 28: warning: exported type SearchResult should have comment or be unexported (golint)
    • Line 33: warning: exported type TopN should have comment or be unexported (golint)
    • Line 39: warning: exported type TopNResult should have comment or be unexported (golint)
    • Line 45: warning: exported var ErrURLEmpty 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!