Preparing report...

Report for github.com/Laisky/go-fluentd

A    Great!    Found 40 issues across 52 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!


gocyclo76%

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-fluentd/libs/data_gen.go
    • Line 97: warning: cyclomatic complexity 23 of function (*FluentMsg).DecodeMsg() is high (> 15) (gocyclo)
    • Line 282: warning: cyclomatic complexity 23 of function (*FluentMsg).UnmarshalMsg() is high (> 15) (gocyclo)
    • go-fluentd/journal.go
    • Line 308: warning: cyclomatic complexity 37 of function (*Journal).createJournalRunner() is high (> 15) (gocyclo)
    • Line 492: warning: cyclomatic complexity 23 of function (*Journal).DumpMsgFlow() is high (> 15) (gocyclo)
    • go-fluentd/recvs/fluentd.go
    • Line 207: warning: cyclomatic complexity 25 of function (*FluentdRecv).decodeMsg() is high (> 15) (gocyclo)
    • Line 397: warning: cyclomatic complexity 21 of function (*FluentdRecv).runConcator() is high (> 15) (gocyclo)

golint28%

Golint is a linter for Go source code.

    • go-fluentd/libs/utils.go
    • Line 56: warning: exported function RegexNamedSubMatch should have comment or be unexported (golint)
    • Line 71: warning: exported function FlattenMap should have comment or be unexported (golint)
    • go-fluentd/postFilters/custom_bigdata.go
    • Line 1: warning: don't use MixedCaps in package name; postFilters should be postfilters (golint)
    • Line 12: warning: exported type CustomBigDataFilterCfg should have comment or be unexported (golint)
    • Line 23: warning: exported function NewCustomBigDataFilter should have comment or be unexported (golint)
    • Line 48: warning: exported method CustomBigDataFilter.Filter should have comment or be unexported (golint)
    • go-fluentd/senders/base.go
    • Line 13: warning: exported type SenderItf should have comment or be unexported (golint)
    • Line 26: warning: comment on exported type BaseSender should be of the form "BaseSender ..." (with optional leading article) (golint)
    • Line 36: warning: exported method BaseSender.SetMsgPool should have comment or be unexported (golint)
    • Line 40: warning: exported method BaseSender.SetCommitChan should have comment or be unexported (golint)
    • Line 44: warning: exported method BaseSender.SetSuccessedChan should have comment or be unexported (golint)
    • Line 48: warning: exported method BaseSender.SetFailedChan should have comment or be unexported (golint)
    • Line 52: warning: exported method BaseSender.SetSupportedTags should have comment or be unexported (golint)
    • Line 56: warning: exported method BaseSender.DiscardWhenBlocked should have comment or be unexported (golint)
    • Line 60: warning: exported method BaseSender.IsTagSupported should have comment or be unexported (golint)
    • go-fluentd/acceptorFilters/spark_f.go
    • Line 1: warning: don't use MixedCaps in package name; acceptorFilters should be acceptorfilters (golint)
    • Line 11: warning: exported type SparkFilterCfg should have comment or be unexported (golint)
    • Line 23: warning: exported function NewSparkFilter should have comment or be unexported (golint)
    • Line 38: warning: exported method SparkFilter.GetName should have comment or be unexported (golint)
    • Line 42: warning: exported method SparkFilter.Filter should have comment or be unexported (golint)
    • go-fluentd/acceptorFilters/spring_f.go
    • Line 1: warning: don't use MixedCaps in package name; acceptorFilters should be acceptorfilters (golint)
    • Line 12: warning: exported type SpringReTagRule should have comment or be unexported (golint)
    • Line 17: warning: exported type SpringFilterCfg should have comment or be unexported (golint)
    • Line 22: warning: exported type SpringFilter should have comment or be unexported (golint)
    • Line 41: warning: exported function NewSpringFilter should have comment or be unexported (golint)
    • Line 73: warning: exported method SpringFilter.GetName should have comment or be unexported (golint)
    • Line 77: warning: exported method SpringFilter.Filter should have comment or be unexported (golint)
    • go-fluentd/postFilters/forward_tag_rewriter.go
    • Line 1: warning: don't use MixedCaps in package name; postFilters should be postfilters (golint)
    • Line 10: warning: exported type ForwardTagRewriterFilterCfg should have comment or be unexported (golint)
    • Line 23: warning: exported function NewForwardTagRewriterFilter should have comment or be unexported (golint)
    • Line 33: warning: exported method ForwardTagRewriterFilter.Filter should have comment or be unexported (golint)
    • go-fluentd/tagFilters/pipeline.go
    • Line 1: warning: don't use MixedCaps in package name; tagFilters should be tagfilters (golint)
    • Line 16: warning: exported type TagPipelineItf should have comment or be unexported (golint)
    • Line 20: warning: exported type TagPipelineCfg should have comment or be unexported (golint)
    • Line 26: warning: exported type TagPipeline should have comment or be unexported (golint)
    • go-fluentd/recvs/base.go
    • Line 23: warning: exported type AcceptorRecvItf should have comment or be unexported (golint)
    • Line 32: warning: exported type BaseRecv should have comment or be unexported (golint)
    • Line 39: warning: exported method BaseRecv.SetSyncOutChan should have comment or be unexported (golint)
    • Line 43: warning: exported method BaseRecv.SetAsyncOutChan should have comment or be unexported (golint)
    • Line 47: warning: exported method BaseRecv.SetMsgPool should have comment or be unexported (golint)
    • Line 51: warning: exported method BaseRecv.SetCounter should have comment or be unexported (golint)
    • go-fluentd/acceptorFilters/default_f.go
    • Line 1: warning: don't use MixedCaps in package name; acceptorFilters should be acceptorfilters (golint)
    • Line 8: warning: exported type DefaultFilterCfg should have comment or be unexported (golint)
    • Line 14: warning: exported type DefaultFilter should have comment or be unexported (golint)
    • Line 20: warning: exported function NewDefaultFilter should have comment or be unexported (golint)
    • Line 36: warning: exported method DefaultFilter.GetName should have comment or be unexported (golint)
    • Line 40: warning: exported method DefaultFilter.IsTagInConfigs should have comment or be unexported (golint)
    • Line 45: warning: exported method DefaultFilter.Filter should have comment or be unexported (golint)
    • go-fluentd/senders/kafka.go
    • Line 14: warning: exported function NewKafkaProducer should have comment or be unexported (golint)
    • Line 25: warning: exported type KafkaSenderCfg should have comment or be unexported (golint)
    • Line 35: warning: exported type KafkaSender should have comment or be unexported (golint)
    • Line 40: warning: exported function NewKafkaSender should have comment or be unexported (golint)
    • Line 58: warning: exported method KafkaSender.GetName should have comment or be unexported (golint)
    • Line 62: warning: exported method KafkaSender.Spawn should have comment or be unexported (golint)
    • go-fluentd/dispacher.go
    • Line 15: warning: exported type DispatcherCfg should have comment or be unexported (golint)
    • Line 177: warning: exported method Dispatcher.GetOutChan should have comment or be unexported (golint)
    • go-fluentd/tagFilters/parser_f.go
    • Line 1: warning: don't use MixedCaps in package name; tagFilters should be tagfilters (golint)
    • Line 15: warning: exported function ParseAddCfg should have comment or be unexported (golint)
    • Line 35: warning: exported method ParserFact.StartNewParser should have comment or be unexported (golint)
    • Line 197: warning: exported type ParserFactCfg should have comment or be unexported (golint)
    • Line 216: warning: exported type ParserFact should have comment or be unexported (golint)
    • Line 222: warning: exported function NewParserFact should have comment or be unexported (golint)
    • Line 248: warning: receiver name cf should be consistent with previous receiver name f for ParserFact (golint)
    • Line 278: warning: exported method ParserFact.GetName should have comment or be unexported (golint)
    • Line 278: warning: receiver name cf should be consistent with previous receiver name f for ParserFact (golint)
    • Line 282: warning: exported method ParserFact.IsTagSupported should have comment or be unexported (golint)
    • Line 282: warning: receiver name cf should be consistent with previous receiver name f for ParserFact (golint)
    • Line 287: warning: exported method ParserFact.Spawn should have comment or be unexported (golint)
    • Line 287: warning: receiver name cf should be consistent with previous receiver name f for ParserFact (golint)
    • go-fluentd/recvs/kafka.go
    • Line 19: warning: exported function GetKafkaRewriteTag should have comment or be unexported (golint)
    • Line 27: warning: exported type KafkaCommitCfg should have comment or be unexported (golint)
    • Line 58: warning: exported type KafkaRecv should have comment or be unexported (golint)
    • Line 63: warning: exported function NewKafkaRecv should have comment or be unexported (golint)
    • Line 118: warning: exported method KafkaRecv.GetName should have comment or be unexported (golint)
    • Line 122: warning: exported method KafkaRecv.Run should have comment or be unexported (golint)
    • go-fluentd/senders/elasticsearch.go
    • Line 19: warning: exported function LoadESTagIndexMap should have comment or be unexported (golint)
    • Line 28: warning: exported type ElasticSearchSenderCfg should have comment or be unexported (golint)
    • Line 37: warning: exported type ElasticSearchSender should have comment or be unexported (golint)
    • Line 44: warning: exported function NewElasticSearchSender should have comment or be unexported (golint)
    • Line 98: warning: exported method ElasticSearchSender.GetName should have comment or be unexported (golint)
    • Line 128: warning: exported method ElasticSearchSender.SendBulkMsgs should have comment or be unexported (golint)
    • Line 186: warning: exported type ESResp should have comment or be unexported (golint)
    • Line 191: warning: exported type ESOpResp should have comment or be unexported (golint)
    • Line 195: warning: exported type ESIndexResp should have comment or be unexported (golint)
    • Line 247: warning: exported method ElasticSearchSender.Spawn should have comment or be unexported (golint)
    • go-fluentd/libs/const.go
    • Line 4: warning: exported const DefaultFieldForMessage should have comment (or a comment on this block) or be unexported (golint)
    • Line 8: warning: exported var MustIncludeFileds should have comment or be unexported (golint)
    • go-fluentd/postFilters/base.go
    • Line 1: warning: don't use MixedCaps in package name; postFilters should be postfilters (golint)
    • Line 9: warning: exported type PostFilterItf should have comment or be unexported (golint)
    • Line 18: warning: exported type BaseFilter should have comment or be unexported (golint)
    • Line 24: warning: exported method BaseFilter.SetUpstream should have comment or be unexported (golint)
    • Line 28: warning: exported method BaseFilter.SetMsgPool should have comment or be unexported (golint)
    • Line 32: warning: exported method BaseFilter.SetWaitCommitChan should have comment or be unexported (golint)
    • Line 36: warning: exported method BaseFilter.DiscardMsg should have comment or be unexported (golint)
    • go-fluentd/postFilters/es_sender_dispatcher.go
    • Line 1: warning: don't use MixedCaps in package name; postFilters should be postfilters (golint)
    • Line 11: warning: exported type ESDispatcherFilterCfg should have comment or be unexported (golint)
    • Line 17: warning: exported type ESDispatcherFilter should have comment or be unexported (golint)
    • Line 34: warning: exported function NewESDispatcherFilter should have comment or be unexported (golint)
    • Line 49: warning: exported method ESDispatcherFilter.Filter should have comment or be unexported (golint)
    • go-fluentd/tagFilters/base.go
    • Line 1: warning: don't use MixedCaps in package name; tagFilters should be tagfilters (golint)
    • Line 16: warning: exported type TagFilterFactoryItf should have comment or be unexported (golint)
    • Line 27: warning: exported type BaseTagFilterFactory should have comment or be unexported (golint)
    • Line 33: warning: exported method BaseTagFilterFactory.SetMsgPool should have comment or be unexported (golint)
    • Line 37: warning: exported method BaseTagFilterFactory.SetWaitCommitChan should have comment or be unexported (golint)
    • Line 41: warning: exported method BaseTagFilterFactory.SetDefaultIntervalChanSize should have comment or be unexported (golint)
    • Line 45: warning: exported method BaseTagFilterFactory.DiscardMsg should have comment or be unexported (golint)
    • go-fluentd/senders/httpforward.go
    • Line 15: warning: exported type HTTPSenderCfg should have comment or be unexported (golint)
    • Line 23: warning: exported type HTTPSender should have comment or be unexported (golint)
    • Line 30: warning: exported function NewHTTPSender should have comment or be unexported (golint)
    • Line 56: warning: exported method HTTPSender.GetName should have comment or be unexported (golint)
    • Line 60: warning: exported method HTTPSender.Spawn should have comment or be unexported (golint)
    • Line 153: warning: exported method HTTPSender.SendBulkMsgs should have comment or be unexported (golint)
    • go-fluentd/postFilters/pipeline.go
    • Line 1: warning: don't use MixedCaps in package name; postFilters should be postfilters (golint)
    • Line 14: warning: exported type PostPipelineCfg should have comment or be unexported (golint)
    • Line 20: warning: exported type PostPipeline should have comment or be unexported (golint)
    • Line 27: warning: exported function NewPostPipeline should have comment or be unexported (golint)
    • Line 82: warning: exported method PostPipeline.Wrap should have comment or be unexported (golint)
    • go-fluentd/senders/fluentd.go
    • Line 15: warning: exported type FluentSenderCfg should have comment or be unexported (golint)
    • Line 24: warning: exported type FluentSender should have comment or be unexported (golint)
    • Line 29: warning: exported function NewFluentSender should have comment or be unexported (golint)
    • Line 48: warning: exported method FluentSender.GetName should have comment or be unexported (golint)
    • Line 52: warning: exported method FluentSender.Spawn should have comment or be unexported (golint)
    • go-fluentd/libs/fluentd.go
    • Line 11: warning: exported const BufByte should have comment or be unexported (golint)
    • Line 19: warning: exported type TinyFluentRecord should have comment or be unexported (golint)
    • Line 24: warning: exported type FluentEncoder should have comment or be unexported (golint)
    • Line 30: warning: exported function NewFluentEncoder should have comment or be unexported (golint)
    • Line 44: warning: exported method FluentEncoder.Encode should have comment or be unexported (golint)
    • Line 50: warning: exported method FluentEncoder.EncodeBatch should have comment or be unexported (golint)
    • Line 70: warning: exported method FluentEncoder.Flush should have comment or be unexported (golint)
    • go-fluentd/journal.go
    • Line 29: warning: exported type JournalCfg should have comment or be unexported (golint)
    • Line 134: warning: exported method Journal.CloseTag should have comment or be unexported (golint)
    • Line 140: 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 207: warning: exported method Journal.ProcessLegacyMsg should have comment or be unexported (golint)
    • Line 482: warning: exported method Journal.GetOutChan should have comment or be unexported (golint)
    • Line 486: warning: exported method Journal.ConvertMsg2Buf should have comment or be unexported (golint)
    • Line 492: warning: exported method Journal.DumpMsgFlow should have comment or be unexported (golint)
    • Line 595: warning: exported method Journal.GetCommitChan should have comment or be unexported (golint)
    • go-fluentd/acceptorFilters/pipeline.go
    • Line 1: warning: don't use MixedCaps in package name; acceptorFilters should be acceptorfilters (golint)
    • Line 15: warning: exported type AcceptorPipelineCfg should have comment or be unexported (golint)
    • Line 22: warning: exported type AcceptorPipeline should have comment or be unexported (golint)
    • Line 30: warning: exported function NewAcceptorPipeline should have comment or be unexported (golint)
    • Line 118: warning: exported method AcceptorPipeline.DiscardMsg should have comment or be unexported (golint)
    • Line 123: warning: exported method AcceptorPipeline.Wrap should have comment or be unexported (golint)
    • go-fluentd/libs/timer.go
    • Line 7: warning: exported type TimerConfig should have comment or be unexported (golint)
    • Line 13: warning: exported function NewTimerConfig should have comment or be unexported (golint)
    • Line 25: warning: exported type Timer should have comment or be unexported (golint)
    • Line 29: warning: exported function NewTimer should have comment or be unexported (golint)
    • Line 43: warning: exported method Timer.Tick should have comment or be unexported (golint)
    • Line 52: warning: exported method Timer.Sleep should have comment or be unexported (golint)
    • Line 69: warning: exported method Timer.Reset should have comment or be unexported (golint)
    • go-fluentd/postFilters/default_f.go
    • Line 1: warning: don't use MixedCaps in package name; postFilters should be postfilters (golint)
    • Line 11: warning: exported type DefaultFilterCfg should have comment or be unexported (golint)
    • Line 16: warning: exported type DefaultFilter should have comment or be unexported (golint)
    • Line 21: warning: exported function NewDefaultFilter should have comment or be unexported (golint)
    • Line 52: warning: exported method DefaultFilter.Filter should have comment or be unexported (golint)
    • go-fluentd/recvs/http.go
    • Line 187: 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)
    • go-fluentd/recvs/rsyslog.go
    • Line 17: warning: exported function NewRsyslogSrv should have comment or be unexported (golint)
    • Line 38: warning: exported type RsyslogCfg should have comment or be unexported (golint)
    • Line 46: warning: comment on exported type RsyslogRecv should be of the form "RsyslogRecv ..." (with optional leading article) (golint)
    • Line 52: warning: exported function NewRsyslogRecv should have comment or be unexported (golint)
    • Line 59: warning: exported method RsyslogRecv.GetName should have comment or be unexported (golint)
    • Line 63: warning: exported method RsyslogRecv.Run should have comment or be unexported (golint)
    • go-fluentd/acceptorFilters/base.go
    • Line 1: warning: don't use MixedCaps in package name; acceptorFilters should be acceptorfilters (golint)
    • Line 9: warning: exported type AcceptorFilterItf should have comment or be unexported (golint)
    • Line 17: warning: exported type BaseFilter should have comment or be unexported (golint)
    • Line 22: warning: exported method BaseFilter.SetUpstream should have comment or be unexported (golint)
    • Line 26: warning: exported method BaseFilter.SetMsgPool should have comment or be unexported (golint)
    • Line 30: warning: exported method BaseFilter.DiscardMsg should have comment or be unexported (golint)
    • go-fluentd/postFilters/fields.go
    • Line 1: warning: don't use MixedCaps in package name; postFilters should be postfilters (golint)
    • Line 10: warning: exported type FieldsFilterCfg should have comment or be unexported (golint)
    • Line 16: warning: exported type FieldsFilter should have comment or be unexported (golint)
    • Line 22: warning: exported function NewFieldsFilter should have comment or be unexported (golint)
    • Line 52: warning: exported method FieldsFilter.Filter should have comment or be unexported (golint)
    • go-fluentd/tagFilters/concator_f.go
    • Line 1: warning: don't use MixedCaps in package name; tagFilters should be tagfilters (golint)
    • Line 15: warning: exported type ConcatorCfg should have comment or be unexported (golint)
    • Line 207: warning: exported type ConcatorFactCfg should have comment or be unexported (golint)
    • Line 249: warning: exported method ConcatorFactory.GetName should have comment or be unexported (golint)
    • Line 249: warning: receiver name cf should be consistent with previous receiver name c for ConcatorFactory (golint)
    • Line 253: warning: exported method ConcatorFactory.IsTagSupported should have comment or be unexported (golint)
    • Line 253: warning: receiver name cf should be consistent with previous receiver name c for ConcatorFactory (golint)
    • Line 260: warning: receiver name cf should be consistent with previous receiver name c for ConcatorFactory (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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!