Preparing report...

Report for github.com/grokify/gosaic

A+    Excellent!    Found 92 issues across 122 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!


gocyclo95%

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.

    • gosaic/controller/macro_quad.go
    • Line 87: warning: cyclomatic complexity 25 of function macroQuadBuildPartials() is high (> 15) (gocyclo)
    • Line 412: warning: cyclomatic complexity 20 of function macroQuadFixArgs() is high (> 15) (gocyclo)

golint27%

Golint is a linter for Go source code.

    • gosaic/model/cover_partial.go
    • Line 5: warning: exported type CoverPartial should have comment or be unexported (golint)
    • Line 15: warning: exported method CoverPartial.Rectangle should have comment or be unexported (golint)
    • Line 19: warning: exported method CoverPartial.Pt should have comment or be unexported (golint)
    • Line 23: warning: exported method CoverPartial.Width should have comment or be unexported (golint)
    • Line 27: warning: exported method CoverPartial.Height should have comment or be unexported (golint)
    • Line 31: warning: exported method CoverPartial.Area should have comment or be unexported (golint)
    • gosaic/model/macro.go
    • Line 3: warning: exported type Macro should have comment or be unexported (golint)
    • Line 16: warning: exported method Macro.GetPath should have comment or be unexported (golint)
    • Line 20: warning: exported method Macro.GetMd5sum should have comment or be unexported (golint)
    • Line 24: warning: exported method Macro.GetWidth should have comment or be unexported (golint)
    • Line 28: warning: exported method Macro.GetHeight should have comment or be unexported (golint)
    • Line 32: warning: exported method Macro.GetOrientation should have comment or be unexported (golint)
    • Line 36: warning: exported method Macro.SetPath should have comment or be unexported (golint)
    • Line 40: warning: exported method Macro.SetMd5sum should have comment or be unexported (golint)
    • Line 44: warning: exported method Macro.SetWidth should have comment or be unexported (golint)
    • Line 48: warning: exported method Macro.SetHeight should have comment or be unexported (golint)
    • Line 52: warning: exported method Macro.SetOrientation should have comment or be unexported (golint)
    • gosaic/service/sqlite3/mosaic_service.go
    • Line 19: warning: exported function NewMosaicService should have comment or be unexported (golint)
    • Line 81: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 97: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gosaic/util/exif.go
    • Line 15: warning: exported function ExiftoolPath should have comment or be unexported (golint)
    • Line 48: warning: comment on exported function ExifTags should be of the form "ExifTags ..." (golint)
    • gosaic/model/macro_partial.go
    • Line 3: warning: exported type MacroPartial should have comment or be unexported (golint)
    • Line 14: warning: exported method MacroPartial.GetData should have comment or be unexported (golint)
    • Line 18: warning: exported method MacroPartial.GetPixels should have comment or be unexported (golint)
    • Line 22: warning: exported method MacroPartial.SetData should have comment or be unexported (golint)
    • Line 26: warning: exported method MacroPartial.SetPixels should have comment or be unexported (golint)
    • Line 30: warning: exported method MacroPartial.EncodePixels should have comment or be unexported (golint)
    • Line 34: warning: exported method MacroPartial.DecodeData should have comment or be unexported (golint)
    • gosaic/model/gidx.go
    • Line 5: warning: exported type Gidx should have comment or be unexported (golint)
    • Line 15: warning: exported method Gidx.Within should have comment or be unexported (golint)
    • Line 28: warning: exported method Gidx.GetPath should have comment or be unexported (golint)
    • Line 28: warning: receiver name g should be consistent with previous receiver name gidx for Gidx (golint)
    • Line 32: warning: exported method Gidx.GetMd5sum should have comment or be unexported (golint)
    • Line 32: warning: receiver name g should be consistent with previous receiver name gidx for Gidx (golint)
    • Line 36: warning: exported method Gidx.GetWidth should have comment or be unexported (golint)
    • Line 36: warning: receiver name g should be consistent with previous receiver name gidx for Gidx (golint)
    • Line 40: warning: exported method Gidx.GetHeight should have comment or be unexported (golint)
    • Line 40: warning: receiver name g should be consistent with previous receiver name gidx for Gidx (golint)
    • Line 44: warning: exported method Gidx.GetOrientation should have comment or be unexported (golint)
    • Line 44: warning: receiver name g should be consistent with previous receiver name gidx for Gidx (golint)
    • Line 48: warning: exported method Gidx.SetPath should have comment or be unexported (golint)
    • Line 48: warning: receiver name g should be consistent with previous receiver name gidx for Gidx (golint)
    • Line 52: warning: exported method Gidx.SetMd5sum should have comment or be unexported (golint)
    • Line 52: warning: receiver name g should be consistent with previous receiver name gidx for Gidx (golint)
    • Line 56: warning: exported method Gidx.SetWidth should have comment or be unexported (golint)
    • Line 56: warning: receiver name g should be consistent with previous receiver name gidx for Gidx (golint)
    • Line 60: warning: exported method Gidx.SetHeight should have comment or be unexported (golint)
    • Line 60: warning: receiver name g should be consistent with previous receiver name gidx for Gidx (golint)
    • Line 64: warning: exported method Gidx.SetOrientation should have comment or be unexported (golint)
    • Line 64: warning: receiver name g should be consistent with previous receiver name gidx for Gidx (golint)
    • gosaic/service/service_factory.go
    • Line 11: 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 ServiceName should have comment or be unexported (golint)
    • Line 17: warning: exported const GidxServiceName should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported type ServiceFactory should have comment or be unexported (golint)
    • Line 61: warning: exported function NewServiceFactory should have comment or be unexported (golint)
    • gosaic/util/util.go
    • Line 8: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 21: warning: comment on exported const DATA_SIZE should be of the form "DATA_SIZE ..." (golint)
    • Line 26: warning: exported function Md5sum should have comment or be unexported (golint)
    • Line 50: warning: exported function GetOrientation should have comment or be unexported (golint)
    • Line 114: warning: exported function OpenImg should have comment or be unexported (golint)
    • Line 118: warning: exported function OpenImage should have comment or be unexported (golint)
    • Line 127: warning: exported function GetAspectLab should have comment or be unexported (golint)
    • Line 143: warning: exported function GetImgAspectLab should have comment or be unexported (golint)
    • Line 161: warning: exported function GetImageCoverPartial should have comment or be unexported (golint)
    • Line 177: warning: exported function GetImgCoverPartial should have comment or be unexported (golint)
    • Line 182: warning: exported function GetPartialLab should have comment or be unexported (golint)
    • Line 198: warning: exported function GetImgPartialLab should have comment or be unexported (golint)
    • Line 214: warning: exported function GetImgAvgDist should have comment or be unexported (golint)
    • Line 224: warning: exported function LabAvg should have comment or be unexported (golint)
    • Line 250: warning: exported function FillAspect should have comment or be unexported (golint)
    • Line 259: warning: exported function SliceContainsInt64 should have comment or be unexported (golint)
    • Line 268: warning: exported function SliceContainsString should have comment or be unexported (golint)
    • Line 277: warning: exported function Round should have comment or be unexported (golint)
    • Line 292: warning: exported function CleanStr should have comment or be unexported (golint)
    • Line 301: warning: exported function NextAvailableFilename should have comment or be unexported (golint)
    • gosaic/model/gidx_partial.go
    • Line 3: warning: exported type GidxPartial should have comment or be unexported (golint)
    • Line 13: warning: exported method GidxPartial.GetData should have comment or be unexported (golint)
    • Line 17: warning: exported method GidxPartial.GetPixels should have comment or be unexported (golint)
    • Line 21: warning: exported method GidxPartial.SetData should have comment or be unexported (golint)
    • Line 25: warning: exported method GidxPartial.SetPixels should have comment or be unexported (golint)
    • Line 29: warning: exported method GidxPartial.EncodePixels should have comment or be unexported (golint)
    • Line 33: warning: exported method GidxPartial.DecodeData should have comment or be unexported (golint)
    • gosaic/model/macro_gidx_view.go
    • Line 3: warning: exported type MacroGidxView should have comment or be unexported (golint)
    • Line 8: warning: exported method MacroGidxView.PartialComparison should have comment or be unexported (golint)
    • gosaic/service/sqlite3/mosaic_partial_service.go
    • Line 19: warning: exported function NewMosaicPartialService should have comment or be unexported (golint)
    • Line 114: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 143: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gosaic/service/sqlite3/partial_comparison_service.go
    • Line 19: warning: exported function NewPartialComparisonService should have comment or be unexported (golint)
    • Line 381: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 415: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 449: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 494: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gosaic/service/sqlite3/project_service.go
    • Line 20: warning: exported function NewProjectService should have comment or be unexported (golint)
    • Line 85: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 101: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gosaic/environment/environment.go
    • Line 14: warning: exported var Version should have comment or be unexported (golint)
    • Line 20: warning: exported type Environment should have comment or be unexported (golint)
    • Line 44: warning: exported function NewEnvironment should have comment or be unexported (golint)
    • Line 62: warning: exported function GetProdEnv should have comment or be unexported (golint)
    • Line 66: warning: exported function GetTestEnv should have comment or be unexported (golint)
    • gosaic/database/migrate.go
    • Line 5: warning: exported type MigrationFunc should have comment or be unexported (golint)
    • Line 6: warning: exported type Migrations should have comment or be unexported (golint)
    • Line 26: warning: exported function Migrate should have comment or be unexported (golint)
    • Line 49: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 54: warning: exported function GetVersion should have comment or be unexported (golint)
    • gosaic/model/aspect.go
    • Line 3: warning: exported type Aspect should have comment or be unexported (golint)
    • Line 9: warning: exported function NewAspect should have comment or be unexported (golint)
    • Line 17: warning: exported method Aspect.RoundWidth should have comment or be unexported (golint)
    • Line 21: warning: exported method Aspect.RoundHeight should have comment or be unexported (golint)
    • Line 25: warning: exported method Aspect.Ratio should have comment or be unexported (golint)
    • Line 62: warning: exported method Aspect.ScaleRound should have comment or be unexported (golint)
    • gosaic/model/lab.go
    • Line 10: warning: exported type Lab should have comment or be unexported (golint)
    • Line 17: warning: exported method Lab.Dist should have comment or be unexported (golint)
    • Line 25: warning: exported function RgbaToLab should have comment or be unexported (golint)
    • gosaic/model/pixel.go
    • Line 8: warning: exported type Pixel should have comment or be unexported (golint)
    • Line 38: warning: exported function PixelDist should have comment or be unexported (golint)

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!