Preparing report...

Report for github.com/arl/go-detour

A+    Excellent!    Found 22 issues across 51 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!


golint68%

Golint is a linter for Go source code.

    • go-detour/detour/mesh.go
    • Line 414: warning: comment on exported method NavMesh.RemoveTile should be of the form "RemoveTile ..." (golint)
    • Line 1523: warning: exported method NavMesh.TileByRef should have comment or be unexported (golint)
    • go-detour/recast/heightfield.go
    • Line 46: warning: comment on exported function NewHeightfield should be of the form "NewHeightfield ..." (golint)
    • Line 60: warning: exported method Heightfield.Free should have comment or be unexported (golint)
    • Line 229: warning: exported method Heightfield.GetHeightFieldSpanCount should have comment or be unexported (golint)
    • go-detour/recast/inputgeom.go
    • Line 14: warning: exported type ConvexVolume should have comment or be unexported (golint)
    • Line 21: warning: exported type BuildSettings should have comment or be unexported (golint)
    • Line 126: warning: comment on exported method InputGeom.MeshBoundsMax should be of the form "MeshBoundsMax ..." (golint)
    • Line 179: warning: comment on exported method InputGeom.OffMeshConnectionAreas should be of the form "OffMeshConnectionAreas ..." (golint)
    • Line 185: warning: comment on exported method InputGeom.OffMeshConnectionFlags should be of the form "OffMeshConnectionFlags ..." (golint)
    • Line 191: warning: comment on exported method InputGeom.OffMeshConnectionId should be of the form "OffMeshConnectionId ..." (golint)
    • Line 197: warning: comment on exported method InputGeom.OffMeshConnectionDirs should be of the form "OffMeshConnectionDirs ..." (golint)
    • Line 203: warning: comment on exported method InputGeom.OffMeshConnectionCount should be of the form "OffMeshConnectionCount ..." (golint)
    • go-detour/sample/tilemesh/builder.go
    • Line 532: warning: exported method TileMesh.BuildTile should have comment or be unexported (golint)
    • Line 567: warning: exported method TileMesh.TilePos should have comment or be unexported (golint)
    • Line 574: warning: exported method TileMesh.RemoveTile should have comment or be unexported (golint)
    • go-detour/detour/query.go
    • Line 19: warning: comment on exported const RaycastUseCosts should be of the form "RaycastUseCosts ..." (golint)
    • Line 23: warning: comment on exported const FindPathAnyAngle should be of the form "FindPathAnyAngle ..." (golint)
    • Line 28: warning: comment on exported const RaycastLimitProportions should be of the form "RaycastLimitProportions ..." (golint)
    • Line 1391: warning: comment on exported method NavMeshQuery.Raycast should be of the form "Raycast ..." (golint)
    • Line 1720: warning: comment on exported method NavMeshQuery.InitSlicedFindPath should be of the form "InitSlicedFindPath ..." (golint)
    • Line 1809: warning: comment on exported method NavMeshQuery.UpdateSlicedFindPath should be of the form "UpdateSlicedFindPath ..." (golint)
    • Line 2039: warning: comment on exported method NavMeshQuery.FinalizeSlicedFindPath should be of the form "FinalizeSlicedFindPath ..." (golint)
    • Line 2134: warning: comment on exported method NavMeshQuery.FinalizeSlicedFindPathPartial should be of the form "FinalizeSlicedFindPathPartial ..." (golint)
    • go-detour/recast/mesh.go
    • Line 3: warning: exported type Edge should have comment or be unexported (golint)
    • Line 97: warning: exported const VERTEX_BUCKET_COUNT should have comment or be unexported (golint)
    • go-detour/recast/meshdetail.go
    • Line 12: warning: comment on exported type PolyMeshDetail should be of the form "PolyMeshDetail ..." (with optional leading article) (golint)
    • Line 23: warning: exported method PolyMeshDetail.Free should have comment or be unexported (golint)
    • Line 35: warning: exported type HeightPatch should have comment or be unexported (golint)
    • Line 296: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-detour/recast/meshloaderobj.go
    • Line 10: warning: exported type MeshLoaderOBJ should have comment or be unexported (golint)
    • Line 17: warning: exported function NewMeshLoaderOBJ should have comment or be unexported (golint)
    • Line 26: warning: exported method MeshLoaderOBJ.Load should have comment or be unexported (golint)
    • Line 89: warning: exported method MeshLoaderOBJ.Scale should have comment or be unexported (golint)
    • Line 93: warning: exported method MeshLoaderOBJ.Verts should have comment or be unexported (golint)
    • Line 97: warning: exported method MeshLoaderOBJ.Tris should have comment or be unexported (golint)
    • Line 101: warning: exported method MeshLoaderOBJ.Normals should have comment or be unexported (golint)
    • Line 105: warning: exported method MeshLoaderOBJ.VertCount should have comment or be unexported (golint)
    • Line 109: warning: exported method MeshLoaderOBJ.TriCount should have comment or be unexported (golint)
    • go-detour/recast/recast_test.go
    • Line 179: warning: don't use underscores in Go names; var walkable_tri should be walkableTri (golint)
    • Line 180: warning: don't use underscores in Go names; var unwalkable_tri should be unwalkableTri (golint)
    • Line 226: warning: don't use underscores in Go names; var walkable_tri should be walkableTri (golint)
    • Line 227: warning: don't use underscores in Go names; var unwalkable_tri should be unwalkableTri (golint)
    • go-detour/recast/chunkytrimesh.go
    • Line 9: warning: exported type ChunkyTriMeshNode should have comment or be unexported (golint)
    • Line 15: warning: exported type ChunkyTriMesh should have comment or be unexported (golint)
    • Line 23: warning: exported type BoundsItem should have comment or be unexported (golint)
    • Line 204: warning: comment on exported method ChunkyTriMesh.ChunksOverlappingRect should be of the form "ChunksOverlappingRect ..." (golint)

