Preparing report...

Report for github.com/h2non/imaginary

A    Great!    Found 15 issues across 29 files

Tweet

gofmt86%

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!


golint62%

Golint is a linter for Go source code.

    • imaginary/middleware.go
    • Line 18: warning: exported function Middleware should have comment or be unexported (golint)
    • Line 40: warning: exported function ImageMiddleware should have comment or be unexported (golint)
    • imaginary/server.go
    • Line 17: warning: exported type ServerOptions should have comment or be unexported (golint)
    • Line 63: warning: exported function Server should have comment or be unexported (golint)
    • imaginary/source.go
    • Line 8: warning: exported type ImageSourceType should have comment or be unexported (golint)
    • Line 9: warning: exported type ImageSourceFactoryFunction should have comment or be unexported (golint)
    • Line 11: warning: exported type SourceConfig should have comment or be unexported (golint)
    • Line 24: warning: exported type ImageSource should have comment or be unexported (golint)
    • Line 29: warning: exported function RegisterSource should have comment or be unexported (golint)
    • Line 33: warning: exported function LoadSources should have comment or be unexported (golint)
    • Line 47: warning: exported function MatchSource should have comment or be unexported (golint)
    • imaginary/source_body.go
    • Line 12: warning: exported const ImageSourceTypeBody should have comment or be unexported (golint)
    • Line 14: warning: exported type BodyImageSource should have comment or be unexported (golint)
    • Line 18: warning: exported function NewBodyImageSource should have comment or be unexported (golint)
    • Line 22: warning: exported method BodyImageSource.Matches should have comment or be unexported (golint)
    • Line 26: warning: exported method BodyImageSource.GetImage should have comment or be unexported (golint)
    • imaginary/source_fs.go
    • Line 10: warning: exported const ImageSourceTypeFileSystem should have comment or be unexported (golint)
    • Line 12: warning: exported type FileSystemImageSource should have comment or be unexported (golint)
    • Line 16: warning: exported function NewFileSystemImageSource should have comment or be unexported (golint)
    • Line 20: warning: exported method FileSystemImageSource.Matches should have comment or be unexported (golint)
    • Line 24: warning: exported method FileSystemImageSource.GetImage should have comment or be unexported (golint)
    • imaginary/error.go
    • Line 13: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • Line 29: warning: exported type Error should have comment or be unexported (golint)
    • Line 34: warning: exported method Error.JSON should have comment or be unexported (golint)
    • Line 43: warning: exported method Error.HTTPCode should have comment or be unexported (golint)
    • Line 50: warning: exported function NewError should have comment or be unexported (golint)
    • Line 105: warning: exported function ErrorReply should have comment or be unexported (golint)
    • imaginary/health.go
    • Line 11: warning: exported const MB should have comment or be unexported (golint)
    • Line 13: warning: exported type HealthStats should have comment or be unexported (golint)
    • Line 26: warning: exported function GetHealthStats should have comment or be unexported (golint)
    • Line 44: warning: exported function GetUptime should have comment or be unexported (golint)
    • imaginary/source_http.go
    • Line 12: warning: exported const ImageSourceTypeHTTP should have comment or be unexported (golint)
    • Line 13: warning: exported const URLQueryKey should have comment or be unexported (golint)
    • Line 15: warning: exported type HTTPImageSource should have comment or be unexported (golint)
    • Line 19: warning: exported function NewHTTPImageSource should have comment or be unexported (golint)
    • Line 23: warning: exported method HTTPImageSource.Matches should have comment or be unexported (golint)
    • Line 27: warning: exported method HTTPImageSource.GetImage should have comment or be unexported (golint)
    • imaginary/image.go
    • Line 63: warning: exported function Info should have comment or be unexported (golint)
    • Line 90: warning: exported function Resize should have comment or be unexported (golint)
    • Line 105: warning: exported function Fit should have comment or be unexported (golint)
    • Line 168: warning: exported function Enlarge should have comment or be unexported (golint)
    • Line 182: warning: exported function Extract should have comment or be unexported (golint)
    • Line 196: warning: exported function Crop should have comment or be unexported (golint)
    • Line 206: warning: exported function SmartCrop should have comment or be unexported (golint)
    • Line 217: warning: exported function Rotate should have comment or be unexported (golint)
    • Line 226: warning: exported function AutoRotate should have comment or be unexported (golint)
    • Line 251: warning: exported function Flip should have comment or be unexported (golint)
    • Line 257: warning: exported function Flop should have comment or be unexported (golint)
    • Line 263: warning: exported function Thumbnail should have comment or be unexported (golint)
    • Line 271: warning: exported function Zoom should have comment or be unexported (golint)
    • Line 297: warning: exported function Convert should have comment or be unexported (golint)
    • Line 309: warning: exported function Watermark should have comment or be unexported (golint)
    • Line 330: warning: exported function WatermarkImage should have comment or be unexported (golint)
    • Line 364: warning: exported function GaussianBlur should have comment or be unexported (golint)
    • Line 372: warning: exported function Pipeline should have comment or be unexported (golint)
    • Line 421: warning: exported function Process 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!