Preparing report...

Report for github.com/hexbee-net/sketch-canvas

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


gocyclo92%

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.


golint30%

Golint is a linter for Go source code.

    • sketch-canvas/pkg/server/server.go
    • Line 28: warning: exported const RequestIDContextKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported const DefaultPageLimit should have comment or be unexported (golint)
    • Line 41: warning: exported type Server should have comment or be unexported (golint)
    • Line 49: warning: exported function New should have comment or be unexported (golint)
    • Line 89: warning: exported method Server.Start should have comment or be unexported (golint)
    • sketch-canvas/pkg/canvas/error.go
    • Line 3: warning: exported type Error should have comment or be unexported (golint)
    • Line 10: warning: exported const PointOutOfBound should have comment (or a comment on this block) or be unexported (golint)
    • sketch-canvas/pkg/canvas/canvas.go
    • Line 11: warning: exported type Canvas should have comment or be unexported (golint)
    • Line 18: warning: exported method Canvas.MarshalBinary should have comment or be unexported (golint)
    • Line 45: warning: exported method Canvas.DrawRect should have comment or be unexported (golint)
    • Line 118: warning: exported method Canvas.FloodFill should have comment or be unexported (golint)
    • sketch-canvas/pkg/datastore/datastore.go
    • Line 9: warning: exported type StoreError should have comment or be unexported (golint)
    • Line 15: warning: exported const NotFound should have comment or be unexported (golint)
    • Line 17: warning: comment on exported type DataStore should be of the form "DataStore ..." (with optional leading article) (golint)
    • sketch-canvas/pkg/datastore/redis_datastore.go
    • Line 15: warning: exported type RedisOptions should have comment or be unexported (golint)
    • Line 19: warning: exported type RedisDataStore should have comment or be unexported (golint)
    • Line 24: warning: context.Context should be the first parameter of a function (golint)
    • Line 48: warning: exported method RedisDataStore.GetSize should have comment or be unexported (golint)
    • Line 57: warning: context.Context should be the first parameter of a function (golint)
    • Line 57: warning: exported method RedisDataStore.GetDocList should have comment or be unexported (golint)
    • Line 68: warning: context.Context should be the first parameter of a function (golint)
    • Line 68: warning: exported method RedisDataStore.SetDocument should have comment or be unexported (golint)
    • Line 76: warning: context.Context should be the first parameter of a function (golint)
    • Line 76: warning: exported method RedisDataStore.GetDocument should have comment or be unexported (golint)
    • Line 99: warning: context.Context should be the first parameter of a function (golint)
    • Line 99: warning: exported method RedisDataStore.DeleteDocument should have comment or be unexported (golint)
    • sketch-canvas/pkg/keygen/keygen.go
    • Line 10: warning: comment on exported type KeyGen should be of the form "KeyGen ..." (with optional leading article) (golint)
    • Line 15: warning: exported type SnowflakeKeyGen should have comment or be unexported (golint)
    • Line 19: warning: exported function New should have comment or be unexported (golint)
    • Line 30: warning: exported method SnowflakeKeyGen.Generate 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!