gocyclo70%

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.

    • go-detour/recast/contour.go
    • Line 537: warning: cyclomatic complexity 43 of function simplifyContour() is high (> 15) (gocyclo)
    • Line 204: warning: cyclomatic complexity 39 of function BuildContours() is high (> 15) (gocyclo)
    • go-detour/recast/mesh.go
    • Line 547: warning: cyclomatic complexity 50 of function removeVertex() is high (> 15) (gocyclo)
    • Line 9: warning: cyclomatic complexity 20 of function buildMeshAdjacency() is high (> 15) (gocyclo)
    • Line 200: warning: cyclomatic complexity 18 of function triangulate() is high (> 15) (gocyclo)
    • Line 455: warning: cyclomatic complexity 17 of function canRemoveVertex() is high (> 15) (gocyclo)
    • go-detour/detour/query.go
    • Line 1817: warning: cyclomatic complexity 41 of function (*NavMeshQuery).UpdateSlicedFindPath() is high (> 15) (gocyclo)
    • Line 419: warning: cyclomatic complexity 36 of function (*NavMeshQuery).FindStraightPath() is high (> 15) (gocyclo)
    • Line 1441: warning: cyclomatic complexity 34 of function (*NavMeshQuery).Raycast() is high (> 15) (gocyclo)
    • Line 180: warning: cyclomatic complexity 30 of function (*NavMeshQuery).FindPath() is high (> 15) (gocyclo)
    • Line 1230: warning: cyclomatic complexity 16 of function (*NavMeshQuery).queryPolygonsInTile() is high (> 15) (gocyclo)
    • Line 2149: warning: cyclomatic complexity 16 of function (*NavMeshQuery).FinalizeSlicedFindPathPartial() is high (> 15) (gocyclo)
    • go-detour/recast/meshdetail.go
    • Line 803: warning: cyclomatic complexity 35 of function buildPolyDetail() is high (> 15) (gocyclo)
    • Line 1053: warning: cyclomatic complexity 30 of function seedArrayWithPolyCenter() is high (> 15) (gocyclo)
    • Line 340: warning: cyclomatic complexity 22 of function BuildPolyMeshDetail() is high (> 15) (gocyclo)
    • Line 1221: warning: cyclomatic complexity 20 of function getHeightData() is high (> 15) (gocyclo)
    • Line 640: warning: cyclomatic complexity 19 of function delaunayHull() is high (> 15) (gocyclo)
    • Line 185: warning: cyclomatic complexity 16 of function getHeight() is high (> 15) (gocyclo)
    • go-detour/recast/area.go
    • Line 24: warning: cyclomatic complexity 34 of function ErodeWalkableArea() is high (> 15) (gocyclo)
    • Line 215: warning: cyclomatic complexity 17 of function MarkConvexPolyArea() is high (> 15) (gocyclo)
    • go-detour/recast/region.go
    • Line 893: warning: cyclomatic complexity 65 of function mergeAndFilterRegions() is high (> 15) (gocyclo)
    • Line 40: warning: cyclomatic complexity 26 of function BuildRegionsMonotone() is high (> 15) (gocyclo)
    • Line 488: warning: cyclomatic complexity 23 of function expandRegions() is high (> 15) (gocyclo)
    • Line 383: warning: cyclomatic complexity 20 of function floodRegion() is high (> 15) (gocyclo)
    • Line 211: warning: cyclomatic complexity 16 of function BuildRegions() is high (> 15) (gocyclo)

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!


misspell92%

Misspell Finds commonly misspelled English words