Preparing report...

Report for github.com/foomo/keel

A+    Excellent!    Found 27 issues across 35 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.


golint22%

Golint is a linter for Go source code.

    • keel/net/http/header.go
    • Line 4: warning: exported const HeaderAccept should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: comment on exported const HeaderAccessControlRequestMethod should be of the form "HeaderAccessControlRequestMethod ..." (golint)
    • Line 42: warning: comment on exported const HeaderStrictTransportSecurity should be of the form "HeaderStrictTransportSecurity ..." (golint)
    • keel/log/fields.go
    • Line 11: warning: exported const NumKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported function FNum should have comment or be unexported (golint)
    • Line 25: warning: exported function FName should have comment or be unexported (golint)
    • Line 29: warning: exported function FDuration should have comment or be unexported (golint)
    • Line 33: warning: exported function FValue should have comment or be unexported (golint)
    • keel/log/fields_http.go
    • Line 44: warning: exported function FHTTPRequestID should have comment or be unexported (golint)
    • Line 48: warning: exported function FHTTPRequestContentLength should have comment or be unexported (golint)
    • Line 52: warning: exported function FHTTPWroteBytes should have comment or be unexported (golint)
    • Line 56: warning: exported function FHTTPStatusCode should have comment or be unexported (golint)
    • Line 60: warning: exported function FHTTPTarget should have comment or be unexported (golint)
    • Line 64: warning: exported function FHTTPClientIP should have comment or be unexported (golint)
    • Line 68: warning: exported function FHTTPFlavor should have comment or be unexported (golint)
    • Line 72: warning: exported function FHTTPScheme should have comment or be unexported (golint)
    • Line 76: warning: exported function FHTTPUserAgent should have comment or be unexported (golint)
    • Line 80: warning: exported function FHTTPHost should have comment or be unexported (golint)
    • Line 84: warning: exported function FHTTPMethod should have comment or be unexported (golint)
    • keel/service_http.go
    • Line 21: warning: exported function NewServiceHTTP should have comment or be unexported (golint)
    • Line 38: warning: exported method ServiceHTTP.Start should have comment or be unexported (golint)
    • Line 56: warning: exported method ServiceHTTP.Close should have comment or be unexported (golint)
    • keel/log/fields_service.go
    • Line 13: warning: exported function FPeerService should have comment or be unexported (golint)
    • Line 38: warning: exported function FServiceName should have comment or be unexported (golint)
    • Line 42: warning: exported function FServiceNamespace should have comment or be unexported (golint)
    • Line 46: warning: exported function FServiceInstanceID should have comment or be unexported (golint)
    • Line 50: warning: exported function FServiceVersion should have comment or be unexported (golint)
    • Line 54: warning: exported function FServiceMethod should have comment or be unexported (golint)
    • keel/log/fields_trace.go
    • Line 8: warning: exported const TraceID should have comment (or a comment on this block) or be unexported (golint)
    • Line 11: warning: exported function FTraceID should have comment or be unexported (golint)
    • keel/config/config.go
    • Line 25: warning: exported function GetBool should have comment or be unexported (golint)
    • Line 33: warning: exported function MustGetBool should have comment or be unexported (golint)
    • Line 41: warning: exported function GetInt should have comment or be unexported (golint)
    • Line 48: warning: exported function MustGetInt should have comment or be unexported (golint)
    • Line 55: warning: exported function GetString should have comment or be unexported (golint)
    • Line 63: warning: exported function MustGetString should have comment or be unexported (golint)
    • Line 71: warning: exported function GetStringSlice should have comment or be unexported (golint)
    • keel/net/http/middleware/recover.go
    • Line 12: warning: exported type RecoverConfig should have comment or be unexported (golint)
    • Line 16: warning: exported var DefaultRecoverConfig should have comment or be unexported (golint)
    • Line 20: warning: exported function Recover should have comment or be unexported (golint)
    • Line 24: warning: exported function RecoverWithConfig should have comment or be unexported (golint)
    • keel/log/fields_error.go
    • Line 10: warning: exported const ErrorTypeKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported function FError should have comment or be unexported (golint)
    • Line 19: warning: exported function FErrorType should have comment or be unexported (golint)
    • Line 23: warning: exported function FStackSkip should have comment or be unexported (golint)
    • keel/telemetry/telemetry.go
    • Line 20: warning: exported const DefaultServiceName should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported var ServiceName should have comment or be unexported (golint)
    • Line 76: warning: exported function Provider should have comment or be unexported (golint)
    • Line 80: warning: exported function Tracer should have comment or be unexported (golint)
    • Line 84: warning: exported function Start should have comment or be unexported (golint)
    • Line 88: warning: exported function End should have comment or be unexported (golint)
    • keel/net/http/middleware/logger.go
    • Line 12: warning: exported type LoggerConfig should have comment or be unexported (golint)
    • Line 14: warning: exported var DefaultLoggerConfig should have comment or be unexported (golint)
    • Line 16: warning: exported function Logger should have comment or be unexported (golint)
    • Line 20: warning: exported function LoggerWithConfig should have comment or be unexported (golint)
    • keel/net/http/middleware/telemetry.go
    • Line 17: warning: exported type TelemetryConfig should have comment or be unexported (golint)
    • Line 21: warning: exported var DefaultTelemetryConfig should have comment or be unexported (golint)
    • Line 25: warning: exported function Telemetry should have comment or be unexported (golint)
    • Line 29: warning: exported function TelemetryWithConfig should have comment or be unexported (golint)
    • keel/log/configure.go
    • Line 9: warning: exported type Config should have comment or be unexported (golint)
    • Line 13: warning: exported function Configure should have comment or be unexported (golint)
    • Line 20: warning: exported method Config.Logger should have comment or be unexported (golint)
    • Line 29: warning: exported method Config.With should have comment or be unexported (golint)
    • Line 34: warning: exported method Config.HTTPRequest should have comment or be unexported (golint)
    • keel/log/log.go
    • Line 13: warning: exported const ModeDev should have comment (or a comment on this block) or be unexported (golint)
    • keel/option.go
    • Line 14: warning: exported function WithLogger should have comment or be unexported (golint)
    • Line 20: warning: exported function WithLogFields should have comment or be unexported (golint)
    • Line 26: warning: exported function WithConfig should have comment or be unexported (golint)
    • Line 32: warning: exported function WithContext should have comment or be unexported (golint)
    • Line 38: warning: exported function WithShutdownTimeout should have comment or be unexported (golint)
    • keel/metrics/metrics.go
    • Line 8: warning: exported function NewRequestSizeSummaryVec should have comment or be unexported (golint)
    • Line 20: warning: exported function NewResponseSizeSummaryVec should have comment or be unexported (golint)
    • Line 32: warning: exported function NewRequestsCounterVec should have comment or be unexported (golint)
    • Line 44: warning: exported function NewRequestDurationHistogram should have comment or be unexported (golint)
    • keel/net/http/middleware/request_id.go
    • Line 12: warning: exported type RequestIDConfig should have comment or be unexported (golint)
    • Line 16: warning: exported var DefaultRequestIDConfig should have comment or be unexported (golint)
    • Line 18: warning: exported function DefaultRequestIDGenerator should have comment or be unexported (golint)
    • Line 22: warning: exported function RequestID should have comment or be unexported (golint)
    • Line 26: warning: exported function RequestIDWithConfig should have comment or be unexported (golint)
    • keel/log/fields_net.go
    • Line 15: warning: exported function FNetHostIP should have comment or be unexported (golint)
    • Line 19: warning: exported function FNetHostPort should have comment or be unexported (golint)
    • keel/log/with.go
    • Line 16: warning: exported function WithError should have comment or be unexported (golint)
    • Line 20: warning: exported function WithServiceName should have comment or be unexported (golint)
    • Line 24: warning: context.Context should be the first parameter of a function (golint)
    • Line 24: warning: exported function WithTraceID should have comment or be unexported (golint)
    • Line 31: warning: exported function WithHTTPRequest should have comment or be unexported (golint)
    • keel/service_http_zap.go
    • Line 12: warning: exported const DefaultServiceHTTPZapName should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported function NewServiceHTTPZap should have comment or be unexported (golint)
    • Line 23: warning: exported function NewDefaultServiceHTTPZap should have comment or be unexported (golint)
    • keel/service_http_viper.go
    • Line 15: warning: exported const DefaultServiceHTTPViperName should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported function NewServiceHTTPViper should have comment or be unexported (golint)
    • Line 50: warning: exported function NewDefaultServiceHTTPViper should have comment or be unexported (golint)
    • keel/metrics/metrics_http.go
    • Line 7: warning: exported function NewHTTPRequestSizeSummaryVec should have comment or be unexported (golint)
    • Line 11: warning: exported function NewHTTPResponseSizeSummaryVec should have comment or be unexported (golint)
    • Line 15: warning: exported function NewHTTPRequestsCounterVec should have comment or be unexported (golint)
    • Line 19: warning: exported function NewHTTPRequestDurationHistogram should have comment or be unexported (golint)
    • keel/server.go
    • Line 30: warning: exported function NewServer should have comment or be unexported (golint)
    • keel/service_http_prometheus.go
    • Line 14: warning: exported const DefaultServiceHTTPPrometheusName should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported function NewServiceHTTPPrometheus should have comment or be unexported (golint)
    • Line 30: warning: exported function NewDefaultServiceHTTPPrometheus 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!