Preparing report...

Report for github.com/fogleman/gg

A+    Excellent!    Found 39 issues across 42 files

Tweet

gofmt97%

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!


gocyclo97%

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.

    • gg/path.go
    • Line 62: warning: cyclomatic complexity 16 of function dashPath() is high (> 15) (gocyclo)

golint71%

Golint is a linter for Go source code.

    • gg/bezier.go
    • Line 15: warning: exported function QuadraticBezier should have comment or be unexported (golint)
    • Line 43: warning: exported function CubicBezier should have comment or be unexported (golint)
    • gg/context.go
    • Line 21: warning: exported type LineCap should have comment or be unexported (golint)
    • Line 24: warning: exported const LineCapRound should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported type LineJoin should have comment or be unexported (golint)
    • Line 32: warning: exported const LineJoinRound should have comment (or a comment on this block) or be unexported (golint)
    • Line 36: warning: exported type FillRule should have comment or be unexported (golint)
    • Line 39: warning: exported const FillRuleWinding should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported type Align should have comment or be unexported (golint)
    • Line 46: warning: exported const AlignLeft should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: exported type Context should have comment or be unexported (golint)
    • Line 174: warning: exported method Context.SetLineWidth should have comment or be unexported (golint)
    • Line 178: warning: exported method Context.SetLineCap should have comment or be unexported (golint)
    • Line 182: warning: exported method Context.SetLineCapRound should have comment or be unexported (golint)
    • Line 186: warning: exported method Context.SetLineCapButt should have comment or be unexported (golint)
    • Line 190: warning: exported method Context.SetLineCapSquare should have comment or be unexported (golint)
    • Line 194: warning: exported method Context.SetLineJoin should have comment or be unexported (golint)
    • Line 198: warning: exported method Context.SetLineJoinRound should have comment or be unexported (golint)
    • Line 202: warning: exported method Context.SetLineJoinBevel should have comment or be unexported (golint)
    • Line 206: warning: exported method Context.SetFillRule should have comment or be unexported (golint)
    • Line 210: warning: exported method Context.SetFillRuleWinding should have comment or be unexported (golint)
    • Line 214: warning: exported method Context.SetFillRuleEvenOdd should have comment or be unexported (golint)
    • Line 578: warning: exported method Context.DrawLine should have comment or be unexported (golint)
    • Line 583: warning: exported method Context.DrawRectangle should have comment or be unexported (golint)
    • Line 592: warning: exported method Context.DrawRoundedRectangle should have comment or be unexported (golint)
    • Line 608: warning: exported method Context.DrawEllipticalArc should have comment or be unexported (golint)
    • Line 634: warning: exported method Context.DrawEllipse should have comment or be unexported (golint)
    • Line 640: warning: exported method Context.DrawArc should have comment or be unexported (golint)
    • Line 644: warning: exported method Context.DrawCircle should have comment or be unexported (golint)
    • Line 650: warning: exported method Context.DrawRegularPolygon should have comment or be unexported (golint)
    • Line 692: warning: exported method Context.SetFontFace should have comment or be unexported (golint)
    • Line 697: warning: exported method Context.LoadFontFace should have comment or be unexported (golint)
    • Line 706: warning: exported method Context.FontHeight should have comment or be unexported (golint)
    • Line 794: warning: exported method Context.MeasureMultilineString should have comment or be unexported (golint)
    • gg/matrix.go
    • Line 5: warning: exported type Matrix should have comment or be unexported (golint)
    • Line 9: warning: exported function Identity should have comment or be unexported (golint)
    • Line 17: warning: exported function Translate should have comment or be unexported (golint)
    • Line 25: warning: exported function Scale should have comment or be unexported (golint)
    • Line 33: warning: exported function Rotate should have comment or be unexported (golint)
    • Line 43: warning: exported function Shear should have comment or be unexported (golint)
    • Line 51: warning: exported method Matrix.Multiply should have comment or be unexported (golint)
    • Line 62: warning: exported method Matrix.TransformVector should have comment or be unexported (golint)
    • Line 68: warning: exported method Matrix.TransformPoint should have comment or be unexported (golint)
    • Line 74: warning: exported method Matrix.Translate should have comment or be unexported (golint)
    • Line 78: warning: exported method Matrix.Scale should have comment or be unexported (golint)
    • Line 82: warning: exported method Matrix.Rotate should have comment or be unexported (golint)
    • Line 86: warning: exported method Matrix.Shear should have comment or be unexported (golint)
    • gg/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: exported function Radians should have comment or be unexported (golint)
    • Line 25: warning: exported function Degrees should have comment or be unexported (golint)
    • Line 29: warning: exported function LoadImage should have comment or be unexported (golint)
    • Line 39: warning: exported function LoadPNG should have comment or be unexported (golint)
    • Line 48: warning: exported function SavePNG should have comment or be unexported (golint)
    • Line 57: warning: exported function LoadJPG should have comment or be unexported (golint)
    • Line 66: warning: exported function SaveJPG should have comment or be unexported (golint)
    • gg/examples/stars.go
    • Line 10: warning: exported type Point should have comment or be unexported (golint)
    • Line 14: warning: exported function Polygon should have comment or be unexported (golint)
    • gg/pattern.go
    • Line 10: warning: exported type RepeatOp should have comment or be unexported (golint)
    • Line 13: warning: exported const RepeatBoth should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type Pattern should have comment or be unexported (golint)
    • Line 32: warning: exported function NewSolidPattern should have comment or be unexported (golint)
    • Line 63: warning: exported function NewSurfacePattern should have comment or be unexported (golint)
    • gg/point.go
    • Line 9: warning: exported type Point should have comment or be unexported (golint)
    • Line 13: warning: exported method Point.Fixed should have comment or be unexported (golint)
    • Line 17: warning: exported method Point.Distance should have comment or be unexported (golint)
    • Line 21: warning: exported method Point.Interpolate should have comment or be unexported (golint)
    • gg/examples/star.go
    • Line 9: warning: exported type Point should have comment or be unexported (golint)
    • Line 13: warning: exported function Polygon should have comment or be unexported (golint)
    • gg/gradient.go
    • Line 31: warning: exported type Gradient should have comment or be unexported (golint)
    • Line 79: warning: exported function NewLinearGradient should have comment or be unexported (golint)
    • Line 146: warning: exported function NewRadialGradient should have comment or be unexported (golint)
    • Line 191: warning: exported function NewConicGradient should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign19%

