Preparing report...

Report for github.com/atlassian/gostatsd

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


gocyclo97%

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.


golint62%

Golint is a linter for Go source code.

    • gostatsd/pkg/fakesocket/fake.go
    • Line 23: warning: exported var ErrClosedConnection should have comment or be unexported (golint)
    • Line 24: warning: exported var ErrAlreadyClosedConnection 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 146: warning: exported function NewFakePacketConn should have comment or be unexported (golint)
    • Line 153: warning: exported function NewCountedFakePacketConn should have comment or be unexported (golint)
    • gostatsd/matcher.go
    • Line 8: warning: exported type StringMatch should have comment or be unexported (golint)
    • Line 15: warning: exported type StringMatchList should have comment or be unexported (golint)
    • Line 17: warning: exported function NewStringMatch should have comment or be unexported (golint)
    • Line 62: warning: comment on exported method StringMatchList.MatchAnyMultiple should be of the form "MatchAnyMultiple ..." (golint)
    • gostatsd/timers.go
    • Line 30: warning: exported type HistogramThreshold should have comment or be unexported (golint)
    • Line 42: warning: exported method Timer.AddTagsSetSource should have comment or be unexported (golint)
    • Line 79: warning: exported function DisabledSubMetrics should have comment or be unexported (golint)
    • gostatsd/pkg/stats/statser_internal.go
    • Line 46: warning: exported method InternalStatser.NotifyFlush should have comment or be unexported (golint)
    • Line 126: warning: exported method InternalStatser.Event should have comment or be unexported (golint)
    • Line 130: warning: exported method InternalStatser.WaitForEvents should have comment or be unexported (golint)
    • gostatsd/pkg/stats/statser_tagged.go
    • Line 29: warning: exported method TaggedStatser.NotifyFlush should have comment or be unexported (golint)
    • Line 33: warning: exported method TaggedStatser.RegisterFlush should have comment or be unexported (golint)
    • Line 87: warning: exported method TaggedStatser.Event should have comment or be unexported (golint)
    • Line 93: warning: exported method TaggedStatser.WaitForEvents should have comment or be unexported (golint)
    • gostatsd/pkg/web/httpservers.go
    • Line 37: warning: exported function NewHttpServersFromViper should have comment or be unexported (golint)
    • Line 75: warning: exported function NewHttpServer should have comment or be unexported (golint)
    • gostatsd/cloudprovider.go
    • Line 35: warning: exported type InstanceInfo should have comment or be unexported (golint)
    • Line 44: warning: exported type CachedInstances should have comment or be unexported (golint)
    • gostatsd/metrics.go
    • Line 74: warning: exported function Bucket should have comment or be unexported (golint)
    • Line 92: warning: exported method Metric.FormatTagsKey should have comment or be unexported (golint)
    • Line 99: warning: exported function FormatTagsKey should have comment or be unexported (golint)
    • gostatsd/sets.go
    • Line 16: warning: exported method Set.AddTagsSetSource should have comment or be unexported (golint)
    • gostatsd/pkg/statsd/aggregator.go
    • Line 195: warning: exported method MetricAggregator.RunMetrics should have comment or be unexported (golint)
    • Line 199: warning: exported method MetricAggregator.Process should have comment or be unexported (golint)
    • gostatsd/pkg/stats/statser_null.go
    • Line 46: warning: exported method NullStatser.Event should have comment or be unexported (golint)
    • Line 48: warning: exported method NullStatser.WaitForEvents should have comment or be unexported (golint)
    • gostatsd/pkg/statsd/handler_cloud.go
    • Line 59: warning: exported method CloudHandler.DispatchMetricMap should have comment or be unexported (golint)
    • Line 103: warning: exported method CloudHandler.DispatchEvent should have comment or be unexported (golint)
    • Line 122: warning: exported method CloudHandler.RunMetrics should have comment or be unexported (golint)
    • Line 170: warning: exported method CloudHandler.Run should have comment or be unexported (golint)
    • gostatsd/pkg/statsd/handler_backend.go
    • Line 30: warning: comment on exported type BackendHandler should be of the form "BackendHandler ..." (with optional leading article) (golint)
    • Line 164: warning: exported method BackendHandler.DispatchEvent should have comment or be unexported (golint)
    • gostatsd/internal/pool/datagram_buffer_pool.go
    • Line 7: warning: comment on exported type DatagramBufferPool should be of the form "DatagramBufferPool ..." (with optional leading article) (golint)
    • Line 12: warning: exported function NewDatagramBufferPool should have comment or be unexported (golint)
    • Line 23: warning: exported method DatagramBufferPool.Get should have comment or be unexported (golint)
    • Line 27: warning: exported method DatagramBufferPool.Put should have comment or be unexported (golint)
    • gostatsd/defaults_and_params.go
    • Line 58: warning: comment on exported const DefaultFlushAligned should be of the form "DefaultFlushAligned ..." (golint)
    • Line 125: warning: comment on exported const ParamFlushOffset should be of the form "ParamFlushOffset ..." (golint)
    • Line 127: warning: comment on exported const ParamFlushAligned should be of the form "ParamFlushAligned ..." (golint)
    • Line 165: warning: comment on exported const ParamBadLinesPerMinute should be of the form "ParamBadLinesPerMinute ..." (golint)
    • gostatsd/metric_map.go
    • Line 20: warning: exported function NewMetricMap should have comment or be unexported (golint)
    • Line 48: warning: exported function MergeMaps should have comment or be unexported (golint)
    • Line 56: warning: exported method MetricMap.Merge should have comment or be unexported (golint)
    • Line 63: warning: exported method MetricMap.MergeCounter should have comment or be unexported (golint)
    • Line 83: warning: exported method MetricMap.MergeGauge should have comment or be unexported (golint)
    • Line 103: warning: exported method MetricMap.MergeSet should have comment or be unexported (golint)
    • Line 125: warning: exported method MetricMap.MergeTimer should have comment or be unexported (golint)
    • Line 146: warning: exported method MetricMap.IsEmpty should have comment or be unexported (golint)
    • Line 209: warning: exported method MetricMap.SplitByTags should have comment or be unexported (golint)
    • gostatsd/pkg/statsd/handler_http_forwarder_v2.go
    • Line 179: warning: exported method HttpForwarderHandlerV2.EstimatedTags should have comment or be unexported (golint)
    • Line 188: warning: exported method HttpForwarderHandlerV2.RunMetricsContext should have comment or be unexported (golint)
    • Line 218: warning: exported method HttpForwarderHandlerV2.Run should have comment or be unexported (golint)
    • Line 340: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 473: warning: exported method HttpForwarderHandlerV2.DispatchEvent should have comment or be unexported (golint)
    • Line 515: warning: exported method HttpForwarderHandlerV2.WaitForEvents should have comment or be unexported (golint)
    • gostatsd/pkg/cachedinstances/k8s/k8s.go
    • Line 58: warning: comment on exported const ParamKubeconfigContext should be of the form "ParamKubeconfigContext ..." (golint)
    • Line 119: warning: exported method Provider.IpSink should have comment or be unexported (golint)
    • Line 123: warning: exported method Provider.InfoSource should have comment or be unexported (golint)
    • Line 127: warning: exported method Provider.EstimatedTags should have comment or be unexported (golint)
    • Line 132: warning: exported method Provider.Peek should have comment or be unexported (golint)
    • Line 137: warning: exported method Provider.Run should have comment or be unexported (golint)
    • gostatsd/pkg/cachedinstances/cloudprovider/cached_cloud_provider.go
    • Line 18: warning: exported function NewCachedCloudProvider should have comment or be unexported (golint)
    • Line 31: warning: exported type CachedCloudProvider should have comment or be unexported (golint)
    • Line 53: warning: exported method CachedCloudProvider.Run should have comment or be unexported (golint)
    • Line 121: warning: exported method CachedCloudProvider.Peek should have comment or be unexported (golint)
    • Line 132: warning: exported method CachedCloudProvider.IpSink should have comment or be unexported (golint)
    • Line 136: warning: exported method CachedCloudProvider.InfoSource should have comment or be unexported (golint)
    • Line 140: warning: exported method CachedCloudProvider.EstimatedTags should have comment or be unexported (golint)
    • Line 144: warning: exported method CachedCloudProvider.RunMetrics should have comment or be unexported (golint)
    • gostatsd/internal/fixtures/metrics.go
    • Line 9: warning: exported type MetricOpt should have comment or be unexported (golint)
    • Line 30: warning: exported function Name should have comment or be unexported (golint)
    • Line 36: warning: exported function AddTag should have comment or be unexported (golint)
    • Line 42: warning: exported function DropSource should have comment or be unexported (golint)
    • Line 46: warning: exported function DropTag should have comment or be unexported (golint)
    • Line 72: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gostatsd/internal/util/aligned_ticker.go
    • Line 28: warning: exported function NewAlignedTicker should have comment or be unexported (golint)
    • Line 32: warning: exported function NewAlignedTickerWithContext should have comment or be unexported (golint)
    • Line 97: warning: exported method AlignedTicker.Stop should have comment or be unexported (golint)
    • gostatsd/pkg/statsd/receiver.go
    • Line 51: warning: exported method DatagramReceiver.RunMetricsContext should have comment or be unexported (golint)
    • Line 76: warning: exported method DatagramReceiver.Run should have comment or be unexported (golint)
    • gostatsd/pkg/backends/sender/sender.go
    • Line 17: warning: exported type ConnFactory should have comment or be unexported (golint)
    • Line 19: warning: exported type Stream should have comment or be unexported (golint)
    • Line 25: warning: exported type Sender should have comment or be unexported (golint)
    • Line 34: warning: exported method Sender.Run should have comment or be unexported (golint)
    • Line 124: warning: exported method Sender.GetBuffer should have comment or be unexported (golint)
    • Line 128: warning: exported method Sender.PutBuffer should have comment or be unexported (golint)
    • gostatsd/types.go
    • Line 12: warning: exported function NanoNow should have comment or be unexported (golint)
    • Line 16: warning: exported function NanoMax should have comment or be unexported (golint)
    • Line 30: warning: exported type Wait should have comment or be unexported (golint)
    • Line 32: warning: exported type TimerSubtypes should have comment or be unexported (golint)
    • Line 58: warning: exported type MetricsRunner should have comment or be unexported (golint)
    • Line 62: warning: exported function MaybeAppendRunnable should have comment or be unexported (golint)
    • gostatsd/pkg/statsd/batched_reader.go
    • Line 10: warning: exported type Message should have comment or be unexported (golint)
    • Line 16: warning: exported type BatchReader should have comment or be unexported (golint)
    • Line 20: warning: exported type V6BatchReader should have comment or be unexported (golint)
    • Line 24: warning: exported type GenericBatchReader should have comment or be unexported (golint)
    • Line 28: warning: exported function NewBatchReader should have comment or be unexported (golint)
    • Line 46: warning: exported method V6BatchReader.ReadBatch should have comment or be unexported (golint)
    • Line 64: warning: exported method GenericBatchReader.ReadBatch should have comment or be unexported (golint)
    • gostatsd/pkg/statsd/parser.go
    • Line 78: warning: exported method DatagramParser.RunMetricsContext should have comment or be unexported (golint)
    • Line 95: warning: exported method DatagramParser.Run should have comment or be unexported (golint)
    • gostatsd/pkg/cloudproviders/fakeprovider/fake.go
    • Line 12: warning: exported type Counting should have comment or be unexported (golint)
    • Line 18: warning: exported method Counting.IPs should have comment or be unexported (golint)
    • Line 26: warning: exported method Counting.EstimatedTags should have comment or be unexported (golint)
    • Line 30: warning: exported method Counting.MaxInstancesBatch should have comment or be unexported (golint)
    • Line 34: warning: exported method Counting.Invocations should have comment or be unexported (golint)
    • Line 47: warning: exported type IP should have comment or be unexported (golint)
    • Line 53: warning: exported method IP.Name should have comment or be unexported (golint)
    • Line 57: warning: exported method IP.Instance should have comment or be unexported (golint)
    • Line 69: warning: exported type NotFound should have comment or be unexported (golint)
    • Line 73: warning: exported method NotFound.Name should have comment or be unexported (golint)
    • Line 77: warning: exported method NotFound.Instance should have comment or be unexported (golint)
    • Line 82: warning: exported type Failing should have comment or be unexported (golint)
    • Line 86: warning: exported method Failing.Name should have comment or be unexported (golint)
    • Line 90: warning: exported method Failing.Instance should have comment or be unexported (golint)
    • Line 95: warning: exported type Transient should have comment or be unexported (golint)
    • Line 100: warning: exported method Transient.Name should have comment or be unexported (golint)
    • Line 104: warning: exported method Transient.EstimatedTags should have comment or be unexported (golint)
    • Line 108: warning: exported method Transient.MaxInstancesBatch should have comment or be unexported (golint)
    • gostatsd/pkg/transport/pool.go
    • Line 30: warning: exported function NewTransportPool should have comment or be unexported (golint)
    • Line 39: warning: exported method TransportPool.Get should have comment or be unexported (golint)
    • gostatsd/metric_consolidator.go
    • Line 31: warning: exported function NewMetricConsolidator should have comment or be unexported (golint)
    • Line 40: warning: exported method MetricConsolidator.Run should have comment or be unexported (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!


misspell99%

Misspell Finds commonly misspelled English words