Preparing report...

Report for github.com/adroll/baker

A+    Excellent!    Found 54 issues across 157 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!


gocyclo92%

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.

    • baker/help.go
    • Line 51: warning: cyclomatic complexity 27 of function PrintHelp() is high (> 15) (gocyclo)
    • baker/stats_test.go
    • Line 258: warning: cyclomatic complexity 20 of function TestStatsDumperInvalidRecords() is high (> 15) (gocyclo)
    • Line 133: warning: cyclomatic complexity 17 of function TestStatsDumper() is high (> 15) (gocyclo)
    • baker/stats.go
    • Line 39: warning: cyclomatic complexity 20 of function (*StatsDumper).dumpNow() is high (> 15) (gocyclo)
    • baker/config.go
    • Line 281: warning: cyclomatic complexity 35 of function NewConfigFromToml() is high (> 15) (gocyclo)
    • baker/topology.go
    • Line 51: warning: cyclomatic complexity 22 of function NewTopologyFromConfig() is high (> 15) (gocyclo)

golint74%

Golint is a linter for Go source code.

    • baker/input/inputtest/records.go
    • Line 35: warning: exported method Records.Run should have comment or be unexported (golint)
    • Line 49: warning: exported method Records.Stop should have comment or be unexported (golint)
    • Line 50: warning: exported method Records.FreeMem should have comment or be unexported (golint)
    • Line 51: warning: exported method Records.Stats should have comment or be unexported (golint)
    • baker/filter/concatenate.go
    • Line 19: warning: exported type ConcatenateConfig should have comment or be unexported (golint)
    • Line 25: warning: exported type Concatenate should have comment or be unexported (golint)
    • Line 31: warning: exported function NewConcatenate should have comment or be unexported (golint)
    • Line 65: warning: exported method Concatenate.Stats should have comment or be unexported (golint)
    • Line 69: warning: exported method Concatenate.Process should have comment or be unexported (golint)
    • baker/filter/expand_json.go
    • Line 33: warning: exported var ExpandJSONDesc should have comment or be unexported (golint)
    • Line 40: warning: exported type ExpandJSONConfig should have comment or be unexported (golint)
    • Line 54: warning: exported type ExpandJSON should have comment or be unexported (golint)
    • Line 63: warning: exported function NewExpandJSON should have comment or be unexported (golint)
    • Line 99: warning: exported method ExpandJSON.Stats should have comment or be unexported (golint)
    • Line 103: warning: exported method ExpandJSON.Process should have comment or be unexported (golint)
    • Line 139: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • baker/filter/set_string_from_url.go
    • Line 29: warning: exported type SetStringFromURLConfig should have comment or be unexported (golint)
    • Line 34: warning: exported type SetStringFromURL should have comment or be unexported (golint)
    • Line 41: warning: exported function NewSetStringFromURL should have comment or be unexported (golint)
    • Line 57: warning: exported method SetStringFromURL.Stats should have comment or be unexported (golint)
    • Line 63: warning: exported method SetStringFromURL.Process should have comment or be unexported (golint)
    • baker/output/sqlite.go
    • Line 75: warning: exported type SQLite should have comment or be unexported (golint)
    • Line 126: warning: exported function NewSQLite should have comment or be unexported (golint)
    • Line 236: warning: exported method SQLite.Run should have comment or be unexported (golint)
    • Line 245: 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 400: warning: exported method SQLite.Stats should have comment or be unexported (golint)
    • Line 406: warning: exported method SQLite.CanShard should have comment or be unexported (golint)
    • baker/filter/dedup.go
    • Line 23: warning: exported var DedupDesc should have comment or be unexported (golint)
    • Line 30: warning: exported type DedupConfig should have comment or be unexported (golint)
    • Line 41: warning: exported type Dedup should have comment or be unexported (golint)
    • Line 52: warning: exported function NewDedup should have comment or be unexported (golint)
    • Line 75: warning: exported method Dedup.Stats should have comment or be unexported (golint)
    • Line 81: warning: exported method Dedup.Process should have comment or be unexported (golint)
    • baker/filter/metadata_lastmodified.go
    • Line 12: warning: exported var MetadataLastModifiedDesc should have comment or be unexported (golint)
    • Line 19: warning: exported type MetadataLastModifiedConfig should have comment or be unexported (golint)
    • Line 23: warning: exported type MetadataLastModified should have comment or be unexported (golint)
    • Line 29: warning: exported function NewMetadataLastModified should have comment or be unexported (golint)
    • Line 42: warning: exported method MetadataLastModified.Stats should have comment or be unexported (golint)
    • Line 46: warning: exported method MetadataLastModified.Process should have comment or be unexported (golint)
    • baker/output/dyndb.go
    • Line 20: warning: exported var DynamoDBDesc should have comment or be unexported (golint)
    • Line 44: warning: exported var BakerTransport should have comment or be unexported (golint)
    • Line 74: warning: exported var DynamoGlobals should have comment or be unexported (golint)
    • Line 164: warning: exported type DynamoDBConfig should have comment or be unexported (golint)
    • Line 285: warning: exported method DynamoDB.Flush should have comment or be unexported (golint)
    • Line 291: warning: exported method DynamoDB.NumProcessedRecords should have comment or be unexported (golint)
    • Line 384: warning: exported method DynamoDB.Run should have comment or be unexported (golint)
    • Line 393: warning: exported method DynamoDB.Stats should have comment or be unexported (golint)
    • Line 409: warning: exported method DynamoDB.CanShard should have comment or be unexported (golint)
    • baker/output/websocket.go
    • Line 12: warning: exported var WebSocketDesc should have comment or be unexported (golint)
    • Line 20: warning: exported type WebSocketConfig should have comment or be unexported (golint)
    • Line 24: warning: exported type WebSocket should have comment or be unexported (golint)
    • Line 33: warning: exported function NewWebSocket should have comment or be unexported (golint)
    • Line 48: warning: exported method WebSocket.Run should have comment or be unexported (golint)
    • Line 69: warning: exported method WebSocket.Stats should have comment or be unexported (golint)
    • Line 75: warning: exported method WebSocket.CanShard should have comment or be unexported (golint)
    • Line 75: warning: receiver name b should be consistent with previous receiver name w for WebSocket (golint)
    • baker/input/kinesis.go
    • Line 20: warning: exported var KinesisDesc should have comment or be unexported (golint)
    • Line 28: warning: exported type KinesisConfig should have comment or be unexported (golint)
    • Line 46: warning: exported type Kinesis should have comment or be unexported (golint)
    • Line 104: warning: exported method Kinesis.ProcessRecords should have comment or be unexported (golint)
    • Line 186: warning: exported method Kinesis.Stop should have comment or be unexported (golint)
    • Line 190: warning: exported method Kinesis.Run should have comment or be unexported (golint)
    • Line 210: warning: exported method Kinesis.Stats should have comment or be unexported (golint)
    • Line 216: warning: exported method Kinesis.FreeMem should have comment or be unexported (golint)
    • baker/input/inputtest/random.go
    • Line 50: warning: exported method Random.Run should have comment or be unexported (golint)
    • Line 81: warning: exported method Random.Stop should have comment or be unexported (golint)
    • Line 82: warning: exported method Random.FreeMem should have comment or be unexported (golint)
    • Line 83: warning: exported method Random.Stats should have comment or be unexported (golint)
    • baker/examples/filtering/filter.go
    • Line 9: warning: exported var LazyFilterDesc should have comment or be unexported (golint)
    • Line 16: warning: exported type LazyFilterConfig should have comment or be unexported (golint)
    • Line 19: warning: exported type LazyFilter should have comment or be unexported (golint)
    • Line 23: warning: exported function NewLazyFilter should have comment or be unexported (golint)
    • Line 28: warning: exported method LazyFilter.Process should have comment or be unexported (golint)
    • Line 39: warning: exported method LazyFilter.Stats should have comment or be unexported (golint)
    • baker/filter/metadata_url.go
    • Line 19: warning: exported var MetadataUrlDesc should have comment or be unexported (golint)
    • Line 26: warning: exported type MetadataUrlConfig should have comment or be unexported (golint)
    • Line 30: warning: exported type MetadataUrl should have comment or be unexported (golint)
    • Line 39: warning: exported function NewMetadataUrl should have comment or be unexported (golint)
    • Line 53: warning: exported method MetadataUrl.Stats should have comment or be unexported (golint)
    • Line 57: warning: exported method MetadataUrl.Process should have comment or be unexported (golint)
    • baker/filter/partial_clone.go
    • Line 9: warning: exported var PartialCloneDesc should have comment or be unexported (golint)
    • Line 16: warning: exported type PartialCloneConfig should have comment or be unexported (golint)
    • Line 20: warning: exported type PartialClone should have comment or be unexported (golint)
    • Line 25: warning: exported function NewPartialClone should have comment or be unexported (golint)
    • Line 47: warning: exported method PartialClone.Stats should have comment or be unexported (golint)
    • Line 51: warning: exported method PartialClone.Process should have comment or be unexported (golint)
    • baker/input/tcp.go
    • Line 20: warning: exported var TCPDesc should have comment or be unexported (golint)
    • Line 40: warning: exported type TCPConfig should have comment or be unexported (golint)
    • Line 50: warning: exported type TCP should have comment or be unexported (golint)
    • Line 59: warning: exported function NewTCP should have comment or be unexported (golint)
    • Line 73: warning: exported method TCP.Run should have comment or be unexported (golint)
    • Line 131: warning: exported method TCP.FreeMem should have comment or be unexported (golint)
    • Line 136: warning: exported method TCP.Stats should have comment or be unexported (golint)
    • Line 142: warning: exported method TCP.Stop should have comment or be unexported (golint)
    • baker/nop_metrics.go
    • Line 8: warning: exported method NopMetrics.Gauge should have comment or be unexported (golint)
    • Line 9: warning: exported method NopMetrics.GaugeWithTags should have comment or be unexported (golint)
    • Line 10: warning: exported method NopMetrics.RawCount should have comment or be unexported (golint)
    • Line 11: warning: exported method NopMetrics.RawCountWithTags should have comment or be unexported (golint)
    • Line 12: warning: exported method NopMetrics.DeltaCount should have comment or be unexported (golint)
    • Line 13: warning: exported method NopMetrics.DeltaCountWithTags should have comment or be unexported (golint)
    • Line 14: warning: exported method NopMetrics.Histogram should have comment or be unexported (golint)
    • Line 15: warning: exported method NopMetrics.HistogramWithTags should have comment or be unexported (golint)
    • Line 16: warning: exported method NopMetrics.Duration should have comment or be unexported (golint)
    • Line 17: warning: exported method NopMetrics.DurationWithTags should have comment or be unexported (golint)
    • baker/examples/sharding/output.go
    • Line 9: warning: exported var ShardableDesc should have comment or be unexported (golint)
    • Line 24: warning: exported function NewShardable should have comment or be unexported (golint)
    • Line 30: warning: comment on exported method Shardable.CanShard should be of the form "CanShard ..." (golint)
    • Line 35: warning: exported method Shardable.Run should have comment or be unexported (golint)
    • Line 46: warning: exported method Shardable.Stats should have comment or be unexported (golint)
    • baker/output/nop.go
    • Line 9: warning: exported var NopDesc should have comment or be unexported (golint)
    • Line 16: warning: exported type Nop should have comment or be unexported (golint)
    • Line 18: warning: exported type NopConfig should have comment or be unexported (golint)
    • Line 20: warning: exported function NewNop should have comment or be unexported (golint)
    • Line 24: warning: exported method Nop.CanShard should have comment or be unexported (golint)
    • Line 26: warning: exported method Nop.Run should have comment or be unexported (golint)
    • Line 26: warning: receiver name nop should be consistent with previous receiver name b for Nop (golint)
    • Line 34: warning: exported method Nop.Stats should have comment or be unexported (golint)
    • Line 34: warning: receiver name nop should be consistent with previous receiver name b for Nop (golint)
    • baker/output/outputtest/base.go
    • Line 9: warning: exported method Base.Run should have comment or be unexported (golint)
    • Line 10: warning: exported method Base.CanShard should have comment or be unexported (golint)
    • Line 11: warning: exported method Base.Stats should have comment or be unexported (golint)
    • baker/upload/uploadtest/base.go
    • Line 9: warning: exported method Base.Run should have comment or be unexported (golint)
    • Line 10: warning: exported method Base.Stop should have comment or be unexported (golint)
    • Line 11: warning: exported method Base.Stats should have comment or be unexported (golint)
    • baker/upload/s3.go
    • Line 22: warning: exported var S3Desc should have comment or be unexported (golint)
    • Line 92: warning: exported type S3 should have comment or be unexported (golint)
    • Line 106: warning: exported function NewS3 should have comment or be unexported (golint)
    • Line 124: warning: exported method S3.Run should have comment or be unexported (golint)
    • Line 203: warning: exported method S3.Stop should have comment or be unexported (golint)
    • Line 216: warning: exported method S3.Stats should have comment or be unexported (golint)
    • baker/filter/slice.go
    • Line 9: warning: exported var SliceDesc should have comment or be unexported (golint)
    • Line 19: warning: exported type SliceConfig should have comment or be unexported (golint)
    • baker/input/list.go
    • Line 30: warning: exported var ListDesc should have comment or be unexported (golint)
    • Line 58: warning: exported type ListConfig should have comment or be unexported (golint)
    • Line 78: warning: exported type List should have comment or be unexported (golint)
    • Line 130: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 166: warning: exported method List.ProcessDirectory should have comment or be unexported (golint)
    • Line 175: warning: exported function NewList should have comment or be unexported (golint)
    • Line 388: warning: exported method List.Run should have comment or be unexported (golint)
    • Line 415: warning: exported method List.FreeMem should have comment or be unexported (golint)
    • Line 419: warning: exported method List.Stats should have comment or be unexported (golint)
    • Line 423: warning: exported method List.Stop should have comment or be unexported (golint)
    • baker/input/inputtest/base.go
    • Line 9: warning: exported method Base.Run should have comment or be unexported (golint)
    • Line 10: warning: exported method Base.Stop should have comment or be unexported (golint)
    • Line 11: warning: exported method Base.FreeMem should have comment or be unexported (golint)
    • Line 12: warning: exported method Base.Stats should have comment or be unexported (golint)
    • baker/input/inputtest/logline.go
    • Line 36: warning: exported method LogLine.Run should have comment or be unexported (golint)
    • Line 50: warning: exported method LogLine.Stop should have comment or be unexported (golint)
    • Line 51: warning: exported method LogLine.FreeMem should have comment or be unexported (golint)
    • Line 52: warning: exported method LogLine.Stats should have comment or be unexported (golint)
    • baker/filter/crypt.go
    • Line 26: warning: exported var CryptDesc should have comment or be unexported (golint)
    • Line 33: warning: exported type CryptConfig should have comment or be unexported (golint)
    • Line 47: warning: exported type Crypt should have comment or be unexported (golint)
    • Line 57: warning: exported function NewCrypt should have comment or be unexported (golint)
    • Line 90: warning: exported method Crypt.Stats should have comment or be unexported (golint)
    • Line 96: warning: exported method Crypt.Process should have comment or be unexported (golint)
    • baker/filter/format_time.go
    • Line 55: warning: exported var FormatTimeDesc should have comment or be unexported (golint)
    • Line 62: warning: exported type FormatTimeConfig should have comment or be unexported (golint)
    • Line 78: warning: exported type FormatTime should have comment or be unexported (golint)
    • Line 85: warning: exported function NewFormatTime should have comment or be unexported (golint)
    • Line 109: warning: exported method FormatTime.Stats should have comment or be unexported (golint)
    • Line 113: warning: exported method FormatTime.Process should have comment or be unexported (golint)
    • baker/filter/hash.go
    • Line 33: warning: exported type HashConfig should have comment or be unexported (golint)
    • Line 40: warning: exported type Hash should have comment or be unexported (golint)
    • Line 49: warning: exported function NewHash should have comment or be unexported (golint)
    • Line 98: warning: exported method Hash.Stats should have comment or be unexported (golint)
    • Line 104: warning: exported method Hash.Process should have comment or be unexported (golint)
    • baker/input/sqs.go
    • Line 22: warning: exported var SQSDesc should have comment or be unexported (golint)
    • Line 36: warning: exported type SQSConfig should have comment or be unexported (golint)
    • Line 55: warning: exported type SQS should have comment or be unexported (golint)
    • Line 67: warning: exported function NewSQS should have comment or be unexported (golint)
    • Line 212: warning: exported method SQS.Run should have comment or be unexported (golint)
    • Line 256: warning: exported method SQS.Stop should have comment or be unexported (golint)
    • Line 262: warning: exported method SQS.Stats should have comment or be unexported (golint)
    • Line 278: warning: exported method SQS.FreeMem should have comment or be unexported (golint)
    • baker/filter/clausefilter.go
    • Line 84: warning: exported type ClauseFilter should have comment or be unexported (golint)
    • Line 95: warning: don't use underscores in Go names; const not_clause should be notClause (golint)
    • Line 96: warning: don't use underscores in Go names; const and_clause should be andClause (golint)
    • Line 97: warning: don't use underscores in Go names; const or_clause should be orClause (golint)
    • Line 98: warning: don't use underscores in Go names; const atom_clause should be atomClause (golint)
    • Line 99: warning: don't use underscores in Go names; const true_clause should be trueClause (golint)
    • Line 100: warning: don't use underscores in Go names; const false_clause should be falseClause (golint)
    • Line 103: warning: exported function NewClauseFilter should have comment or be unexported (golint)
    • Line 118: warning: comment on exported type Clause should be of the form "Clause ..." (with optional leading article) (golint)
    • Line 129: warning: exported method ClauseFilter.Process should have comment or be unexported (golint)
    • Line 137: warning: exported method ClauseFilter.Stats should have comment or be unexported (golint)
    • Line 145: warning: don't use underscores in Go names; var clause_type should be clauseType (golint)
    • Line 153: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 185: warning: don't use underscores in Go names; var inner_node should be innerNode (golint)
    • Line 201: warning: don't use underscores in Go names; var child_node should be childNode (golint)
    • Line 210: warning: don't use underscores in Go names; var field_node should be fieldNode (golint)
    • Line 211: warning: don't use underscores in Go names; var value_node should be valueNode (golint)
    • Line 257: warning: don't use underscores in Go names; var result_left should be resultLeft (golint)
    • Line 262: warning: don't use underscores in Go names; var result_right should be resultRight (golint)
    • Line 265: warning: don't use underscores in Go names; var result_left should be resultLeft (golint)
    • Line 270: warning: don't use underscores in Go names; var result_right should be resultRight (golint)
    • Line 273: warning: don't use underscores in Go names; var log_field should be logField (golint)
    • baker/filter/expand_list.go
    • Line 36: warning: exported var ExpandListDesc should have comment or be unexported (golint)
    • Line 43: warning: exported type ExpandListConfig should have comment or be unexported (golint)
    • Line 55: warning: exported type ExpandList should have comment or be unexported (golint)
    • Line 64: warning: exported function NewExpandList should have comment or be unexported (golint)
    • Line 108: warning: exported method ExpandList.Stats should have comment or be unexported (golint)
    • Line 112: warning: exported method ExpandList.Process should have comment or be unexported (golint)
    • baker/output/oplog.go
    • Line 10: warning: exported var OpLogDesc should have comment or be unexported (golint)
    • Line 18: warning: exported type OpLogConfig should have comment or be unexported (golint)
    • Line 22: warning: exported type OpLog should have comment or be unexported (golint)
    • Line 29: warning: exported function NewOpLog should have comment or be unexported (golint)
    • Line 41: warning: exported method OpLog.Run should have comment or be unexported (golint)
    • Line 51: warning: exported method OpLog.Stats should have comment or be unexported (golint)
    • Line 57: warning: exported method OpLog.CanShard should have comment or be unexported (golint)
    • Line 57: warning: receiver name b should be consistent with previous receiver name w for OpLog (golint)
    • baker/input/inpututils/compressedstream.go
    • Line 148: warning: exported function NewCompressedInput should have comment or be unexported (golint)
    • Line 202: warning: exported method CompressedInput.SetOutputChannel should have comment or be unexported (golint)
    • Line 213: warning: comment on exported method CompressedInput.ProcessFile should be of the form "ProcessFile ..." (golint)
    • Line 229: warning: comment on exported method CompressedInput.NoMoreFiles should be of the form "NoMoreFiles ..." (golint)
    • Line 236: warning: exported method CompressedInput.Stop should have comment or be unexported (golint)
    • Line 241: warning: exported method CompressedInput.ParseFile should have comment or be unexported (golint)
    • Line 365: warning: exported method CompressedInput.FreeMem should have comment or be unexported (golint)
    • Line 370: warning: exported method CompressedInput.Stats should have comment or be unexported (golint)
    • baker/filter/replace_fields.go
    • Line 18: warning: exported type ReplaceFieldsConfig should have comment or be unexported (golint)
    • Line 23: warning: exported type ReplaceFields should have comment or be unexported (golint)
    • Line 29: warning: exported function NewReplaceFields should have comment or be unexported (golint)
    • Line 99: warning: exported method ReplaceFields.Process should have comment or be unexported (golint)
    • Line 111: warning: exported method ReplaceFields.Stats should have comment or be unexported (golint)
    • Line 111: warning: receiver name c should be consistent with previous receiver name f for ReplaceFields (golint)
    • baker/output/filewriter.go
    • Line 36: warning: exported var FileWriterDesc should have comment or be unexported (golint)
    • Line 44: warning: exported type FileWriterConfig should have comment or be unexported (golint)
    • Line 51: warning: exported type FileWriter should have comment or be unexported (golint)
    • Line 63: warning: exported function NewFileWriter should have comment or be unexported (golint)
    • Line 84: warning: exported method FileWriter.Run should have comment or be unexported (golint)
    • Line 116: warning: exported method FileWriter.Stats should have comment or be unexported (golint)
    • Line 122: warning: exported method FileWriter.CanShard should have comment or be unexported (golint)
    • baker/output/stats.go
    • Line 19: warning: exported var StatsDesc should have comment or be unexported (golint)
    • Line 30: warning: exported type StatsConfig should have comment or be unexported (golint)

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!


misspell95%

Misspell Finds commonly misspelled English words