Preparing report...

Report for github.com/gojekfarm/weaver

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


golint50%

Golint is a linter for Go source code.

    • weaver/pkg/shard/no.go
    • Line 11: warning: exported function NewNoStrategy should have comment or be unexported (golint)
    • Line 32: warning: exported type NoStrategy should have comment or be unexported (golint)
    • Line 36: warning: exported method NoStrategy.Shard should have comment or be unexported (golint)
    • Line 40: warning: exported type NoStrategyConfig should have comment or be unexported (golint)
    • weaver/server/router.go
    • Line 13: warning: exported type Router should have comment or be unexported (golint)
    • Line 20: warning: exported method Router.Route should have comment or be unexported (golint)
    • Line 38: warning: exported function NewRouter should have comment or be unexported (golint)
    • Line 45: warning: exported method Router.WatchRouteUpdates should have comment or be unexported (golint)
    • Line 49: warning: exported method Router.BootstrapRoutes should have comment or be unexported (golint)
    • weaver/pkg/logger/logger.go
    • Line 14: warning: exported function SetupLogger should have comment or be unexported (golint)
    • Line 28: warning: exported function AddHook should have comment or be unexported (golint)
    • Line 32: warning: exported function Debug should have comment or be unexported (golint)
    • Line 36: warning: exported function Debugf should have comment or be unexported (golint)
    • Line 40: warning: exported function Debugln should have comment or be unexported (golint)
    • Line 44: warning: exported function Debugrf should have comment or be unexported (golint)
    • Line 48: warning: exported function Error should have comment or be unexported (golint)
    • Line 52: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 56: warning: exported function Errorln should have comment or be unexported (golint)
    • Line 60: warning: exported function Errorrf should have comment or be unexported (golint)
    • Line 64: warning: exported function ErrorWithFieldsf should have comment or be unexported (golint)
    • Line 68: warning: exported function Fatal should have comment or be unexported (golint)
    • Line 72: warning: exported function Fatalf should have comment or be unexported (golint)
    • Line 76: warning: exported function Fatalln should have comment or be unexported (golint)
    • Line 80: warning: exported function Info should have comment or be unexported (golint)
    • Line 84: warning: exported function Infof should have comment or be unexported (golint)
    • Line 88: warning: exported function Infoln should have comment or be unexported (golint)
    • Line 92: warning: exported function Inforf should have comment or be unexported (golint)
    • Line 96: warning: exported function InfoWithFieldsf should have comment or be unexported (golint)
    • Line 100: warning: exported function ProxyInfo should have comment or be unexported (golint)
    • Line 141: warning: exported function Warn should have comment or be unexported (golint)
    • Line 145: warning: exported function Warnf should have comment or be unexported (golint)
    • Line 149: warning: exported function Warnln should have comment or be unexported (golint)
    • Line 153: warning: exported function WithField should have comment or be unexported (golint)
    • Line 157: warning: exported function WithFields should have comment or be unexported (golint)
    • weaver/backend.go
    • Line 14: warning: exported type Backend should have comment or be unexported (golint)
    • Line 20: warning: exported type BackendOptions should have comment or be unexported (golint)
    • Line 24: warning: exported function NewBackend should have comment or be unexported (golint)
    • weaver/endpoint.go
    • Line 31: warning: exported type Endpoint should have comment or be unexported (golint)
    • Line 36: warning: exported function NewEndpoint should have comment or be unexported (golint)
    • Line 52: warning: exported method Endpoint.Shard should have comment or be unexported (golint)
    • weaver/server/server.go
    • Line 14: warning: exported type Weaver should have comment or be unexported (golint)
    • Line 18: warning: exported function ShutdownServer should have comment or be unexported (golint)
    • Line 22: warning: exported function StartServer should have comment or be unexported (golint)
    • weaver/config/config.go
    • Line 18: warning: exported type Config should have comment or be unexported (golint)
    • Line 35: warning: exported function Load should have comment or be unexported (golint)
    • Line 66: warning: exported function ServerReadTimeoutInMillis should have comment or be unexported (golint)
    • Line 70: warning: exported function ServerWriteTimeoutInMillis should have comment or be unexported (golint)
    • Line 74: warning: exported function ProxyServerAddress should have comment or be unexported (golint)
    • Line 78: warning: exported function ETCDKeyPrefix should have comment or be unexported (golint)
    • Line 82: warning: exported function NewRelicConfig should have comment or be unexported (golint)
    • Line 86: warning: exported function SentryDSN should have comment or be unexported (golint)
    • Line 90: warning: exported function StatsD should have comment or be unexported (golint)
    • Line 94: warning: exported function Proxy should have comment or be unexported (golint)
    • Line 98: warning: exported function NewETCDClient should have comment or be unexported (golint)
    • Line 113: warning: exported function LogLevel should have comment or be unexported (golint)
    • weaver/pkg/instrumentation/newrelic.go
    • Line 19: warning: exported function InitNewRelic should have comment or be unexported (golint)
    • Line 32: warning: exported function ShutdownNewRelic should have comment or be unexported (golint)
    • Line 38: warning: exported function NewRelicApp should have comment or be unexported (golint)
    • Line 42: warning: exported function StartRedisSegmentNow should have comment or be unexported (golint)
    • Line 53: warning: exported function NewContext should have comment or be unexported (golint)
    • Line 64: warning: exported function NewContextWithTransaction should have comment or be unexported (golint)
    • Line 68: warning: exported function GetTx should have comment or be unexported (golint)
    • weaver/config/proxy.go
    • Line 5: warning: exported type ProxyConfig should have comment or be unexported (golint)
    • Line 23: warning: exported method ProxyConfig.ProxyDialerTimeoutInMS should have comment or be unexported (golint)
    • Line 27: warning: exported method ProxyConfig.ProxyDialerKeepAliveInMS should have comment or be unexported (golint)
    • Line 31: warning: exported method ProxyConfig.ProxyMaxIdleConns should have comment or be unexported (golint)
    • Line 35: warning: exported method ProxyConfig.ProxyIdleConnTimeoutInMS should have comment or be unexported (golint)
    • Line 39: warning: exported method ProxyConfig.KeepAliveEnabled should have comment or be unexported (golint)
    • weaver/pkg/shard/domain.go
    • Line 12: warning: exported type CustomError should have comment or be unexported (golint)
    • Line 20: warning: exported function Error should have comment or be unexported (golint)
    • Line 24: warning: exported type BackendDefinition should have comment or be unexported (golint)
    • Line 30: warning: exported method BackendDefinition.Validate should have comment or be unexported (golint)
    • weaver/pkg/shard/hashring.go
    • Line 14: warning: exported function NewHashRingStrategy should have comment or be unexported (golint)
    • Line 35: warning: exported type HashRingStrategy should have comment or be unexported (golint)
    • Line 40: warning: exported method HashRingStrategy.Shard should have comment or be unexported (golint)
    • Line 45: warning: exported type HashRingStrategyConfig should have comment or be unexported (golint)
    • Line 50: warning: exported method HashRingStrategyConfig.Validate should have comment or be unexported (golint)
    • weaver/pkg/shard/lookup.go
    • Line 9: warning: exported function NewLookupStrategy should have comment or be unexported (golint)
    • Line 25: warning: exported type LookupStrategy should have comment or be unexported (golint)
    • Line 29: warning: exported method LookupStrategy.Shard should have comment or be unexported (golint)
    • weaver/pkg/util/util.go
    • Line 8: warning: exported function ToSnake should have comment or be unexported (golint)
    • Line 24: warning: exported function BoolToOnOff should have comment or be unexported (golint)
    • weaver/etcd/routeloader.go
    • Line 19: warning: exported function NewRouteLoader should have comment or be unexported (golint)
    • Line 83: warning: exported method RouteLoader.WatchRoutes should have comment or be unexported (golint)
    • Line 131: warning: exported method RouteLoader.BootstrapRoutes should have comment or be unexported (golint)
    • weaver/pkg/shard/prefix_lookup.go
    • Line 29: warning: exported function NewPrefixLookupStrategy should have comment or be unexported (golint)
    • Line 56: warning: exported type PrefixLookupStrategy should have comment or be unexported (golint)
    • Line 61: warning: exported method PrefixLookupStrategy.Shard should have comment or be unexported (golint)
    • weaver/pkg/shard/s2.go
    • Line 18: warning: exported function NewS2Strategy should have comment or be unexported (golint)
    • Line 48: warning: exported type S2Strategy should have comment or be unexported (golint)
    • Line 54: warning: exported type S2StrategyConfig should have comment or be unexported (golint)
    • Line 60: warning: exported method S2StrategyConfig.Validate should have comment or be unexported (golint)
    • Line 144: warning: exported method S2Strategy.Shard should have comment or be unexported (golint)
    • weaver/server/loader.go
    • Line 9: warning: exported type UpsertRouteFunc should have comment or be unexported (golint)
    • Line 10: warning: exported type DeleteRouteFunc should have comment or be unexported (golint)
    • Line 12: warning: exported type RouteLoader should have comment or be unexported (golint)
    • weaver/config/statsd.go
    • Line 3: warning: exported type StatsDConfig should have comment or be unexported (golint)
    • Line 21: warning: exported method StatsDConfig.Prefix should have comment or be unexported (golint)
    • Line 25: warning: exported method StatsDConfig.FlushPeriodInSeconds should have comment or be unexported (golint)
    • Line 29: warning: exported method StatsDConfig.Host should have comment or be unexported (golint)
    • Line 33: warning: exported method StatsDConfig.Port should have comment or be unexported (golint)
    • Line 37: warning: exported method StatsDConfig.Enabled should have comment or be unexported (golint)
    • weaver/pkg/instrumentation/statsd.go
    • Line 15: warning: exported function InitiateStatsDMetrics should have comment or be unexported (golint)
    • Line 37: warning: exported function StatsDClient should have comment or be unexported (golint)
    • Line 41: warning: exported function CloseStatsDClient should have comment or be unexported (golint)
    • Line 48: warning: exported function NewTiming should have comment or be unexported (golint)
    • Line 56: warning: exported function IncrementTotalRequestCount should have comment or be unexported (golint)
    • Line 60: warning: exported function IncrementAPIRequestCount should have comment or be unexported (golint)
    • Line 64: warning: exported function IncrementAPIStatusCount should have comment or be unexported (golint)
    • Line 68: warning: exported function IncrementAPIBackendRequestCount should have comment or be unexported (golint)
    • Line 72: warning: exported function IncrementAPIBackendStatusCount should have comment or be unexported (golint)
    • Line 76: warning: exported function IncrementCrashCount should have comment or be unexported (golint)
    • Line 80: warning: exported function IncrementNotFound should have comment or be unexported (golint)
    • Line 84: warning: exported function IncrementInternalAPIStatusCount should have comment or be unexported (golint)
    • Line 88: warning: exported function TimeTotalLatency should have comment or be unexported (golint)
    • Line 96: warning: exported function TimeAPILatency should have comment or be unexported (golint)
    • Line 104: warning: exported function TimeAPIBackendLatency should have comment or be unexported (golint)
    • weaver/pkg/shard/modulo.go
    • Line 11: warning: exported function NewModuloStrategy should have comment or be unexported (golint)
    • Line 27: warning: exported type ModuloStrategy should have comment or be unexported (golint)
    • Line 31: warning: exported method ModuloStrategy.Shard should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!