Preparing report...

Report for github.com/newrelic/newrelic-client-go

A+    Excellent!    Found 28 issues across 210 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!


golint87%

Golint is a linter for Go source code.

    • newrelic-client-go/pkg/logs/logs.go
    • Line 15: warning: exported const DefaultBatchWorkers should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type Logs should have comment or be unexported (golint)
    • newrelic-client-go/internal/http/compress.go
    • Line 15: warning: exported type RequestCompressor should have comment or be unexported (golint)
    • Line 22: warning: comment on exported method NoneCompressor.Compress should be of the form "Compress ..." (golint)
    • Line 33: warning: comment on exported method GzipCompressor.Compress should be of the form "Compress ..." (golint)
    • newrelic-client-go/pkg/region/region.go
    • Line 157: warning: exported method Region.SetInsightsBaseURL should have comment or be unexported (golint)
    • Line 197: warning: exported method Region.SetInsightsKeysBaseURL should have comment or be unexported (golint)
    • Line 203: warning: comment on exported method Region.InsightsKeysURL should be of the form "InsightsKeysURL ..." (golint)
    • newrelic-client-go/pkg/alerts/policies.go
    • Line 153: warning: exported method Alerts.CreatePolicyMutation should have comment or be unexported (golint)
    • Line 157: warning: exported method Alerts.CreatePolicyMutationWithContext should have comment or be unexported (golint)
    • Line 172: warning: exported method Alerts.UpdatePolicyMutation should have comment or be unexported (golint)
    • Line 176: warning: exported method Alerts.UpdatePolicyMutationWithContext should have comment or be unexported (golint)
    • newrelic-client-go/pkg/nrdb/nrdb_query.go
    • Line 6: warning: exported method Nrdb.Query should have comment or be unexported (golint)
    • Line 26: warning: exported method Nrdb.QueryHistory should have comment or be unexported (golint)
    • Line 30: warning: exported method Nrdb.QueryHistoryWithContext should have comment or be unexported (golint)
    • newrelic-client-go/pkg/entities/entity.go
    • Line 10: warning: comment on exported method AlertableEntityOutline.ImplementsEntity should be of the form "ImplementsEntity ..." (golint)
    • Line 12: warning: exported method ApmApplicationEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 13: warning: exported method ApmBrowserApplicationEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 14: warning: exported method ApmDatabaseInstanceEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 15: warning: exported method ApmExternalServiceEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 16: warning: exported method BrowserApplicationEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 17: warning: exported method DashboardEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 18: warning: exported method EntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 19: warning: exported method GenericEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 20: warning: exported method GenericInfrastructureEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 21: warning: exported method InfrastructureAwsLambdaFunctionEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 22: warning: exported method InfrastructureHostEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 23: warning: exported method InfrastructureIntegrationEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 24: warning: exported method MobileApplicationEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 25: warning: exported method SecureCredentialEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 26: warning: exported method SyntheticMonitorEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 27: warning: exported method ThirdPartyServiceEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 28: warning: exported method UnavailableEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • Line 29: warning: exported method WorkloadEntityOutline.ImplementsEntity should have comment or be unexported (golint)
    • newrelic-client-go/pkg/apiaccess/insights_keys.go
    • Line 8: warning: exported type InsightsKey should have comment or be unexported (golint)
    • Line 18: warning: exported method APIAccess.ListInsightsInsertKeys should have comment or be unexported (golint)
    • Line 29: warning: exported method APIAccess.CreateInsightsInsertKey should have comment or be unexported (golint)
    • Line 40: warning: exported method APIAccess.GetInsightsInsertKey should have comment or be unexported (golint)
    • Line 51: warning: exported method APIAccess.DeleteInsightsInsertKey should have comment or be unexported (golint)
    • Line 62: warning: exported method APIAccess.ListInsightsQueryKeys should have comment or be unexported (golint)
    • Line 73: warning: exported method APIAccess.CreateInsightsQueryKey should have comment or be unexported (golint)
    • Line 84: warning: exported method APIAccess.GetInsightsQueryKey should have comment or be unexported (golint)
    • Line 95: warning: exported method APIAccess.DeleteInsightsQueryKey should have comment or be unexported (golint)
    • newrelic-client-go/pkg/eventstometrics/eventstometrics.go
    • Line 225: warning: exported method EventsToMetricsCreateRuleResult.Errors should have comment or be unexported (golint)
    • Line 243: warning: exported method EventsToMetricsUpdateRuleResult.Errors should have comment or be unexported (golint)
    • Line 261: warning: exported method EventsToMetricsDeleteRuleResult.Errors should have comment or be unexported (golint)
    • newrelic-client-go/pkg/apiaccess/keys.go
    • Line 9: warning: exported type APIKey should have comment or be unexported (golint)
    • Line 17: warning: comment on exported method APIAccessIngestKeyError.GetError should be of the form "GetError ..." (golint)
    • Line 24: warning: exported method APIAccessUserKeyError.GetError should have comment or be unexported (golint)
    • newrelic-client-go/pkg/alerts/nrql_conditions.go
    • Line 12: warning: comment on exported type AlertsNrqlConditionExpiration should be of the form "AlertsNrqlConditionExpiration ..." (with optional leading article) (golint)
    • Line 33: warning: exported var AlertsFillOptionTypes should have comment or be unexported (golint)
    • Line 145: warning: comment on exported type NrqlBaselineDirection should be of the form "NrqlBaselineDirection ..." (with optional leading article) (golint)
    • Line 209: warning: exported type NrqlConditionsSearchCriteria should have comment or be unexported (golint)
    • Line 629: warning: exported method Alerts.DeleteNrqlConditionMutation should have comment or be unexported (golint)
    • Line 636: warning: exported method Alerts.DeleteNrqlConditionMutationWithContext should have comment or be unexported (golint)
    • newrelic-client-go/internal/http/auth.go
    • Line 43: warning: exported method InsightsInsertKeyAuthorizer.AuthorizeRequest should have comment or be unexported (golint)
    • Line 47: warning: exported type LicenseKeyAuthorizer should have comment or be unexported (golint)
    • Line 49: warning: exported method LicenseKeyAuthorizer.AuthorizeRequest should have comment or be unexported (golint)
    • Line 53: warning: exported type LogsInsertKeyAuthorizer should have comment or be unexported (golint)
    • Line 55: warning: exported method LogsInsertKeyAuthorizer.AuthorizeRequest should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!