Preparing report...

Report for github.com/VertexC/log-formatter

A    Great!    Found 34 issues across 37 files

Tweet

gofmt94%

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!


gocyclo100%

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.

No problems detected. Good job!


golint10%

Golint is a linter for Go source code.

    • log-formatter/agent/pipeline/filter/filter.go
    • Line 13: warning: exported type FilterConfig should have comment or be unexported (golint)
    • Line 21: warning: exported type Filter should have comment or be unexported (golint)
    • Line 31: warning: exported function New should have comment or be unexported (golint)
    • Line 58: warning: exported method Filter.Format should have comment or be unexported (golint)
    • log-formatter/monitor-be/server.go
    • Line 13: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 16: warning: exported type AppConfig should have comment or be unexported (golint)
    • Line 36: warning: exported function CORSMiddleware should have comment or be unexported (golint)
    • Line 53: warning: comment on exported function NewApp should be of the form "NewApp ..." (golint)
    • Line 83: warning: exported method App.Start should have comment or be unexported (golint)
    • log-formatter/agent/output/output.go
    • Line 12: warning: exported type OutputAgent should have comment or be unexported (golint)
    • Line 17: warning: exported type Factory should have comment or be unexported (golint)
    • Line 22: warning: exported function Register should have comment or be unexported (golint)
    • Line 40: warning: exported method OutputAgent.SetConnector should have comment or be unexported (golint)
    • Line 44: warning: exported method OutputAgent.SetConfig should have comment or be unexported (golint)
    • Line 66: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 94: warning: exported method OutputAgent.Run should have comment or be unexported (golint)
    • Line 103: warning: exported method OutputAgent.Stop should have comment or be unexported (golint)
    • log-formatter/agent/output/elasticsearch/elasticsearch.go
    • Line 21: warning: exported type EsConfig should have comment or be unexported (golint)
    • Line 27: warning: exported type EsOutput should have comment or be unexported (golint)
    • Line 39: warning: exported function New should have comment or be unexported (golint)
    • Line 86: warning: exported method EsOutput.Send should have comment or be unexported (golint)
    • Line 90: warning: exported method EsOutput.Run should have comment or be unexported (golint)
    • Line 168: warning: exported method EsOutput.Stop should have comment or be unexported (golint)
    • log-formatter/logger/logger.go
    • Line 14: warning: exported var VerboseDescription should have comment or be unexported (golint)
    • Line 23: warning: exported type Logger should have comment or be unexported (golint)
    • Line 31: warning: exported var LoggerMap should have comment or be unexported (golint)
    • Line 33: warning: exported function UseLog should have comment or be unexported (golint)
    • Line 41: warning: exported function NewLogger should have comment or be unexported (golint)
    • Line 84: warning: exported method Logger.DiscardAll should have comment or be unexported (golint)
    • log-formatter/agent/connector/queue.go
    • Line 16: warning: comment on exported type DocQueue should be of the form "DocQueue ..." (with optional leading article) (golint)
    • Line 24: warning: exported function NewDocQueue should have comment or be unexported (golint)
    • Line 43: warning: exported method DocQueue.Put should have comment or be unexported (golint)
    • Line 48: warning: exported method DocQueue.Get should have comment or be unexported (golint)
    • Line 53: warning: exported method DocQueue.GetCh should have comment or be unexported (golint)
    • Line 57: warning: exported method DocQueue.ConsumedInc should have comment or be unexported (golint)
    • log-formatter/agent/output/console/console.go
    • Line 14: warning: exported type Console should have comment or be unexported (golint)
    • Line 16: warning: exported function NewConsole should have comment or be unexported (golint)
    • Line 21: warning: exported method Console.Run should have comment or be unexported (golint)
    • Line 23: warning: exported method Console.Stop should have comment or be unexported (golint)
    • Line 25: warning: exported method Console.Send should have comment or be unexported (golint)
    • log-formatter/agent/pipeline/parser/parser.go
    • Line 13: warning: exported type Label should have comment or be unexported (golint)
    • Line 18: warning: exported type ParserConfig should have comment or be unexported (golint)
    • Line 30: warning: exported type Parser should have comment or be unexported (golint)
    • Line 39: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 62: warning: exported method Parser.Format should have comment or be unexported (golint)
    • Line 67: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • log-formatter/util/doc.go
    • Line 11: warning: exported function IsEndDoc should have comment or be unexported (golint)
    • Line 15: warning: exported function EndDoc should have comment or be unexported (golint)
    • log-formatter/dev/tools/console-output.go
    • Line 9: warning: exported type Console should have comment or be unexported (golint)
    • Line 11: warning: exported function New should have comment or be unexported (golint)
    • Line 16: warning: exported method Console.Run should have comment or be unexported (golint)
    • Line 18: warning: exported method Console.Send should have comment or be unexported (golint)
    • log-formatter/agent/input/input.go
    • Line 12: warning: exported type InputAgent should have comment or be unexported (golint)
    • Line 17: warning: exported type Factory should have comment or be unexported (golint)
    • Line 22: warning: exported function Register should have comment or be unexported (golint)
    • Line 40: warning: exported method InputAgent.SetConnector should have comment or be unexported (golint)
    • Line 44: warning: exported method InputAgent.SetConfig should have comment or be unexported (golint)
    • Line 67: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 95: warning: exported method InputAgent.Run should have comment or be unexported (golint)
    • Line 104: warning: exported method InputAgent.Stop should have comment or be unexported (golint)
    • log-formatter/agent/pipeline/formatter.go
    • Line 11: warning: exported type Label should have comment or be unexported (golint)
    • Line 16: warning: exported type Factory should have comment or be unexported (golint)
    • Line 20: warning: exported function Register should have comment or be unexported (golint)
    • Line 38: warning: exported function NewFormatter should have comment or be unexported (golint)
    • log-formatter/agent/pipeline/pipeline.go
    • Line 25: warning: exported type PipelineConfig should have comment or be unexported (golint)
    • Line 30: warning: exported type PipelineAgent should have comment or be unexported (golint)
    • Line 36: warning: exported type Pipeline should have comment or be unexported (golint)
    • Line 43: warning: exported var TAG should have comment or be unexported (golint)
    • Line 45: warning: exported method PipelineAgent.SetConnector should have comment or be unexported (golint)
    • Line 49: warning: exported method PipelineAgent.SetConfig should have comment or be unexported (golint)
    • Line 103: warning: exported method PipelineAgent.Run should have comment or be unexported (golint)
    • Line 107: warning: exported method PipelineAgent.Stop should have comment or be unexported (golint)
    • Line 125: warning: exported method PipelineAgent.ChangeConfig should have comment or be unexported (golint)
    • log-formatter/agent/input/kafka/kafka.go
    • Line 19: warning: exported type Consumer should have comment or be unexported (golint)
    • Line 26: warning: exported type KafkaConfig should have comment or be unexported (golint)
    • Line 37: warning: exported type KafkaInput should have comment or be unexported (golint)
    • Line 48: warning: exported function NewKafkaInput should have comment or be unexported (golint)
    • Line 130: warning: exported method KafkaInput.Run should have comment or be unexported (golint)
    • Line 136: warning: exported method KafkaInput.Stop should have comment or be unexported (golint)
    • Line 143: warning: exported method KafkaInput.Emit should have comment or be unexported (golint)
    • log-formatter/agent/manager.go
    • Line 23: warning: exported type AgentsManagerConfig should have comment or be unexported (golint)
    • Line 27: warning: exported type AgentsManager should have comment or be unexported (golint)
    • Line 38: warning: exported function NewAgentsManager should have comment or be unexported (golint)
    • Line 72: warning: exported method AgentsManager.Run should have comment or be unexported (golint)
    • Line 81: warning: exported method AgentsManager.Stop should have comment or be unexported (golint)
    • Line 90: warning: exported method AgentsManager.SetConfig should have comment or be unexported (golint)
    • Line 122: warning: exported method AgentsManager.UpdateConfig should have comment or be unexported (golint)
    • Line 147: 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 166: warning: exported method AgentsManager.StartHearBeat should have comment or be unexported (golint)
    • Line 210: warning: exported method AgentsManager.GetHeartBeat should have comment or be unexported (golint)
    • Line 227: warning: exported method AgentsManager.StartRpcService should have comment or be unexported (golint)
    • log-formatter/agent/config/config.go
    • Line 12: warning: exported type ConfigBase should have comment or be unexported (golint)
    • Line 32: 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 40: warning: comment on exported function LoadMapStrFromYamlFile should be of the form "LoadMapStrFromYamlFile ..." (golint)
    • log-formatter/util/config.go
    • Line 34: warning: exported type Fragment should have comment or be unexported (golint)
    • Line 38: warning: exported method Fragment.UnmarshalYAML should have comment or be unexported (golint)
    • Line 45: warning: exported type IncludeProcessor should have comment or be unexported (golint)
    • Line 49: warning: exported method IncludeProcessor.UnmarshalYAML should have comment or be unexported (golint)
    • log-formatter/util/plugin.go
    • Line 18: warning: exported function IsHttp should have comment or be unexported (golint)
    • Line 22: warning: exported function LoadPlugin should have comment or be unexported (golint)
    • log-formatter/agent/output/kafka/kafka.go
    • Line 18: warning: exported type KafkaConfig should have comment or be unexported (golint)
    • Line 24: warning: exported type KafkaOutput should have comment or be unexported (golint)
    • Line 39: warning: exported function NewKafkaOutput should have comment or be unexported (golint)
    • Line 89: warning: exported method KafkaOutput.Run should have comment or be unexported (golint)
    • Line 119: warning: exported method KafkaOutput.Stop should have comment or be unexported (golint)
    • Line 137: warning: exported method KafkaOutput.Send should have comment or be unexported (golint)
    • log-formatter/agent/agent.go
    • Line 8: warning: exported const Input should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported type Agent should have comment or be unexported (golint)
    • log-formatter/dev/tools/console-input.go
    • Line 12: warning: exported type Console should have comment or be unexported (golint)
    • Line 16: warning: exported function New should have comment or be unexported (golint)
    • Line 23: warning: exported method Console.Run should have comment or be unexported (golint)
    • Line 25: warning: exported method Console.Emit should have comment or be unexported (golint)
    • log-formatter/dev/tools/forwarder.go
    • Line 7: warning: exported type Forwarder should have comment or be unexported (golint)
    • Line 9: warning: exported function New should have comment or be unexported (golint)
    • Line 14: warning: exported method Forwarder.Format should have comment or be unexported (golint)
    • log-formatter/controller/controller.go
    • Line 18: warning: exported type HeartBeat should have comment or be unexported (golint)
    • Line 23: warning: exported type Controller should have comment or be unexported (golint)
    • Line 32: warning: exported function NewController should have comment or be unexported (golint)
    • Line 42: warning: exported method Controller.UpdateAgentStatusRequest should have comment or be unexported (golint)
    • Line 54: warning: exported method Controller.UpdateConfig should have comment or be unexported (golint)
    • Line 87: warning: exported method Controller.GetAgentHeartBeat should have comment or be unexported (golint)
    • Line 119: warning: exported method Controller.Run should have comment or be unexported (golint)
    • log-formatter/monitor-be/agent.go
    • Line 12: warning: exported const HeartbeatInterval should have comment or be unexported (golint)
    • Line 13: warning: exported const StaleInterval should have comment or be unexported (golint)
    • Line 15: warning: exported type Agent should have comment or be unexported (golint)
    • Line 25: warning: exported type AgentsSyncMap should have comment or be unexported (golint)
    • Line 31: warning: exported function NewAgentsSyncMap should have comment or be unexported (golint)
    • Line 38: warning: exported method AgentsSyncMap.Update should have comment or be unexported (golint)
    • Line 47: warning: exported method AgentsSyncMap.TryGet should have comment or be unexported (golint)
    • Line 52: 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 57: warning: exported method AgentsSyncMap.GetAll should have comment or be unexported (golint)
    • Line 67: warning: exported method AgentsSyncMap.ToJson should have comment or be unexported (golint)
    • Line 74: warning: exported method AgentsSyncMap.AgentToJson should have comment or be unexported (golint)
    • Line 89: warning: exported method AgentsSyncMap.Tick should have comment or be unexported (golint)
    • log-formatter/agent/input/console/console.go
    • Line 17: warning: exported type Console should have comment or be unexported (golint)
    • Line 21: warning: exported function NewConsole should have comment or be unexported (golint)
    • Line 28: warning: exported method Console.Run should have comment or be unexported (golint)
    • Line 30: warning: exported method Console.Emit should have comment or be unexported (golint)
    • Line 37: warning: exported method Console.Stop should have comment or be unexported (golint)
    • log-formatter/agent/input/elasticsearch/elasticsearch.go
    • Line 19: warning: exported type Query should have comment or be unexported (golint)
    • Line 25: warning: exported type EsConfig should have comment or be unexported (golint)
    • Line 30: warning: exported type EsInput should have comment or be unexported (golint)
    • Line 41: warning: exported function New should have comment or be unexported (golint)
    • Line 102: warning: exported method EsInput.Stop should have comment or be unexported (golint)
    • Line 104: warning: exported method EsInput.Run should have comment or be unexported (golint)
    • Line 180: warning: exported method EsInput.Emit should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell94%

Misspell Finds commonly misspelled English words