IneffAssign detects ineffectual assignments in Go code.

    • gg/examples/stars.go
    • Line 10: warning: Point redeclared in this block (ineffassign)
    • Line 14: warning: Polygon redeclared in this block (ineffassign)
    • Line 23: warning: main redeclared in this block (ineffassign)
    • Line 31: warning: too few arguments in call to Polygon (ineffassign)
    • gg/util.go
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: could not import github.com/golang/freetype/truetype (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/golang/freetype/truetype (invalid package name: "") (ineffassign)
    • gg/context.go
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 16: warning: cannot find package "." in: (ineffassign)
    • Line 17: warning: cannot find package "." in: (ineffassign)
    • Line 18: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: could not import github.com/golang/freetype/raster (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import golang.org/x/image/draw (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import golang.org/x/image/font (invalid package name: "") (ineffassign)
    • Line 17: warning: could not import golang.org/x/image/font/basicfont (invalid package name: "") (ineffassign)
    • Line 18: warning: could not import golang.org/x/image/math/f64 (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/golang/freetype/raster (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import golang.org/x/image/draw (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import golang.org/x/image/font (invalid package name: "") (ineffassign)
    • Line 17: warning: could not import golang.org/x/image/font/basicfont (invalid package name: "") (ineffassign)
    • Line 18: warning: could not import golang.org/x/image/math/f64 (invalid package name: "") (ineffassign)
    • gg/examples/star.go
    • Line 22: warning: main redeclared in this block (ineffassign)
    • Line 9: warning: other declaration of Point (ineffassign)
    • Line 13: warning: other declaration of Polygon (ineffassign)
    • gg/path.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import golang.org/x/image/math/fixed (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import golang.org/x/image/math/fixed (invalid package name: "") (ineffassign)
    • gg/examples/gofont.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/golang/freetype/truetype (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import golang.org/x/image/font/gofont/goregular (invalid package name: "") (ineffassign)
    • Line 11: warning: main redeclared in this block (ineffassign)
    • gg/examples/beziers.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/fogleman/gg (invalid package name: "") (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)
    • Line 59: warning: other declaration of main (ineffassign)

misspell97%

Misspell Finds commonly misspelled English words

    • gg/context.go
    • Line 468: warning: "implicity" is a misspelling of "implicitly" (misspell)
    • Line 487: warning: "implicity" is a misspelling of "implicitly" (misspell)