Preparing report...

Report for github.com/thoas/picfit

A+    Excellent!    Found 32 issues across 55 files

Tweet

gofmt96%

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!


gocyclo94%

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.

    • picfit/parameters.go
    • Line 171: warning: cyclomatic complexity 18 of function (Processor).newBackendOptionsFromParameters() is high (> 15) (gocyclo)
    • Line 39: warning: cyclomatic complexity 17 of function (*Processor).NewParameters() is high (> 15) (gocyclo)

golint41%

Golint is a linter for Go source code.

    • picfit/processor.go
    • Line 26: warning: exported type Processor should have comment or be unexported (golint)
    • Line 356: warning: exported method Processor.GetKey should have comment or be unexported (golint)
    • Line 360: warning: exported method Processor.KeyExists should have comment or be unexported (golint)
    • Line 364: warning: exported method Processor.FileExists should have comment or be unexported (golint)
    • Line 368: warning: exported method Processor.OpenFile should have comment or be unexported (golint)
    • picfit/image/mimetype.go
    • Line 17: warning: exported const MimetypeDetectorTypeFastimage should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported function GetMimetypeDetector should have comment or be unexported (golint)
    • Line 32: warning: exported type MimetypeDetectorFunc should have comment or be unexported (golint)
    • Line 34: warning: comment on exported function MimetypeDetectorExtension should be of the form "MimetypeDetectorExtension ..." (golint)
    • Line 39: warning: comment on exported function MimetypeDetectorFastimage should be of the form "MimetypeDetectorFastimage ..." (golint)
    • Line 50: warning: comment on exported function MimetypeDetectorSniff should be of the form "MimetypeDetectorSniff ..." (golint)
    • picfit/failure/http.go
    • Line 11: warning: exported type Handler should have comment or be unexported (golint)
    • Line 13: warning: exported function Handle should have comment or be unexported (golint)
    • picfit/middleware/auth.go
    • Line 29: warning: exported function RestrictIPAddresses should have comment or be unexported (golint)
    • Line 43: warning: exported function RestrictSizes should have comment or be unexported (golint)
    • picfit/image/file.go
    • Line 11: warning: exported type ImageFile should have comment or be unexported (golint)
    • Line 20: warning: exported method ImageFile.Content should have comment or be unexported (golint)
    • Line 28: warning: exported method ImageFile.URL should have comment or be unexported (golint)
    • Line 32: warning: exported method ImageFile.Path should have comment or be unexported (golint)
    • Line 36: warning: exported method ImageFile.Save should have comment or be unexported (golint)
    • Line 40: warning: exported method ImageFile.Format should have comment or be unexported (golint)
    • Line 44: warning: exported method ImageFile.ContentType should have comment or be unexported (golint)
    • Line 51: warning: exported method ImageFile.Filename should have comment or be unexported (golint)
    • Line 55: warning: exported method ImageFile.FilenameExt should have comment or be unexported (golint)
    • picfit/engine/engine.go
    • Line 15: warning: exported type Engine should have comment or be unexported (golint)
    • Line 89: warning: exported method Engine.Transform should have comment or be unexported (golint)
    • picfit/engine/operations.go
    • Line 5: warning: exported type Operation should have comment or be unexported (golint)
    • Line 12: warning: exported const Fit should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported var Operations should have comment or be unexported (golint)
    • Line 31: warning: exported type EngineOperation should have comment or be unexported (golint)
    • picfit/store/config.go
    • Line 14: warning: exported type RedisConfig should have comment or be unexported (golint)
    • Line 22: warning: exported type RedisClusterConfig should have comment or be unexported (golint)
    • Line 28: warning: exported method RedisConfig.Addr should have comment or be unexported (golint)
    • Line 32: warning: exported type CacheConfig should have comment or be unexported (golint)
    • picfit/parameters.go
    • Line 33: warning: exported type Parameters should have comment or be unexported (golint)
    • Line 38: warning: comment on exported method Processor.NewParameters should be of the form "NewParameters ..." (golint)
    • Line 128: warning: exported method Processor.NewEngineOperationFromQuery should have comment or be unexported (golint)
    • picfit/storage/dummy.go
    • Line 9: warning: exported type DummyStorage should have comment or be unexported (golint)
    • Line 12: warning: exported method DummyStorage.Save should have comment or be unexported (golint)
    • Line 16: warning: exported method DummyStorage.Path should have comment or be unexported (golint)
    • Line 20: warning: exported method DummyStorage.Exists should have comment or be unexported (golint)
    • Line 24: warning: exported method DummyStorage.Delete should have comment or be unexported (golint)
    • Line 28: warning: exported method DummyStorage.Open should have comment or be unexported (golint)
    • Line 32: warning: exported method DummyStorage.ModifiedTime should have comment or be unexported (golint)
    • Line 36: warning: exported method DummyStorage.Size should have comment or be unexported (golint)
    • Line 40: warning: exported method DummyStorage.URL should have comment or be unexported (golint)
    • Line 44: warning: exported method DummyStorage.HasBaseURL should have comment or be unexported (golint)
    • Line 48: warning: exported method DummyStorage.IsNotExist should have comment or be unexported (golint)
    • picfit/constants/constants.go
    • Line 26: warning: exported const BottomLeft should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported var StickPositions should have comment or be unexported (golint)
    • picfit/engine/config/config.go
    • Line 3: warning: exported type Backends should have comment or be unexported (golint)
    • Line 8: warning: exported type Backend should have comment or be unexported (golint)
    • Line 13: warning: exported type CommandBackend should have comment or be unexported (golint)
    • picfit/logger/config.go
    • Line 4: warning: exported const DevelopmentLevel should have comment (or a comment on this block) or be unexported (golint)
    • picfit/util/tools.go
    • Line 4: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • picfit/logger/logger.go
    • Line 10: warning: exported type Field should have comment or be unexported (golint)
    • Line 11: warning: exported type ObjectEncoder should have comment or be unexported (golint)
    • Line 13: warning: exported type Logger should have comment or be unexported (golint)
    • Line 22: warning: exported function New should have comment or be unexported (golint)
    • Line 33: warning: exported function String should have comment or be unexported (golint)
    • Line 37: warning: exported function Duration should have comment or be unexported (golint)
    • Line 41: warning: exported function Float64 should have comment or be unexported (golint)
    • Line 45: warning: exported function Time should have comment or be unexported (golint)
    • Line 49: warning: exported function Int should have comment or be unexported (golint)
    • Line 53: warning: exported function Array should have comment or be unexported (golint)
    • Line 57: warning: exported function Int64 should have comment or be unexported (golint)
    • Line 61: warning: exported function Error should have comment or be unexported (golint)
    • Line 65: warning: exported function Object should have comment or be unexported (golint)
    • Line 69: warning: exported function NewProductionLogger should have comment or be unexported (golint)
    • Line 73: warning: exported function NewDevelopmentLogger should have comment or be unexported (golint)
    • Line 77: warning: exported function NewNopLogger should have comment or be unexported (golint)
    • picfit/server/http.go
    • Line 25: warning: exported type HTTPServer should have comment or be unexported (golint)
    • Line 31: warning: exported function NewHTTPServer should have comment or be unexported (golint)
    • Line 44: warning: exported method HTTPServer.Init should have comment or be unexported (golint)
    • picfit/engine/backend/backend.go
    • Line 12: warning: error var MethodNotImplementedError should have name of the form ErrFoo (golint)
    • Line 33: warning: comment on exported type Backend should be of the form "Backend ..." (with optional leading article) (golint)
    • picfit/hash/hash.go
    • Line 10: warning: exported function Tokey should have comment or be unexported (golint)
    • Line 17: warning: exported function Serialize should have comment or be unexported (golint)
    • Line 23: warning: exported function Shard should have comment or be unexported (golint)
    • picfit/server/server.go
    • Line 10: warning: exported type Server should have comment or be unexported (golint)
    • Line 14: warning: exported function New should have comment or be unexported (golint)
    • Line 29: warning: exported method Server.Run should have comment or be unexported (golint)
    • picfit/util/util.go
    • Line 8: warning: exported function MapInterfaceToMapString should have comment or be unexported (golint)
    • Line 18: warning: exported function SortMapString should have comment or be unexported (golint)
    • Line 22: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • picfit/engine/backend/goimage.go
    • Line 41: warning: exported type GoImage should have comment or be unexported (golint)
    • Line 46: warning: exported method GoImage.Resize should have comment or be unexported (golint)
    • Line 50: warning: exported method GoImage.Thumbnail should have comment or be unexported (golint)
    • Line 54: warning: exported method GoImage.Rotate should have comment or be unexported (golint)
    • Line 70: warning: exported method GoImage.Flip should have comment or be unexported (golint)
    • Line 86: warning: exported method GoImage.Fit should have comment or be unexported (golint)
    • picfit/tests/utils.go
    • Line 19: warning: exported type Dimension should have comment or be unexported (golint)
    • Line 24: warning: exported type TestRequest should have comment or be unexported (golint)
    • Line 32: warning: exported function RandString should have comment or be unexported (golint)
    • Line 40: warning: exported function NewDummyProcessor should have comment or be unexported (golint)
    • Line 46: warning: exported type Option should have comment or be unexported (golint)
    • Line 48: warning: comment on exported type Options should be of the form "Options ..." (with optional leading article) (golint)
    • Line 69: warning: exported type Suite should have comment or be unexported (golint)
    • Line 74: warning: exported type FuncTest should have comment or be unexported (golint)
    • Line 76: warning: exported function Run should have comment or be unexported (golint)
    • Line 107: warning: exported function NewImageServer 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!