Preparing report...

Report for github.com/buckhx/diglet

A    Great!    Found 39 issues across 46 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.


golint15%

Golint is a linter for Go source code.

    • diglet/mbt/geojson.go
    • Line 15: warning: exported type GeojsonSource should have comment or be unexported (golint)
    • Line 20: warning: exported function NewGeojsonSource should have comment or be unexported (golint)
    • Line 33: warning: exported method GeojsonSource.Publish should have comment or be unexported (golint)
    • diglet/burrow/methods.go
    • Line 3: warning: exported type Param should have comment or be unexported (golint)
    • Line 10: warning: exported method Param.GetInt should have comment or be unexported (golint)
    • Line 15: warning: exported method Param.GetUint should have comment or be unexported (golint)
    • Line 20: warning: exported method Param.GetString should have comment or be unexported (golint)
    • Line 24: warning: exported method Param.Validate should have comment or be unexported (golint)
    • Line 28: warning: exported type MethodHandler should have comment or be unexported (golint)
    • Line 30: warning: exported type MethodParams should have comment or be unexported (golint)
    • Line 32: warning: exported type Method should have comment or be unexported (golint)
    • Line 40: warning: exported method Method.WrapParams should have comment or be unexported (golint)
    • Line 46: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 61: warning: exported method Method.Execute should have comment or be unexported (golint)
    • diglet/tms/cache.go
    • Line 13: warning: exported type TileCache should have comment or be unexported (golint)
    • Line 17: warning: exported function InitTileCache should have comment or be unexported (golint)
    • Line 23: warning: exported method TileCache.GetTile should have comment or be unexported (golint)
    • Line 32: warning: exported method TileCache.PutTile should have comment or be unexported (golint)
    • Line 40: warning: exported method TileCache.MapTiles should have comment or be unexported (golint)
    • Line 66: warning: exported type Cache should have comment or be unexported (golint)
    • Line 71: warning: exported function InitCache should have comment or be unexported (golint)
    • Line 77: warning: exported method Cache.Get should have comment or be unexported (golint)
    • Line 90: warning: exported method Cache.Put should have comment or be unexported (golint)
    • Line 102: warning: exported method Cache.Map should have comment or be unexported (golint)
    • Line 121: warning: exported method Cache.DropBucket should have comment or be unexported (golint)
    • Line 130: warning: exported method Cache.Close should have comment or be unexported (golint)
    • Line 134: warning: exported method Cache.Destroy should have comment or be unexported (golint)
    • diglet/geo/feature.go
    • Line 6: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 10: warning: exported const PolygonFeature should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported type Feature should have comment or be unexported (golint)
    • Line 22: warning: exported function NewFeature should have comment or be unexported (golint)
    • Line 27: warning: exported function NewPolygonFeature should have comment or be unexported (golint)
    • Line 31: warning: exported function NewLineFeature should have comment or be unexported (golint)
    • Line 35: warning: exported function NewPointFeature should have comment or be unexported (golint)
    • Line 39: warning: exported function MakeFeature should have comment or be unexported (golint)
    • Line 43: warning: exported method Feature.AddShape should have comment or be unexported (golint)
    • Line 47: warning: exported method Feature.Tags should have comment or be unexported (golint)
    • Line 51: warning: exported method Feature.Center should have comment or be unexported (golint)
    • Line 66: warning: comment on exported method Feature.Contains should be of the form "Contains ..." (golint)
    • diglet/geo/shape.go
    • Line 9: warning: exported type Shape should have comment or be unexported (golint)
    • Line 13: warning: exported function MakeShape should have comment or be unexported (golint)
    • Line 17: warning: exported function NewShape should have comment or be unexported (golint)
    • Line 21: warning: comment on exported function ShapeFromString should be of the form "ShapeFromString ..." (golint)
    • Line 40: warning: exported method Shape.Append should have comment or be unexported (golint)
    • Line 44: warning: exported method Shape.Add should have comment or be unexported (golint)
    • Line 48: warning: exported method Shape.BoundingBox should have comment or be unexported (golint)
    • Line 70: warning: exported method Shape.Contains should have comment or be unexported (golint)
    • Line 74: warning: exported method Shape.Head should have comment or be unexported (golint)
    • Line 78: warning: exported method Shape.Tail should have comment or be unexported (golint)
    • Line 82: warning: comment on exported method Shape.IsClosed should be of the form "IsClosed ..." (golint)
    • Line 90: warning: exported method Shape.Reverse should have comment or be unexported (golint)
    • Line 101: warning: exported method Shape.Edges should have comment or be unexported (golint)
    • Line 115: warning: comment on exported method Shape.Length should be of the form "Length ..." (golint)
    • Line 120: warning: exported method Shape.IsClockwise should have comment or be unexported (golint)
    • Line 152: warning: exported type Box should have comment or be unexported (golint)
    • Line 156: warning: exported function NewBox should have comment or be unexported (golint)
    • Line 165: warning: exported method Box.SouthWest should have comment or be unexported (golint)
    • Line 169: warning: exported method Box.NorthEast should have comment or be unexported (golint)
    • Line 173: warning: exported method Box.Contains should have comment or be unexported (golint)
    • diglet/mbt/mvt/layer.go
    • Line 10: warning: exported const VT_VERSION should have comment or be unexported (golint)
    • Line 12: warning: exported type Layer should have comment or be unexported (golint)
    • Line 13: warning: don't use underscores in Go names; struct field vt_layer should be vtLayer (golint)
    • Line 21: warning: don't use underscores in Go names; var vt_layer should be vtLayer (golint)
    • Line 36: warning: exported method Layer.AddFeature should have comment or be unexported (golint)
    • Line 39: warning: don't use underscores in Go names; var vt_feature should be vtFeature (golint)
    • Line 59: warning: don't use underscores in Go names; var vt_val should be vtVal (golint)
    • Line 72: warning: don't use underscores in Go names; func result vt_val should be vtVal (golint)
    • diglet/tms/app.go
    • Line 1: warning: package comment should be of the form "Package tms ..." (golint)
    • Line 14: warning: exported const GetTile should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported function MBTServer should have comment or be unexported (golint)
    • diglet/tms/hub.go
    • Line 12: warning: comment on exported type TilesetTopic should be of the form "TilesetTopic ..." (with optional leading article) (golint)
    • Line 69: warning: exported type IoHub should have comment or be unexported (golint)
    • Line 114: warning: exported function NewHub should have comment or be unexported (golint)
    • diglet/geo/coordinate.go
    • Line 15: warning: exported const EarthRad should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type Coordinate should have comment or be unexported (golint)
    • Line 24: warning: exported method Coordinate.X should have comment or be unexported (golint)
    • Line 28: warning: exported method Coordinate.Y should have comment or be unexported (golint)
    • Line 32: warning: exported method Coordinate.Difference should have comment or be unexported (golint)
    • Line 39: warning: receiver name cd should be consistent with previous receiver name c for Coordinate (golint)
    • Line 48: warning: exported method Coordinate.ToRad should have comment or be unexported (golint)
    • Line 52: warning: exported method Coordinate.ToTile should have comment or be unexported (golint)
    • diglet/geo/geojson.go
    • Line 11: warning: exported type GeojsonSource should have comment or be unexported (golint)
    • Line 16: warning: exported function NewGeojsonSource should have comment or be unexported (golint)
    • Line 29: warning: exported method GeojsonSource.Publish should have comment or be unexported (golint)
    • Line 34: warning: comment on exported function GeojsonFeatureAdapter should be of the form "GeojsonFeatureAdapter ..." (golint)
    • Line 110: warning: exported function UnmarshalGeojsonFeature should have comment or be unexported (golint)
    • diglet/geo/rtree.go
    • Line 9: warning: exported var RtreeMinChildren should have comment or be unexported (golint)
    • Line 14: warning: exported type Rtree should have comment or be unexported (golint)
    • Line 18: warning: exported function NewRtree should have comment or be unexported (golint)
    • Line 24: warning: exported method Rtree.Insert should have comment or be unexported (golint)
    • Line 29: warning: exported method Rtree.Intersections should have comment or be unexported (golint)
    • Line 43: warning: exported method Rtree.Contains should have comment or be unexported (golint)
    • Line 49: warning: exported type Rnode should have comment or be unexported (golint)
    • Line 54: warning: exported method Rnode.Feature should have comment or be unexported (golint)
    • Line 58: warning: exported method Rnode.Value should have comment or be unexported (golint)
    • Line 62: warning: comment on exported method Rnode.Bounds should be of the form "Bounds ..." (golint)
    • diglet/burrow/routes.go
    • Line 9: warning: exported type Route should have comment or be unexported (golint)
    • Line 14: warning: exported type RouteHandler should have comment or be unexported (golint)
    • Line 19: warning: exported method RouteHandler.Subrouter should have comment or be unexported (golint)
    • Line 27: warning: exported method RouteHandler.MountMethods should have comment or be unexported (golint)
    • Line 50: warning: exported method RouteHandler.MountHelp should have comment or be unexported (golint)
    • Line 73: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 81: warning: exported type HTTPHandler should have comment or be unexported (golint)
    • Line 106: warning: exported method RouteHandler.MountRpc should have comment or be unexported (golint)
    • Line 143: warning: exported method RouteHandler.MountIo should have comment or be unexported (golint)
    • Line 174: warning: exported type RequestContext should have comment or be unexported (golint)
    • Line 182: warning: exported method RequestContext.Render should have comment or be unexported (golint)
    • Line 194: warning: exported method RouteHandler.MountRoutes should have comment or be unexported (golint)
    • Line 194: warning: receiver name r should be consistent with previous receiver name h for RouteHandler (golint)
    • Line 205: warning: exported function VarsInterface should have comment or be unexported (golint)
    • diglet/burrow/server.go
    • Line 11: warning: exported type App should have comment or be unexported (golint)
    • Line 22: warning: exported method App.Run should have comment or be unexported (golint)
    • Line 32: warning: exported method App.RunTLS should have comment or be unexported (golint)
    • Line 38: warning: exported function NewApp should have comment or be unexported (golint)
    • Line 82: warning: exported method App.GetPort should have comment or be unexported (golint)
    • diglet/mbt/mvt/point.go
    • Line 5: warning: exported type Point should have comment or be unexported (golint)
    • Line 9: warning: exported method Point.Add should have comment or be unexported (golint)
    • Line 15: warning: exported method Point.Subtract should have comment or be unexported (golint)
    • Line 21: warning: exported method Point.Increment should have comment or be unexported (golint)
    • Line 25: warning: exported method Point.Decrement should have comment or be unexported (golint)
    • Line 29: warning: exported type CursorType should have comment or be unexported (golint)
    • Line 32: warning: exported const AbsCur should have comment (or a comment on this block) or be unexported (golint)
    • diglet/geo/osm/excavator.go
    • Line 11: warning: exported type Excavator should have comment or be unexported (golint)
    • Line 26: warning: exported function NewExcavator should have comment or be unexported (golint)
    • Line 65: warning: exported method Excavator.Start should have comment or be unexported (golint)
    • Line 90: warning: exported method Excavator.Restart should have comment or be unexported (golint)
    • Line 99: warning: exported method Excavator.Reset should have comment or be unexported (golint)
    • Line 105: warning: exported method Excavator.Errors should have comment or be unexported (golint)
    • Line 159: warning: exported method Excavator.Close should have comment or be unexported (golint)
    • diglet/mbt/mvt/box.go
    • Line 5: warning: exported type Box should have comment or be unexported (golint)
    • Line 9: warning: exported function NewBox should have comment or be unexported (golint)
    • Line 18: warning: exported method Box.Contains should have comment or be unexported (golint)
    • Line 60: warning: exported method Box.ToShape should have comment or be unexported (golint)
    • diglet/mbt/mvt/geometry.go
    • Line 9: warning: exported const MoveTo should have comment (or a comment on this block) or be unexported (golint)
    • Line 14: warning: exported type Geometry should have comment or be unexported (golint)
    • Line 15: warning: don't use underscores in Go names; struct field vt_type should be vtType (golint)
    • Line 20: warning: don't use underscores in Go names; func parameter vt_type should be vtType (golint)
    • Line 27: warning: don't use underscores in Go names; func parameter vt_type should be vtType (golint)
    • diglet/mbt/cmd.go
    • Line 1: warning: package comment should be of the form "Package mbt ..." (golint)
    • Line 14: warning: exported var CsvExt should have comment or be unexported (golint)
    • Line 19: warning: exported var Cmd should have comment or be unexported (golint)
    • diglet/mbt/mvt/shape.go
    • Line 10: warning: exported type Shape should have comment or be unexported (golint)
    • Line 16: warning: exported function NewShape should have comment or be unexported (golint)
    • Line 20: warning: exported function MakeShape should have comment or be unexported (golint)
    • Line 24: warning: exported function NewPointShape should have comment or be unexported (golint)
    • Line 28: warning: exported function NewLine should have comment or be unexported (golint)
    • Line 32: warning: exported function NewPolygon should have comment or be unexported (golint)
    • Line 36: warning: exported method Shape.Insert should have comment or be unexported (golint)
    • Line 39: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 47: warning: exported method Shape.Delete should have comment or be unexported (golint)
    • Line 54: warning: exported method Shape.Append should have comment or be unexported (golint)
    • Line 58: warning: exported method Shape.Head should have comment or be unexported (golint)
    • Line 62: warning: exported method Shape.Tail should have comment or be unexported (golint)
    • Line 66: warning: exported method Shape.Len should have comment or be unexported (golint)
    • Line 70: warning: exported method Shape.GetPoints should have comment or be unexported (golint)
    • Line 74: warning: exported method Shape.GetCursorType should have comment or be unexported (golint)
    • Line 83: warning: exported method Shape.ToCommands should have comment or be unexported (golint)
    • Line 129: warning: exported method Shape.Equals should have comment or be unexported (golint)
    • diglet/util/format.go
    • Line 11: warning: exported function Slug should have comment or be unexported (golint)
    • Line 15: warning: exported function Slugged should have comment or be unexported (golint)
    • Line 19: warning: comment on exported function SlugBase should be of the form "SlugBase ..." (golint)
    • diglet/util/logger.go
    • Line 8: warning: exported var DEBUG should have comment or be unexported (golint)
    • Line 10: warning: exported function Info should have comment or be unexported (golint)
    • Line 14: warning: exported function Debug should have comment or be unexported (golint)
    • Line 20: warning: exported function Warn should have comment or be unexported (golint)
    • Line 26: warning: exported function Error should have comment or be unexported (golint)
    • Line 30: warning: exported function Fatal should have comment or be unexported (golint)
    • Line 35: warning: exported function Check should have comment or be unexported (golint)
    • Line 41: warning: exported function Checks should have comment or be unexported (golint)
    • Line 47: warning: exported function Printf should have comment or be unexported (golint)
    • Line 51: warning: exported function Println should have comment or be unexported (golint)
    • Line 55: warning: exported function Sprintf should have comment or be unexported (golint)
    • Line 59: warning: exported function Errorf should have comment or be unexported (golint)
    • diglet/burrow/message.go
    • Line 10: warning: exported const RpcVersion should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type RequestMessage should have comment or be unexported (golint)
    • Line 26: warning: exported method RequestMessage.Validate should have comment or be unexported (golint)
    • Line 43: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 48: warning: exported method RequestMessage.MethodName should have comment or be unexported (golint)
    • Line 52: warning: exported function LoadRequestMessage should have comment or be unexported (golint)
    • Line 62: warning: exported function ReadRequestMessage should have comment or be unexported (golint)
    • Line 71: warning: exported type ResponseMessage should have comment or be unexported (golint)
    • Line 78: warning: exported method ResponseMessage.Marshal should have comment or be unexported (golint)
    • Line 82: warning: exported type CodedError should have comment or be unexported (golint)
    • Line 92: warning: exported method CodedError.ResponseMessage should have comment or be unexported (golint)
    • Line 116: warning: exported function Cerrorf should have comment or be unexported (golint)
    • Line 124: warning: comment on exported function RespondMsg should be of the form "RespondMsg ..." (golint)
    • Line 135: warning: exported function SuccessMsg should have comment or be unexported (golint)
    • diglet/mbt/mvt/tile.go
    • Line 5: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 8: warning: exported type TileAdapter should have comment or be unexported (golint)
    • Line 14: warning: exported function NewTileAdapter should have comment or be unexported (golint)
    • Line 24: warning: exported method TileAdapter.NewLayer should have comment or be unexported (golint)
    • Line 30: warning: exported method TileAdapter.GetTile should have comment or be unexported (golint)
    • Line 34: warning: exported method TileAdapter.GetTileBytes should have comment or be unexported (golint)
    • Line 38: warning: exported method TileAdapter.GetTileGz should have comment or be unexported (golint)
    • diglet/cli.go
    • Line 16: warning: exported var Version should have comment or be unexported (golint)
    • diglet/mbt/tiles.go
    • Line 14: warning: exported type Tileset should have comment or be unexported (golint)
    • Line 19: warning: exported function InitTiles should have comment or be unexported (golint)
    • Line 41: warning: exported method Tileset.Build should have comment or be unexported (golint)
    • Line 103: warning: comment on exported function ShapeTiles should be of the form "ShapeTiles ..." (golint)
    • diglet/geo/fence.go
    • Line 3: warning: exported type Fence should have comment or be unexported (golint)
    • Line 9: warning: exported type Rfence should have comment or be unexported (golint)
    • Line 13: warning: exported function NewRfence should have comment or be unexported (golint)
    • Line 19: warning: exported method Rfence.Add should have comment or be unexported (golint)
    • Line 25: warning: exported method Rfence.Get should have comment or be unexported (golint)
    • Line 34: warning: exported method Rfence.Size should have comment or be unexported (golint)
    • Line 38: warning: exported type BruteFence should have comment or be unexported (golint)
    • Line 42: warning: exported function NewBruteFence should have comment or be unexported (golint)
    • Line 46: warning: exported method BruteFence.Add should have comment or be unexported (golint)
    • Line 50: warning: exported method BruteFence.Get should have comment or be unexported (golint)
    • Line 62: warning: exported method BruteFence.Size should have comment or be unexported (golint)
    • diglet/geo/osm/types.go
    • Line 4: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 31: warning: exported function MarshalAddrIndex should have comment or be unexported (golint)
    • Line 40: warning: exported function UnmarshalNids should have comment or be unexported (golint)
    • Line 45: warning: exported type Node should have comment or be unexported (golint)
    • Line 49: warning: exported function UnmarshalNode should have comment or be unexported (golint)
    • Line 54: warning: exported method Node.IsAddressable should have comment or be unexported (golint)
    • Line 58: warning: exported method Node.Key should have comment or be unexported (golint)
    • Line 66: warning: exported method Node.Keyed should have comment or be unexported (golint)
    • Line 78: warning: exported method Node.GetID should have comment or be unexported (golint)
    • Line 82: warning: exported method Node.Valid should have comment or be unexported (golint)
    • Line 86: warning: exported type Way should have comment or be unexported (golint)
    • Line 90: warning: exported method Way.IsSubregionBoundary should have comment or be unexported (golint)
    • Line 94: warning: exported method Way.IsAddressable should have comment or be unexported (golint)
    • Line 98: warning: exported function UnmarshalWay should have comment or be unexported (golint)
    • Line 103: warning: exported method Way.Key should have comment or be unexported (golint)
    • Line 111: warning: exported method Way.Keyed should have comment or be unexported (golint)
    • Line 123: warning: exported method Way.Valid should have comment or be unexported (golint)
    • Line 127: warning: exported type Relation should have comment or be unexported (golint)
    • Line 131: warning: exported function UnmarshalRelation should have comment or be unexported (golint)
    • Line 136: warning: exported method Relation.IsSubregionBoundary should have comment or be unexported (golint)
    • Line 140: warning: exported method Relation.Key should have comment or be unexported (golint)
    • Line 148: warning: exported method Relation.Keyed should have comment or be unexported (golint)
    • Line 160: warning: exported method Relation.Valid should have comment or be unexported (golint)
    • Line 164: warning: exported function MarshalID should have comment or be unexported (golint)
    • Line 169: warning: exported var NodeType should have comment or be unexported (golint)
    • diglet/mbt/mvt/feature.go
    • Line 10: warning: exported type Feature should have comment or be unexported (golint)
    • Line 18: warning: exported function NewFeatureAdapter should have comment or be unexported (golint)
    • Line 18: warning: don't use underscores in Go names; func parameter geometry_type should be geometryType (golint)
    • Line 34: warning: exported method Feature.AddShape should have comment or be unexported (golint)
    • Line 38: warning: exported method Feature.Valid should have comment or be unexported (golint)
    • diglet/burrow/connection.go
    • Line 16: warning: comment on exported type Connection should be of the form "Connection ..." (with optional leading article) (golint)
    • Line 27: warning: exported method Connection.Close should have comment or be unexported (golint)
    • Line 36: warning: exported method Connection.Respond should have comment or be unexported (golint)
    • Line 83: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 121: warning: exported function NewConnection should have comment or be unexported (golint)
    • diglet/tms/tileset.go
    • Line 15: warning: exported type TsOp should have comment or be unexported (golint)
    • Line 18: warning: exported const Upsert should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported const CacheName should have comment or be unexported (golint)
    • Line 24: warning: exported type TsEvent should have comment or be unexported (golint)
    • Line 187: warning: exported type TileXYZ should have comment or be unexported (golint)
    • Line 198: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • diglet/mbt/csv.go
    • Line 14: warning: exported type FeatureSource should have comment or be unexported (golint)
    • Line 18: warning: exported type GeoFields should have comment or be unexported (golint)
    • Line 20: warning: exported method GeoFields.Validate should have comment or be unexported (golint)
    • Line 24: warning: exported method GeoFields.HasCoordinates should have comment or be unexported (golint)
    • Line 28: warning: exported method GeoFields.HasShape should have comment or be unexported (golint)
    • Line 32: warning: exported type CsvSource should have comment or be unexported (golint)
    • Line 40: warning: exported function NewCsvSource should have comment or be unexported (golint)
    • Line 60: warning: exported method CsvSource.Publish should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


misspell95%

Misspell Finds commonly misspelled English words