Preparing report...

Report for github.com/fogleman/pt

A    Great!    Found 69 issues across 70 files

Tweet

gofmt98%

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!


golint1%

Golint is a linter for Go source code.

    • pt/pt/stl.go
    • Line 11: warning: exported type STLHeader should have comment or be unexported (golint)
    • Line 16: warning: exported type STLTriangle should have comment or be unexported (golint)
    • Line 21: warning: exported function LoadSTL should have comment or be unexported (golint)
    • Line 54: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 107: warning: exported function SaveSTL should have comment or be unexported (golint)
    • pt/pt/mesh.go
    • Line 5: warning: exported type Mesh should have comment or be unexported (golint)
    • Line 11: warning: exported function NewMesh should have comment or be unexported (golint)
    • Line 20: warning: exported method Mesh.Copy should have comment or be unexported (golint)
    • Line 29: warning: exported method Mesh.Compile should have comment or be unexported (golint)
    • Line 39: warning: exported method Mesh.Add should have comment or be unexported (golint)
    • Line 39: warning: receiver name a should be consistent with previous receiver name m for Mesh (golint)
    • Line 44: warning: exported method Mesh.BoundingBox should have comment or be unexported (golint)
    • Line 57: warning: exported method Mesh.Intersect should have comment or be unexported (golint)
    • Line 61: warning: exported method Mesh.UV should have comment or be unexported (golint)
    • Line 65: warning: exported method Mesh.MaterialAt should have comment or be unexported (golint)
    • Line 69: warning: exported method Mesh.NormalAt should have comment or be unexported (golint)
    • Line 83: warning: exported method Mesh.SmoothNormalsThreshold should have comment or be unexported (golint)
    • Line 98: warning: exported method Mesh.SmoothNormals should have comment or be unexported (golint)
    • Line 115: warning: exported method Mesh.UnitCube should have comment or be unexported (golint)
    • Line 120: warning: exported method Mesh.MoveTo should have comment or be unexported (golint)
    • Line 125: warning: exported method Mesh.FitInside should have comment or be unexported (golint)
    • Line 135: warning: exported method Mesh.Transform should have comment or be unexported (golint)
    • Line 147: warning: exported method Mesh.SetMaterial should have comment or be unexported (golint)
    • Line 153: warning: exported method Mesh.SaveSTL should have comment or be unexported (golint)
    • pt/pt/plane.go
    • Line 5: warning: exported type Plane should have comment or be unexported (golint)
    • Line 11: warning: exported function NewPlane should have comment or be unexported (golint)
    • Line 16: warning: exported method Plane.Compile should have comment or be unexported (golint)
    • Line 19: warning: exported method Plane.BoundingBox should have comment or be unexported (golint)
    • Line 23: warning: exported method Plane.Intersect should have comment or be unexported (golint)
    • Line 36: warning: exported method Plane.UV should have comment or be unexported (golint)
    • Line 40: warning: exported method Plane.MaterialAt should have comment or be unexported (golint)
    • Line 44: warning: exported method Plane.NormalAt should have comment or be unexported (golint)
    • pt/pt/cube.go
    • Line 5: warning: exported type Cube should have comment or be unexported (golint)
    • Line 12: warning: exported function NewCube should have comment or be unexported (golint)
    • Line 17: warning: exported method Cube.Compile should have comment or be unexported (golint)
    • Line 20: warning: exported method Cube.BoundingBox should have comment or be unexported (golint)
    • Line 24: warning: exported method Cube.Intersect should have comment or be unexported (golint)
    • Line 36: warning: exported method Cube.UV should have comment or be unexported (golint)
    • Line 41: warning: exported method Cube.MaterialAt should have comment or be unexported (golint)
    • Line 45: warning: exported method Cube.NormalAt should have comment or be unexported (golint)
    • Line 63: warning: exported method Cube.Mesh should have comment or be unexported (golint)
    • pt/pt/material.go
    • Line 3: warning: exported type Material should have comment or be unexported (golint)
    • Line 18: warning: exported function DiffuseMaterial should have comment or be unexported (golint)
    • Line 22: warning: exported function SpecularMaterial should have comment or be unexported (golint)
    • Line 26: warning: exported function GlossyMaterial should have comment or be unexported (golint)
    • Line 30: warning: exported function ClearMaterial should have comment or be unexported (golint)
    • Line 34: warning: exported function TransparentMaterial should have comment or be unexported (golint)
    • Line 38: warning: exported function MetallicMaterial should have comment or be unexported (golint)
    • Line 42: warning: exported function LightMaterial should have comment or be unexported (golint)
    • Line 46: warning: exported function MaterialAt should have comment or be unexported (golint)
    • pt/pt/buffer.go
    • Line 8: warning: exported type Channel should have comment or be unexported (golint)
    • Line 11: warning: exported const ColorChannel should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type Pixel should have comment or be unexported (golint)
    • Line 22: warning: exported method Pixel.AddSample should have comment or be unexported (golint)
    • Line 33: warning: exported method Pixel.Color should have comment or be unexported (golint)
    • Line 37: warning: exported method Pixel.Variance should have comment or be unexported (golint)
    • Line 44: warning: exported method Pixel.StandardDeviation should have comment or be unexported (golint)
    • Line 48: warning: exported type Buffer should have comment or be unexported (golint)
    • Line 53: warning: exported function NewBuffer should have comment or be unexported (golint)
    • Line 58: warning: exported method Buffer.Copy should have comment or be unexported (golint)
    • Line 64: warning: exported method Buffer.AddSample should have comment or be unexported (golint)
    • Line 68: warning: exported method Buffer.Samples should have comment or be unexported (golint)
    • Line 72: warning: exported method Buffer.Color should have comment or be unexported (golint)
    • Line 76: warning: exported method Buffer.Variance should have comment or be unexported (golint)
    • Line 80: warning: exported method Buffer.StandardDeviation should have comment or be unexported (golint)
    • Line 84: warning: exported method Buffer.Image should have comment or be unexported (golint)
    • pt/pt/sphere.go
    • Line 5: warning: exported type Sphere should have comment or be unexported (golint)
    • Line 12: warning: exported function NewSphere should have comment or be unexported (golint)
    • Line 19: warning: exported method Sphere.Compile should have comment or be unexported (golint)
    • Line 22: warning: exported method Sphere.BoundingBox should have comment or be unexported (golint)
    • Line 26: warning: exported method Sphere.Intersect should have comment or be unexported (golint)
    • Line 45: warning: exported method Sphere.UV should have comment or be unexported (golint)
    • Line 54: warning: exported method Sphere.MaterialAt should have comment or be unexported (golint)
    • Line 58: warning: exported method Sphere.NormalAt should have comment or be unexported (golint)
    • pt/pt/camera.go
    • Line 8: warning: exported type Camera should have comment or be unexported (golint)
    • Line 15: warning: exported function LookAt should have comment or be unexported (golint)
    • Line 25: warning: exported method Camera.SetFocus should have comment or be unexported (golint)
    • Line 30: warning: exported method Camera.CastRay should have comment or be unexported (golint)
    • pt/examples/beads.go
    • Line 8: warning: should not use dot imports (golint)
    • Line 61: warning: exported function Normalize should have comment or be unexported (golint)
    • Line 76: warning: exported function LowPass should have comment or be unexported (golint)
    • Line 86: warning: exported function LowPassNoise should have comment or be unexported (golint)
    • pt/pt/ray.go
    • Line 8: warning: exported type Ray should have comment or be unexported (golint)
    • Line 12: warning: exported method Ray.Position should have comment or be unexported (golint)
    • Line 16: warning: exported method Ray.Reflect should have comment or be unexported (golint)
    • Line 16: warning: receiver name n should be consistent with previous receiver name r for Ray (golint)
    • Line 20: warning: exported method Ray.Refract should have comment or be unexported (golint)
    • Line 20: warning: receiver name n should be consistent with previous receiver name r for Ray (golint)
    • Line 24: warning: exported method Ray.Reflectance should have comment or be unexported (golint)
    • Line 24: warning: receiver name n should be consistent with previous receiver name r for Ray (golint)
    • Line 28: warning: exported method Ray.WeightedBounce should have comment or be unexported (golint)
    • Line 40: warning: exported method Ray.ConeBounce should have comment or be unexported (golint)
    • Line 44: warning: exported method Ray.Bounce should have comment or be unexported (golint)
    • Line 44: warning: receiver name i should be consistent with previous receiver name r for Ray (golint)
    • pt/pt/hit.go
    • Line 3: warning: exported type Hit should have comment or be unexported (golint)
    • Line 9: warning: exported type HitInfo should have comment or be unexported (golint)
    • Line 18: warning: exported var NoHit should have comment or be unexported (golint)
    • Line 20: warning: exported method Hit.Ok should have comment or be unexported (golint)
    • Line 24: warning: exported method Hit.Info should have comment or be unexported (golint)
    • pt/pt/common.go
    • Line 3: warning: exported const INF should have comment or be unexported (golint)
    • Line 4: warning: exported const EPS should have comment or be unexported (golint)
    • pt/examples/toybrick.go
    • Line 6: warning: should not use dot imports (golint)
    • Line 9: warning: exported const H should have comment or be unexported (golint)
    • Line 11: warning: exported function CreateBrick should have comment or be unexported (golint)
    • Line 54: warning: exported var Colors should have comment or be unexported (golint)
    • pt/pt/axis.go
    • Line 3: warning: exported type Axis should have comment or be unexported (golint)
    • Line 6: warning: exported const AxisNone should have comment (or a comment on this block) or be unexported (golint)
    • pt/pt/box.go
    • Line 5: warning: exported type Box should have comment or be unexported (golint)
    • Line 9: warning: exported function BoxForShapes should have comment or be unexported (golint)
    • Line 20: warning: exported function BoxForTriangles should have comment or be unexported (golint)
    • Line 31: warning: exported method Box.Anchor should have comment or be unexported (golint)
    • Line 35: warning: exported method Box.Center should have comment or be unexported (golint)
    • Line 39: warning: exported method Box.OuterRadius should have comment or be unexported (golint)
    • Line 43: warning: exported method Box.InnerRadius should have comment or be unexported (golint)
    • Line 47: warning: exported method Box.Size should have comment or be unexported (golint)
    • Line 51: warning: exported method Box.Extend should have comment or be unexported (golint)
    • Line 55: warning: exported method Box.Contains should have comment or be unexported (golint)
    • Line 61: warning: exported method Box.Intersects should have comment or be unexported (golint)
    • Line 66: warning: exported method Box.Intersect should have comment or be unexported (golint)
    • Line 66: warning: receiver name b should be consistent with previous receiver name a for Box (golint)
    • Line 87: warning: exported method Box.Partition should have comment or be unexported (golint)
    • Line 87: warning: receiver name b should be consistent with previous receiver name a for Box (golint)
    • pt/pt/cylinder.go
    • Line 5: warning: exported type Cylinder should have comment or be unexported (golint)
    • Line 11: warning: exported function NewCylinder should have comment or be unexported (golint)
    • Line 15: warning: exported function NewTransformedCylinder should have comment or be unexported (golint)
    • Line 29: warning: exported method Cylinder.Compile should have comment or be unexported (golint)
    • Line 32: warning: exported method Cylinder.BoundingBox should have comment or be unexported (golint)
    • Line 37: warning: exported method Cylinder.Intersect should have comment or be unexported (golint)
    • Line 37: warning: receiver name shape should be consistent with previous receiver name c for Cylinder (golint)
    • Line 66: warning: exported method Cylinder.UV should have comment or be unexported (golint)
    • Line 70: warning: exported method Cylinder.MaterialAt should have comment or be unexported (golint)
    • Line 74: warning: exported method Cylinder.NormalAt should have comment or be unexported (golint)
    • pt/pt/tree.go
    • Line 9: warning: exported type Tree should have comment or be unexported (golint)
    • Line 14: warning: exported function NewTree should have comment or be unexported (golint)
    • Line 23: warning: exported method Tree.Intersect should have comment or be unexported (golint)
    • Line 31: warning: exported type Node should have comment or be unexported (golint)
    • Line 39: warning: exported function NewNode should have comment or be unexported (golint)
    • Line 43: warning: exported method Node.Intersect should have comment or be unexported (golint)
    • Line 79: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 85: warning: exported method Node.IntersectShapes should have comment or be unexported (golint)
    • Line 96: warning: exported method Node.PartitionScore should have comment or be unexported (golint)
    • Line 110: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 115: warning: exported method Node.Partition should have comment or be unexported (golint)
    • Line 131: warning: exported method Node.Split should have comment or be unexported (golint)
    • pt/pt/volume.go
    • Line 8: warning: exported type Volume should have comment or be unexported (golint)
    • Line 16: warning: exported type VolumeWindow should have comment or be unexported (golint)
    • Line 21: warning: exported function NewVolume should have comment or be unexported (golint)
    • Line 40: warning: exported method Volume.Get should have comment or be unexported (golint)
    • Line 47: warning: exported method Volume.Sample should have comment or be unexported (golint)
    • Line 79: warning: exported method Volume.Compile should have comment or be unexported (golint)
    • Line 82: warning: exported method Volume.BoundingBox should have comment or be unexported (golint)
    • Line 86: warning: exported method Volume.Sign should have comment or be unexported (golint)
    • Line 100: warning: exported method Volume.Intersect should have comment or be unexported (golint)
    • Line 124: warning: exported method Volume.UV should have comment or be unexported (golint)
    • Line 128: warning: exported method Volume.MaterialAt should have comment or be unexported (golint)
    • Line 145: warning: exported method Volume.NormalAt should have comment or be unexported (golint)
    • pt/examples/craft.go
    • Line 6: warning: should not use dot imports (golint)
    • Line 9: warning: exported const N should have comment or be unexported (golint)
    • Line 11: warning: exported const A should have comment or be unexported (golint)
    • Line 12: warning: exported const B should have comment or be unexported (golint)
    • Line 14: warning: exported var Dirt should have comment or be unexported (golint)
    • Line 15: warning: exported var Grass should have comment or be unexported (golint)
    • Line 17: warning: exported var VP should have comment or be unexported (golint)
    • Line 28: warning: exported var VT should have comment or be unexported (golint)
    • Line 35: warning: exported var Triangles should have comment or be unexported (golint)
    • Line 50: warning: exported function Block should have comment or be unexported (golint)
    • pt/examples/mol.go
    • Line 9: warning: should not use dot imports (golint)
    • Line 12: warning: exported function GetColor should have comment or be unexported (golint)
    • Line 36: warning: exported function GetMaterial should have comment or be unexported (golint)
    • pt/pt/shape.go
    • Line 3: warning: exported type Shape should have comment or be unexported (golint)
    • Line 12: warning: exported type TransformedShape should have comment or be unexported (golint)
    • Line 18: warning: exported function NewTransformedShape should have comment or be unexported (golint)
    • Line 22: warning: exported method TransformedShape.BoundingBox should have comment or be unexported (golint)
    • Line 26: warning: exported method TransformedShape.Intersect should have comment or be unexported (golint)
    • pt/examples/counties.go
    • Line 9: warning: should not use dot imports (golint)
    • Line 13: warning: exported function NewMaterial should have comment or be unexported (golint)
    • Line 25: warning: exported function LoadTriangles should have comment or be unexported (golint)
    • pt/pt/vector.go
    • Line 8: warning: exported type Vector should have comment or be unexported (golint)
    • Line 12: warning: exported function V should have comment or be unexported (golint)
    • Line 16: warning: exported function RandomUnitVector should have comment or be unexported (golint)
    • Line 35: warning: exported method Vector.Length should have comment or be unexported (golint)
    • Line 39: warning: exported method Vector.LengthN should have comment or be unexported (golint)
    • Line 47: warning: exported method Vector.Dot should have comment or be unexported (golint)
    • Line 51: warning: exported method Vector.Cross should have comment or be unexported (golint)
    • Line 58: warning: exported method Vector.Normalize should have comment or be unexported (golint)
    • Line 63: warning: exported method Vector.Negate should have comment or be unexported (golint)
    • Line 67: warning: exported method Vector.Abs should have comment or be unexported (golint)
    • Line 71: warning: exported method Vector.Add should have comment or be unexported (golint)
    • Line 75: warning: exported method Vector.Sub should have comment or be unexported (golint)
    • Line 79: warning: exported method Vector.Mul should have comment or be unexported (golint)
    • Line 83: warning: exported method Vector.Div should have comment or be unexported (golint)
    • Line 87: warning: exported method Vector.Mod should have comment or be unexported (golint)
    • Line 95: warning: exported method Vector.AddScalar should have comment or be unexported (golint)
    • Line 99: warning: exported method Vector.SubScalar should have comment or be unexported (golint)
    • Line 103: warning: exported method Vector.MulScalar should have comment or be unexported (golint)
    • Line 107: warning: exported method Vector.DivScalar should have comment or be unexported (golint)
    • Line 111: warning: exported method Vector.Min should have comment or be unexported (golint)
    • Line 115: warning: exported method Vector.Max should have comment or be unexported (golint)
    • Line 119: warning: exported method Vector.MinAxis should have comment or be unexported (golint)
    • Line 130: warning: exported method Vector.MinComponent should have comment or be unexported (golint)
    • Line 134: warning: exported method Vector.MaxComponent should have comment or be unexported (golint)
    • Line 138: warning: exported method Vector.Reflect should have comment or be unexported (golint)
    • Line 138: warning: receiver name n should be consistent with previous receiver name a for Vector (golint)
    • Line 142: warning: exported method Vector.Refract should have comment or be unexported (golint)
    • Line 142: warning: receiver name n should be consistent with previous receiver name a for Vector (golint)
    • Line 153: warning: exported method Vector.Reflectance should have comment or be unexported (golint)
    • Line 153: warning: receiver name n should be consistent with previous receiver name a for Vector (golint)
    • pt/pt/renderer.go
    • Line 14: warning: exported type Renderer should have comment or be unexported (golint)
    • Line 30: warning: exported function NewRenderer should have comment or be unexported (golint)
    • Line 162: warning: exported method Renderer.Render should have comment or be unexported (golint)
    • Line 167: warning: exported method Renderer.IterativeRender should have comment or be unexported (golint)
    • Line 188: warning: exported method Renderer.ChannelRender should have comment or be unexported (golint)
    • Line 199: warning: exported method Renderer.FrameRender should have comment or be unexported (golint)
    • Line 208: warning: exported method Renderer.TimedRender should have comment or be unexported (golint)
    • pt/pt/sdf.go
    • Line 7: warning: exported type SDFShape should have comment or be unexported (golint)
    • Line 12: warning: exported function NewSDFShape should have comment or be unexported (golint)
    • Line 16: warning: exported method SDFShape.Compile should have comment or be unexported (golint)
    • Line 19: warning: exported method SDFShape.Intersect should have comment or be unexported (golint)
    • Line 51: warning: exported method SDFShape.UV should have comment or be unexported (golint)
    • Line 55: warning: exported method SDFShape.NormalAt should have comment or be unexported (golint)
    • Line 66: warning: exported method SDFShape.MaterialAt should have comment or be unexported (golint)
    • Line 72: warning: exported type SDF should have comment or be unexported (golint)
    • Line 79: warning: exported type SphereSDF should have comment or be unexported (golint)
    • Line 84: warning: exported function NewSphereSDF should have comment or be unexported (golint)
    • Line 88: warning: exported method SphereSDF.Evaluate should have comment or be unexported (golint)
    • Line 92: warning: exported method SphereSDF.BoundingBox should have comment or be unexported (golint)
    • Line 99: warning: exported type CubeSDF should have comment or be unexported (golint)
    • Line 103: warning: exported function NewCubeSDF should have comment or be unexported (golint)
    • Line 107: warning: exported method CubeSDF.Evaluate should have comment or be unexported (golint)
    • Line 146: warning: exported method CubeSDF.BoundingBox should have comment or be unexported (golint)
    • Line 153: warning: exported type CylinderSDF should have comment or be unexported (golint)
    • Line 158: warning: exported function NewCylinderSDF should have comment or be unexported (golint)
    • Line 162: warning: exported method CylinderSDF.Evaluate should have comment or be unexported (golint)
    • Line 190: warning: exported method CylinderSDF.BoundingBox should have comment or be unexported (golint)
    • Line 198: warning: exported type CapsuleSDF should have comment or be unexported (golint)
    • Line 204: warning: exported function NewCapsuleSDF should have comment or be unexported (golint)
    • Line 208: warning: exported method CapsuleSDF.Evaluate should have comment or be unexported (golint)
    • Line 215: warning: exported method CapsuleSDF.BoundingBox should have comment or be unexported (golint)
    • Line 222: warning: exported type TorusSDF should have comment or be unexported (golint)
    • Line 229: warning: exported function NewTorusSDF should have comment or be unexported (golint)
    • Line 233: warning: exported method TorusSDF.Evaluate should have comment or be unexported (golint)
    • Line 238: warning: exported method TorusSDF.BoundingBox should have comment or be unexported (golint)
    • Line 246: warning: exported type TransformSDF should have comment or be unexported (golint)
    • Line 252: warning: exported function NewTransformSDF should have comment or be unexported (golint)
    • Line 256: warning: exported method TransformSDF.Evaluate should have comment or be unexported (golint)
    • Line 261: warning: exported method TransformSDF.BoundingBox should have comment or be unexported (golint)
    • Line 267: warning: exported type ScaleSDF should have comment or be unexported (golint)
    • Line 272: warning: exported function NewScaleSDF should have comment or be unexported (golint)
    • Line 276: warning: exported method ScaleSDF.Evaluate should have comment or be unexported (golint)
    • Line 280: warning: exported method ScaleSDF.BoundingBox should have comment or be unexported (golint)
    • Line 288: warning: exported type UnionSDF should have comment or be unexported (golint)
    • Line 292: warning: exported function NewUnionSDF should have comment or be unexported (golint)
    • Line 296: warning: exported method UnionSDF.Evaluate should have comment or be unexported (golint)
    • Line 307: warning: exported method UnionSDF.BoundingBox should have comment or be unexported (golint)
    • Line 322: warning: exported type DifferenceSDF should have comment or be unexported (golint)
    • Line 326: warning: exported function NewDifferenceSDF should have comment or be unexported (golint)
    • Line 330: warning: exported method DifferenceSDF.Evaluate should have comment or be unexported (golint)
    • Line 343: warning: exported method DifferenceSDF.BoundingBox should have comment or be unexported (golint)
    • Line 349: warning: exported type IntersectionSDF should have comment or be unexported (golint)
    • Line 353: warning: exported function NewIntersectionSDF should have comment or be unexported (golint)
    • Line 357: warning: exported method IntersectionSDF.Evaluate should have comment or be unexported (golint)
    • Line 368: warning: exported method IntersectionSDF.BoundingBox should have comment or be unexported (golint)
    • Line 384: warning: exported type RepeatSDF should have comment or be unexported (golint)
    • Line 389: warning: exported function NewRepeatSDF should have comment or be unexported (golint)
    • Line 393: warning: exported method RepeatSDF.Evaluate should have comment or be unexported (golint)
    • Line 398: warning: exported method RepeatSDF.BoundingBox should have comment or be unexported (golint)
    • pt/pt/color.go
    • Line 9: warning: exported var Black should have comment or be unexported (golint)
    • Line 13: warning: exported type Color should have comment or be unexported (golint)
    • Line 17: warning: exported function HexColor should have comment or be unexported (golint)
    • Line 24: warning: exported function Kelvin should have comment or be unexported (golint)
    • Line 70: warning: exported function NewColor should have comment or be unexported (golint)
    • Line 75: warning: exported method Color.RGBA should have comment or be unexported (golint)
    • Line 82: warning: exported method Color.RGBA64 should have comment or be unexported (golint)
    • Line 89: warning: exported method Color.Add should have comment or be unexported (golint)
    • Line 93: warning: exported method Color.Sub should have comment or be unexported (golint)
    • Line 97: warning: exported method Color.Mul should have comment or be unexported (golint)
    • Line 101: warning: exported method Color.MulScalar should have comment or be unexported (golint)
    • Line 105: warning: exported method Color.DivScalar should have comment or be unexported (golint)
    • Line 109: warning: exported method Color.Min should have comment or be unexported (golint)
    • Line 113: warning: exported method Color.Max should have comment or be unexported (golint)
    • Line 117: warning: exported method Color.MinComponent should have comment or be unexported (golint)
    • Line 121: warning: exported method Color.MaxComponent should have comment or be unexported (golint)
    • Line 125: warning: exported method Color.Pow should have comment or be unexported (golint)
    • Line 129: warning: exported method Color.Mix should have comment or be unexported (golint)
    • pt/pt/function.go
    • Line 3: warning: exported type Func should have comment or be unexported (golint)
    • Line 5: warning: exported type Function should have comment or be unexported (golint)
    • Line 11: warning: exported function NewFunction should have comment or be unexported (golint)
    • Line 15: warning: exported method Function.Compile should have comment or be unexported (golint)
    • Line 18: warning: exported method Function.BoundingBox should have comment or be unexported (golint)
    • Line 22: warning: exported method Function.Contains should have comment or be unexported (golint)
    • Line 26: warning: exported method Function.Intersect should have comment or be unexported (golint)
    • Line 38: warning: exported method Function.UV should have comment or be unexported (golint)
    • Line 46: warning: exported method Function.MaterialAt should have comment or be unexported (golint)
    • Line 50: warning: exported method Function.NormalAt should have comment or be unexported (golint)
    • pt/examples/spheres-anim.go
    • Line 9: warning: should not use dot imports (golint)
    • Line 13: warning: exported const FPS should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported var BounceStart should have comment or be unexported (golint)
    • Line 40: warning: exported var BounceDeviation should have comment or be unexported (golint)
    • Line 117: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • pt/pt/matrix.go
    • Line 7: warning: exported type Matrix should have comment or be unexported (golint)
    • Line 14: warning: exported function Identity should have comment or be unexported (golint)
    • Line 22: warning: exported function Translate should have comment or be unexported (golint)
    • Line 30: warning: exported function Scale should have comment or be unexported (golint)
    • Line 38: warning: exported function Rotate should have comment or be unexported (golint)
    • Line 50: warning: exported function Frustum should have comment or be unexported (golint)
    • Line 62: warning: exported function Orthographic should have comment or be unexported (golint)
    • Line 70: warning: exported function Perspective should have comment or be unexported (golint)
    • Line 76: warning: exported function LookAtMatrix should have comment or be unexported (golint)
    • Line 90: warning: exported method Matrix.Translate should have comment or be unexported (golint)
    • Line 94: warning: exported method Matrix.Scale should have comment or be unexported (golint)
    • Line 98: warning: exported method Matrix.Rotate should have comment or be unexported (golint)
    • Line 102: warning: exported method Matrix.Frustum should have comment or be unexported (golint)
    • Line 106: warning: exported method Matrix.Orthographic should have comment or be unexported (golint)
    • Line 110: warning: exported method Matrix.Perspective should have comment or be unexported (golint)
    • Line 114: warning: exported method Matrix.Mul should have comment or be unexported (golint)
    • Line 114: warning: receiver name a should be consistent with previous receiver name m for Matrix (golint)
    • Line 135: warning: exported method Matrix.MulPosition should have comment or be unexported (golint)
    • Line 135: warning: receiver name a should be consistent with previous receiver name m for Matrix (golint)
    • Line 142: warning: exported method Matrix.MulDirection should have comment or be unexported (golint)
    • Line 142: warning: receiver name a should be consistent with previous receiver name m for Matrix (golint)
    • Line 149: warning: exported method Matrix.MulRay should have comment or be unexported (golint)
    • Line 149: warning: receiver name a should be consistent with previous receiver name m for Matrix (golint)
    • Line 153: warning: exported method Matrix.MulBox should have comment or be unexported (golint)
    • Line 153: warning: receiver name a should be consistent with previous receiver name m for Matrix (golint)
    • Line 173: warning: exported method Matrix.Transpose should have comment or be unexported (golint)
    • Line 173: warning: receiver name a should be consistent with previous receiver name m for Matrix (golint)
    • Line 181: warning: exported method Matrix.Determinant should have comment or be unexported (golint)
    • Line 181: warning: receiver name a should be consistent with previous receiver name m for Matrix (golint)
    • Line 196: warning: exported method Matrix.Inverse should have comment or be unexported (golint)
    • Line 196: warning: receiver name a should be consistent with previous receiver name m for Matrix (golint)
    • pt/pt/obj.go
    • Line 21: warning: exported function LoadOBJ should have comment or be unexported (golint)
    • Line 96: warning: exported function LoadMTL should have comment or be unexported (golint)
    • pt/pt/scene.go
    • Line 5: warning: exported type Scene should have comment or be unexported (golint)
    • Line 15: warning: exported method Scene.Compile should have comment or be unexported (golint)
    • Line 24: warning: exported method Scene.Add should have comment or be unexported (golint)
    • Line 31: warning: exported method Scene.RayCount should have comment or be unexported (golint)
    • Line 35: warning: exported method Scene.Intersect should have comment or be unexported (golint)
    • pt/cmd/despeckle/despeckle.go
    • Line 15: warning: exported var Threshold should have comment or be unexported (golint)
    • Line 16: warning: exported var Count should have comment or be unexported (golint)
    • Line 29: warning: exported type Fix should have comment or be unexported (golint)
    • pt/pt/sh.go
    • Line 5: warning: exported type SphericalHarmonic should have comment or be unexported (golint)
    • Line 12: warning: exported function NewSphericalHarmonic should have comment or be unexported (golint)
    • Line 21: warning: exported method SphericalHarmonic.Compile should have comment or be unexported (golint)
    • Line 25: warning: exported method SphericalHarmonic.BoundingBox should have comment or be unexported (golint)
    • Line 30: warning: exported method SphericalHarmonic.Intersect should have comment or be unexported (golint)
    • Line 39: warning: exported method SphericalHarmonic.UV should have comment or be unexported (golint)
    • Line 43: warning: exported method SphericalHarmonic.MaterialAt should have comment or be unexported (golint)
    • Line 47: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 52: warning: exported method SphericalHarmonic.NormalAt should have comment or be unexported (golint)
    • Line 63: warning: exported method SphericalHarmonic.EvaluateHarmonic should have comment or be unexported (golint)
    • Line 67: warning: exported method SphericalHarmonic.Evaluate should have comment or be unexported (golint)
    • pt/pt/sampler.go
    • Line 8: warning: exported type LightMode should have comment or be unexported (golint)
    • Line 11: warning: exported const LightModeRandom should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported type SpecularMode should have comment or be unexported (golint)
    • Line 18: warning: exported const SpecularModeNaive should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type BounceType should have comment or be unexported (golint)
    • Line 26: warning: exported const BounceTypeAny should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported type Sampler should have comment or be unexported (golint)
    • Line 35: warning: exported function NewSampler should have comment or be unexported (golint)
    • Line 39: warning: exported function NewDirectSampler should have comment or be unexported (golint)
    • Line 43: warning: exported type DefaultSampler should have comment or be unexported (golint)
    • Line 52: warning: exported method DefaultSampler.Sample should have comment or be unexported (golint)
    • Line 136: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • pt/pt/texture.go
    • Line 9: warning: exported type Texture should have comment or be unexported (golint)
    • Line 23: warning: exported function GetTexture should have comment or be unexported (golint)
    • Line 34: warning: exported function LoadTexture should have comment or be unexported (golint)
    • Line 43: warning: exported type ColorTexture should have comment or be unexported (golint)
    • Line 49: warning: exported function NewTexture should have comment or be unexported (golint)
    • Line 61: warning: exported method ColorTexture.Pow should have comment or be unexported (golint)
    • Line 68: warning: exported method ColorTexture.MulScalar should have comment or be unexported (golint)
    • Line 102: warning: exported method ColorTexture.Sample should have comment or be unexported (golint)
    • Line 108: warning: exported method ColorTexture.NormalSample should have comment or be unexported (golint)
    • Line 113: warning: exported method ColorTexture.BumpSample should have comment or be unexported (golint)
    • pt/pt/triangle.go
    • Line 3: warning: exported type Triangle should have comment or be unexported (golint)
    • Line 10: warning: exported function NewTriangle should have comment or be unexported (golint)
    • Line 23: warning: exported method Triangle.Vertices should have comment or be unexported (golint)
    • Line 27: warning: exported method Triangle.Compile should have comment or be unexported (golint)
    • Line 30: warning: exported method Triangle.BoundingBox should have comment or be unexported (golint)
    • Line 36: warning: exported method Triangle.Intersect should have comment or be unexported (golint)
    • Line 72: warning: exported method Triangle.UV should have comment or be unexported (golint)
    • Line 81: warning: exported method Triangle.MaterialAt should have comment or be unexported (golint)
    • Line 85: warning: exported method Triangle.NormalAt should have comment or be unexported (golint)
    • Line 131: warning: exported method Triangle.Area should have comment or be unexported (golint)
    • Line 138: warning: exported method Triangle.Normal should have comment or be unexported (golint)
    • Line 144: warning: exported method Triangle.Barycentric should have comment or be unexported (golint)
    • Line 160: warning: exported method Triangle.FixNormals should have comment or be unexported (golint)
    • pt/pt/util.go
    • Line 6: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 16: warning: exported function Radians should have comment or be unexported (golint)
    • Line 20: warning: exported function Degrees should have comment or be unexported (golint)
    • Line 24: warning: exported function Cone should have comment or be unexported (golint)
    • Line 43: warning: exported function LoadImage should have comment or be unexported (golint)
    • Line 53: warning: exported function SavePNG should have comment or be unexported (golint)
    • Line 62: warning: exported function Median should have comment or be unexported (golint)
    • Line 76: warning: exported function DurationString should have comment or be unexported (golint)
    • Line 83: warning: exported function NumberString should have comment or be unexported (golint)
    • Line 94: warning: exported function ParseFloats should have comment or be unexported (golint)
    • Line 103: warning: exported function ParseInts should have comment or be unexported (golint)
    • Line 112: warning: exported function RelativePath should have comment or be unexported (golint)
    • Line 117: warning: exported function Fract should have comment or be unexported (golint)
    • Line 122: warning: exported function Clamp should have comment or be unexported (golint)
    • Line 132: warning: exported function ClampInt should have comment or be unexported (golint)
    • pt/pt/mc.go
    • Line 5: warning: exported function NewSDFMesh should have comment or be unexported (golint)

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.

    • pt/pt/sh.go
    • Line 199: warning: cyclomatic complexity 51 of function shFunc() is high (> 15) (gocyclo)
    • pt/pt/sampler.go
    • Line 56: warning: cyclomatic complexity 18 of function (*DefaultSampler).sample() is high (> 15) (gocyclo)
    • pt/pt/tree.go
    • Line 43: warning: cyclomatic complexity 17 of function (*Node).Intersect() is high (> 15) (gocyclo)

ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


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!