Preparing report...

Report for github.com/markphelps/go-trace

A+    Excellent!    Found 8 issues across 11 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!


gocyclo100%

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.

No problems detected. Good job!


golint45%

Golint is a linter for Go source code.

    • go-trace/primitive/vector.go
    • Line 8: warning: exported type Vector should have comment or be unexported (golint)
    • Line 12: warning: exported var UnitVector should have comment or be unexported (golint)
    • Line 14: warning: exported function VectorInUnitSphere should have comment or be unexported (golint)
    • Line 24: warning: exported method Vector.Length should have comment or be unexported (golint)
    • Line 28: warning: exported method Vector.SquaredLength should have comment or be unexported (golint)
    • Line 32: warning: exported method Vector.Normalize should have comment or be unexported (golint)
    • Line 36: warning: exported method Vector.Dot should have comment or be unexported (golint)
    • Line 40: warning: exported method Vector.Cross should have comment or be unexported (golint)
    • Line 48: warning: exported method Vector.Add should have comment or be unexported (golint)
    • Line 52: warning: exported method Vector.Subtract should have comment or be unexported (golint)
    • Line 56: warning: exported method Vector.Multiply should have comment or be unexported (golint)
    • Line 60: warning: exported method Vector.Divide should have comment or be unexported (golint)
    • Line 64: warning: exported method Vector.AddScalar should have comment or be unexported (golint)
    • Line 68: warning: exported method Vector.SubtractScalar should have comment or be unexported (golint)
    • Line 72: warning: exported method Vector.MultiplyScalar should have comment or be unexported (golint)
    • Line 76: warning: exported method Vector.DivideScalar should have comment or be unexported (golint)
    • Line 80: warning: exported method Vector.Reflect should have comment or be unexported (golint)
    • Line 85: warning: exported method Vector.Refract should have comment or be unexported (golint)
    • go-trace/primitive/camera.go
    • Line 10: warning: exported type Camera should have comment or be unexported (golint)
    • Line 15: warning: exported function NewCamera should have comment or be unexported (golint)
    • Line 45: warning: exported method Camera.RayAt should have comment or be unexported (golint)
    • go-trace/primitive/color.go
    • Line 7: warning: exported type Color should have comment or be unexported (golint)
    • Line 12: warning: exported var Black should have comment or be unexported (golint)
    • Line 17: warning: comment on exported method Color.RGBA should be of the form "RGBA ..." (golint)
    • Line 27: warning: exported method Color.Add should have comment or be unexported (golint)
    • Line 31: warning: exported method Color.Multiply should have comment or be unexported (golint)
    • Line 35: warning: exported method Color.AddScalar should have comment or be unexported (golint)
    • Line 39: warning: exported method Color.MultiplyScalar should have comment or be unexported (golint)
    • Line 43: warning: exported method Color.DivideScalar should have comment or be unexported (golint)
    • Line 47: warning: exported function Gradient should have comment or be unexported (golint)
    • go-trace/primitive/hitable.go
    • Line 7: warning: exported type Hit should have comment or be unexported (golint)
    • Line 13: warning: exported type Hitable should have comment or be unexported (golint)
    • Line 17: warning: exported type Sphere should have comment or be unexported (golint)
    • Line 23: warning: exported function NewSphere should have comment or be unexported (golint)
    • Line 27: warning: exported method Sphere.Hit should have comment or be unexported (golint)
    • Line 55: warning: exported type World should have comment or be unexported (golint)
    • Line 57: warning: exported method World.Add should have comment or be unexported (golint)
    • Line 61: warning: exported method World.AddAll should have comment or be unexported (golint)
    • Line 67: warning: exported method World.Count should have comment or be unexported (golint)
    • Line 71: warning: exported method World.Hit should have comment or be unexported (golint)
    • go-trace/primitive/material.go
    • Line 8: warning: exported type Material should have comment or be unexported (golint)
    • Line 13: warning: exported type Lambertian should have comment or be unexported (golint)
    • Line 17: warning: exported method Lambertian.Color should have comment or be unexported (golint)
    • Line 21: warning: exported method Lambertian.Bounce should have comment or be unexported (golint)
    • Line 26: warning: exported type Metal should have comment or be unexported (golint)
    • Line 31: warning: exported method Metal.Color should have comment or be unexported (golint)
    • Line 35: warning: exported method Metal.Bounce should have comment or be unexported (golint)
    • Line 42: warning: exported type Dielectric should have comment or be unexported (golint)
    • Line 46: warning: exported method Dielectric.Color should have comment or be unexported (golint)
    • Line 50: warning: exported method Dielectric.Bounce should have comment or be unexported (golint)
    • go-trace/primitive/ray.go
    • Line 3: warning: exported type Ray should have comment or be unexported (golint)
    • Line 7: warning: exported method Ray.Point should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign81%

IneffAssign detects ineffectual assignments in Go code.

    • go-trace/render/render.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/markphelps/go-trace/primitive (invalid package name: "") (ineffassign)
    • go-trace/cmd/go-trace/main.go
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 16: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: could not import github.com/markphelps/go-trace/primitive (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import github.com/markphelps/go-trace/render (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/markphelps/go-trace/primitive (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import github.com/markphelps/go-trace/render (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!