Preparing report...

Report for github.com/improbable-eng/kedge

A+    Excellent!    Found 59 issues across 115 files

Tweet

gofmt97%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


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.


golint51%

Golint is a linter for Go source code.

    • kedge/pkg/kedge/grpc/backendpool/backend.go
    • Line 28: warning: exported var ParentDialFunc should have comment or be unexported (golint)
    • Line 160: 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)
    • kedge/pkg/map/iface.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 17: warning: exported type Route should have comment or be unexported (golint)
    • Line 29: warning: comment on exported type ErrorNotKedgeDestination should be of the form "ErrorNotKedgeDestination ..." (with optional leading article) (golint)
    • Line 36: warning: exported function NotKedgeDestinationErr should have comment or be unexported (golint)
    • Line 48: warning: exported function IsNotKedgeDestinationError should have comment or be unexported (golint)
    • kedge/pkg/kedge/http/backendpool/backend.go
    • Line 28: warning: comment on exported var ParentDialFunc should be of the form "ParentDialFunc ..." (golint)
    • Line 180: 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)
    • kedge/pkg/winch/auth.go
    • Line 24: warning: exported var NoAuth should have comment or be unexported (golint)
    • Line 29: warning: exported type AuthFactory should have comment or be unexported (golint)
    • Line 35: warning: exported function NewAuthFactory should have comment or be unexported (golint)
    • Line 43: warning: exported method AuthFactory.Get should have comment or be unexported (golint)
    • kedge/pkg/reporter/reporter.go
    • Line 47: warning: exported method Tracker.ErrType should have comment or be unexported (golint)
    • Line 67: warning: comment on exported function Extract should be of the form "Extract ..." (golint)
    • kedge/pkg/kedge/http/lbtransport/policy.go
    • Line 21: warning: exported type LBPolicy should have comment or be unexported (golint)
    • Line 56: warning: exported function RoundRobinPolicyFromFlags should have comment or be unexported (golint)
    • Line 60: warning: exported function RoundRobinPolicy should have comment or be unexported (golint)
    • kedge/pkg/kedge/http/director/proxyreq/request.go
    • Line 9: warning: exported type ProxyMode should have comment or be unexported (golint)
    • Line 12: warning: exported const MODE_FORWARD_PROXY should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 34: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 39: warning: exported function GetProxyMode should have comment or be unexported (golint)
    • kedge/pkg/kedge/common/common.go
    • Line 52: warning: exported function ExtractHostPort should have comment or be unexported (golint)
    • Line 67: warning: exported function HostMatches should have comment or be unexported (golint)
    • Line 77: warning: exported function PortAllowed should have comment or be unexported (golint)
    • Line 92: warning: exported function AdhocResolveHost should have comment or be unexported (golint)
    • kedge/pkg/winch/routes.go
    • Line 15: warning: exported type StaticRoutes should have comment or be unexported (golint)
    • Line 20: warning: exported function NewStaticRoutes should have comment or be unexported (golint)
    • Line 75: warning: exported method StaticRoutes.HTTP should have comment or be unexported (golint)
    • Line 79: warning: exported method StaticRoutes.GRPC should have comment or be unexported (golint)
    • kedge/pkg/map/route.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 10: warning: exported type RouteGetter should have comment or be unexported (golint)
    • kedge/pkg/http/tripperware/auth.go
    • Line 16: warning: exported const ProxyAuthHeader should have comment (or a comment on this block) or be unexported (golint)
    • Line 62: warning: exported function WrapForProxyAuth should have comment or be unexported (golint)
    • Line 74: warning: exported function WrapForBackendAuth should have comment or be unexported (golint)
    • kedge/pkg/metrics/backend_configuration.go
    • Line 6: warning: exported const ConfiguationActionCreate should have comment (or a comment on this block) or be unexported (golint)
    • Line 12: warning: exported var BackendHTTPConfigurationCounter should have comment or be unexported (golint)
    • kedge/pkg/reporter/errtypes/errtypes.go
    • Line 3: warning: exported type Type should have comment or be unexported (golint)
    • Line 6: warning: exported const OK should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: comment on exported const TransportUnknownError should be of the form "TransportUnknownError ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words