Preparing report...

Report for github.com/GraphMetrics/graphmetrics-go

A+    Excellent!    Found 13 issues across 16 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!


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!


golint18%

Golint is a linter for Go source code.

    • graphmetrics-go/internal/models/definitions.go
    • Line 5: warning: exported type OperationDefinition should have comment or be unexported (golint)
    • Line 12: warning: exported type UsageDefinitions should have comment or be unexported (golint)
    • Line 17: warning: exported function NewUsageDefinitions should have comment or be unexported (golint)
    • graphmetrics-go/internal/models/metrics.go
    • Line 18: warning: exported type Histogram should have comment or be unexported (golint)
    • Line 23: warning: exported type FieldMetrics should have comment or be unexported (golint)
    • Line 30: warning: exported method FieldMetrics.MarshalJSON should have comment or be unexported (golint)
    • Line 51: warning: exported type TypeMetrics should have comment or be unexported (golint)
    • Line 55: warning: exported method TypeMetrics.FindFieldMetrics should have comment or be unexported (golint)
    • Line 58: 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 67: warning: exported type OperationMetrics should have comment or be unexported (golint)
    • Line 73: warning: exported method OperationMetrics.MarshalJSON should have comment or be unexported (golint)
    • Line 94: warning: exported type MetricsContext should have comment or be unexported (golint)
    • Line 100: warning: exported type ContextualizedUsageMetrics should have comment or be unexported (golint)
    • Line 106: warning: exported method ContextualizedUsageMetrics.FindTypeMetrics should have comment or be unexported (golint)
    • Line 109: 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 117: warning: exported method ContextualizedUsageMetrics.FindOperationMetrics should have comment or be unexported (golint)
    • Line 120: 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 129: warning: exported type UsageMetrics should have comment or be unexported (golint)
    • Line 134: warning: exported method UsageMetrics.FindContextMetrics should have comment or be unexported (golint)
    • Line 155: warning: exported function NewUsageMetrics should have comment or be unexported (golint)
    • graphmetrics-go/messages.go
    • Line 9: warning: exported type FieldMessage should have comment or be unexported (golint)
    • Line 18: warning: exported type OperationMessage should have comment or be unexported (golint)
    • graphmetrics-go/client/apollo.go
    • Line 10: warning: exported function ApolloExtractor should have comment or be unexported (golint)
    • Line 17: warning: exported function ApolloMiddleware should have comment or be unexported (golint)
    • Line 24: warning: should not use basic type string as key in context.WithValue (golint)
    • graphmetrics-go/configuration.go
    • Line 19: warning: exported type Configuration should have comment or be unexported (golint)
    • Line 27: warning: exported type AdvancedConfiguration should have comment or be unexported (golint)
    • Line 36: warning: exported method Configuration.GetEndpoint should have comment or be unexported (golint)
    • Line 43: warning: exported method Configuration.GetProtocol should have comment or be unexported (golint)
    • Line 50: warning: exported method Configuration.GetFieldBufferSize should have comment or be unexported (golint)
    • Line 57: warning: exported method Configuration.GetOperationBufferSize should have comment or be unexported (golint)
    • Line 64: warning: exported method Configuration.GetDebug should have comment or be unexported (golint)
    • Line 71: warning: exported method Configuration.GetStopTimeout should have comment or be unexported (golint)
    • Line 78: warning: exported method Configuration.GetLogger should have comment or be unexported (golint)
    • Line 85: warning: exported method Configuration.GetClientExtractor should have comment or be unexported (golint)
    • graphmetrics-go/sender.go
    • Line 20: warning: exported type Sender should have comment or be unexported (golint)
    • Line 33: warning: exported function NewSender should have comment or be unexported (golint)
    • Line 54: warning: exported method Sender.SendMetrics should have comment or be unexported (golint)
    • Line 58: warning: exported method Sender.SendDefinitions should have comment or be unexported (golint)
    • Line 97: warning: exported method Sender.Stop should have comment or be unexported (golint)
    • graphmetrics-go/aggregator.go
    • Line 14: warning: exported type Aggregator should have comment or be unexported (golint)
    • Line 29: warning: exported function NewAggregator should have comment or be unexported (golint)
    • Line 44: warning: exported method Aggregator.Start should have comment or be unexported (golint)
    • Line 60: warning: exported method Aggregator.Stop should have comment or be unexported (golint)
    • Line 75: warning: exported method Aggregator.PushField should have comment or be unexported (golint)
    • Line 87: warning: exported method Aggregator.PushOperation 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!