Preparing report...

Report for github.com/pilosa/pdk

A+    Excellent!    Found 27 issues across 94 files

Tweet

gofmt96%

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!


gocyclo87%

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.

    • pdk/usecase/ssb/cmd.go
    • Line 283: warning: cyclomatic complexity 18 of function parseLineOrder() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 16 of function (*Main).mapRecords() is high (> 15) (gocyclo)
    • pdk/ingest.go
    • Line 81: warning: cyclomatic complexity 16 of function (*Ingester).Run() is high (> 15) (gocyclo)
    • pdk/usecase/taxi/main.go
    • Line 375: warning: cyclomatic complexity 31 of function (*Main).parseMapAndPost() is high (> 15) (gocyclo)
    • Line 264: warning: cyclomatic complexity 18 of function (*Main).fetch() is high (> 15) (gocyclo)
    • pdk/parser.go
    • Line 293: warning: cyclomatic complexity 19 of function (*GenericParser).parseLit() is high (> 15) (gocyclo)
    • pdk/entity.go
    • Line 524: warning: cyclomatic complexity 17 of function ToBytes() is high (> 15) (gocyclo)
    • Line 604: warning: cyclomatic complexity 16 of function FromBytes() is high (> 15) (gocyclo)

golint86%

Golint is a linter for Go source code.

    • pdk/file/source.go
    • Line 103: warning: exported type RawSource should have comment or be unexported (golint)
    • Line 108: warning: exported function NewRawSource should have comment or be unexported (golint)
    • Line 142: warning: exported method RawSource.NextReader should have comment or be unexported (golint)
    • pdk/entity.go
    • Line 52: warning: exported type Context should have comment or be unexported (golint)
    • Line 63: warning: exported method Entity.Equal should have comment or be unexported (golint)
    • Line 116: warning: exported var ErrPathNotFound should have comment or be unexported (golint)
    • Line 187: warning: comment on exported method Entity.SetString should be of the form "SetString ..." (golint)
    • Line 214: warning: exported type Objects should have comment or be unexported (golint)
    • Line 243: warning: exported type B should have comment or be unexported (golint)
    • Line 247: warning: exported method B.MarshalJSON should have comment or be unexported (golint)
    • Line 255: warning: exported type S should have comment or be unexported (golint)
    • Line 293: warning: exported type Time should have comment or be unexported (golint)
    • Line 297: warning: exported type F32 should have comment or be unexported (golint)
    • Line 301: warning: exported method F32.MarshalJSON should have comment or be unexported (golint)
    • Line 309: warning: exported type F64 should have comment or be unexported (golint)
    • Line 313: warning: exported method F64.MarshalJSON should have comment or be unexported (golint)
    • Line 321: warning: exported type I should have comment or be unexported (golint)
    • Line 325: warning: exported method I.MarshalJSON should have comment or be unexported (golint)
    • Line 333: warning: exported method I.UnmarshalJSON should have comment or be unexported (golint)
    • Line 333: warning: receiver name i should be consistent with previous receiver name I for I (golint)
    • Line 342: warning: exported type I8 should have comment or be unexported (golint)
    • Line 346: warning: exported method I8.MarshalJSON should have comment or be unexported (golint)
    • Line 354: warning: exported method I8.UnmarshalJSON should have comment or be unexported (golint)
    • Line 354: warning: receiver name i should be consistent with previous receiver name I for I8 (golint)
    • Line 363: warning: exported type I16 should have comment or be unexported (golint)
    • Line 367: warning: exported method I16.MarshalJSON should have comment or be unexported (golint)
    • Line 375: warning: exported method I16.UnmarshalJSON should have comment or be unexported (golint)
    • Line 375: warning: receiver name i should be consistent with previous receiver name I for I16 (golint)
    • Line 384: warning: exported type I32 should have comment or be unexported (golint)
    • Line 388: warning: exported method I32.MarshalJSON should have comment or be unexported (golint)
    • Line 396: warning: exported method I32.UnmarshalJSON should have comment or be unexported (golint)
    • Line 396: warning: receiver name i should be consistent with previous receiver name I for I32 (golint)
    • Line 405: warning: exported type I64 should have comment or be unexported (golint)
    • Line 409: warning: exported method I64.MarshalJSON should have comment or be unexported (golint)
    • Line 417: warning: exported method I64.UnmarshalJSON should have comment or be unexported (golint)
    • Line 417: warning: receiver name i should be consistent with previous receiver name I for I64 (golint)
    • Line 426: warning: exported type U should have comment or be unexported (golint)
    • Line 430: warning: exported method U.MarshalJSON should have comment or be unexported (golint)
    • Line 438: warning: exported type U8 should have comment or be unexported (golint)
    • Line 442: warning: exported method U8.MarshalJSON should have comment or be unexported (golint)
    • Line 450: warning: exported type U16 should have comment or be unexported (golint)
    • Line 454: warning: exported method U16.MarshalJSON should have comment or be unexported (golint)
    • Line 462: warning: exported type U32 should have comment or be unexported (golint)
    • Line 466: warning: exported method U32.MarshalJSON should have comment or be unexported (golint)
    • Line 474: warning: exported type U64 should have comment or be unexported (golint)
    • Line 478: warning: exported method U64.MarshalJSON should have comment or be unexported (golint)
    • pdk/map.go
    • Line 80: warning: exported type DayOfMonthMapper should have comment or be unexported (golint)
    • Line 156: warning: exported type GridToFloatMapper should have comment or be unexported (golint)
    • Line 162: warning: exported method GridToFloatMapper.ID should have comment or be unexported (golint)
    • Line 174: warning: exported function NewGridToFloatMapper should have comment or be unexported (golint)
    • pdk/mapper.go
    • Line 170: warning: exported function Int64ize should have comment or be unexported (golint)
    • pdk/pilosa.go
    • Line 46: warning: exported type Index should have comment or be unexported (golint)
    • Line 173: warning: exported function NewRankedField should have comment or be unexported (golint)
    • Line 177: warning: exported function NewIntField should have comment or be unexported (golint)
    • Line 228: warning: exported function SetupPilosa should have comment or be unexported (golint)
    • Line 289: warning: exported type PilosaOption should have comment or be unexported (golint)
    • Line 291: warning: exported function OptPilosaImportOptions should have comment or be unexported (golint)
    • Line 298: warning: exported function OptPilosaClientOptions should have comment or be unexported (golint)
    • pdk/csv2/source.go
    • Line 13: warning: exported type Source should have comment or be unexported (golint)
    • Line 22: warning: exported function NewSourceFromRawSource should have comment or be unexported (golint)
    • Line 28: warning: exported method Source.Record should have comment or be unexported (golint)
    • pdk/aws/s3/s3.go
    • Line 184: warning: exported type RawSource should have comment or be unexported (golint)
    • Line 195: warning: exported function NewRawSource should have comment or be unexported (golint)
    • Line 242: warning: exported method RawSource.NextReader should have comment or be unexported (golint)
    • pdk/doc.go
    • Line 33: warning: package comment should be of the form "Package pdk ..." (golint)
    • pdk/source.go
    • Line 61: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 73: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 87: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • pdk/json/source.go
    • Line 41: warning: exported function NewSourceFromRawSource should have comment or be unexported (golint)
    • pdk/usecase/ssb/cmd.go
    • Line 234: warning: don't use underscores in Go names; struct field c_city should be cCity (golint)
    • Line 235: warning: don't use underscores in Go names; struct field c_nation should be cNation (golint)
    • Line 236: warning: don't use underscores in Go names; struct field c_region should be cRegion (golint)
    • Line 238: warning: don't use underscores in Go names; struct field s_city should be sCity (golint)
    • Line 239: warning: don't use underscores in Go names; struct field s_nation should be sNation (golint)
    • Line 240: warning: don't use underscores in Go names; struct field s_region should be sRegion (golint)
    • Line 242: warning: don't use underscores in Go names; struct field p_mfgr should be pMfgr (golint)
    • Line 243: warning: don't use underscores in Go names; struct field p_category should be pCategory (golint)
    • Line 244: warning: don't use underscores in Go names; struct field p_brand1 should be pBrand1 (golint)
    • Line 246: warning: don't use underscores in Go names; struct field order_month should be orderMonth (golint)
    • Line 247: warning: don't use underscores in Go names; struct field order_year should be orderYear (golint)
    • Line 248: warning: don't use underscores in Go names; struct field order_weeknum should be orderWeeknum (golint)
    • Line 251: warning: don't use underscores in Go names; struct field lo_quantity should be loQuantity (golint)
    • Line 252: warning: don't use underscores in Go names; struct field lo_discount should be loDiscount (golint)
    • Line 253: warning: don't use underscores in Go names; struct field lo_extendedprice should be loExtendedprice (golint)
    • Line 254: warning: don't use underscores in Go names; struct field lo_revenue should be loRevenue (golint)
    • Line 255: warning: don't use underscores in Go names; struct field lo_supplycost should be loSupplycost (golint)
    • pdk/usecase/weather/main.go
    • Line 87: warning: don't use underscores in Go names; var pickup_year should be pickupYear (golint)
    • Line 88: warning: don't use underscores in Go names; var pickup_month should be pickupMonth (golint)
    • Line 89: warning: don't use underscores in Go names; var pickup_mday should be pickupMday (golint)
    • Line 90: warning: don't use underscores in Go names; var pickup_time should be pickupTime (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell96%

Misspell Finds commonly misspelled English words

    • pdk/fake/event.go
    • Line 56: warning: "occured" is a misspelling of "occurred" (misspell)
    • Line 179: warning: "ECT" is a misspelling of "ETC" (misspell)
    • Line 179: warning: "ECT" is a misspelling of "ETC" (misspell)
    • Line 187: warning: "TAHT" is a misspelling of "THAT" (misspell)