Preparing report...

Report for github.com/modprox/mp

A+    Excellent!    Found 46 issues across 127 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!


gocyclo99%

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.


golint64%

Golint is a linter for Go source code.

    • mp/pkg/coordinates/modules.go
    • Line 9: warning: exported type Module should have comment or be unexported (golint)
    • Line 38: warning: exported type SerialModule should have comment or be unexported (golint)
    • Line 43: warning: exported type ModsByVersion should have comment or be unexported (golint)
    • mp/pkg/upstream/request.go
    • Line 38: warning: comment on exported method Request.Equals should be of the form "Equals ..." (golint)
    • Line 83: warning: comment on exported method Request.URI should be of the form "URI ..." (golint)
    • mp/pkg/metrics/stats/sender.go
    • Line 12: warning: exported type Service should have comment or be unexported (golint)
    • Line 19: warning: exported const Proxy should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported function Discard should have comment or be unexported (golint)
    • mp/pkg/configutil/load.go
    • Line 10: warning: exported function GetConfigFilename should have comment or be unexported (golint)
    • Line 18: warning: exported function LoadConfig should have comment or be unexported (golint)
    • mp/pkg/clients/zips/http.go
    • Line 25: warning: exported type HTTPOptions should have comment or be unexported (golint)
    • Line 29: warning: exported function NewHTTPClient should have comment or be unexported (golint)
    • mp/pkg/repository/revinfo.go
    • Line 8: warning: exported type RevInfo should have comment or be unexported (golint)
    • Line 23: warning: exported method RevInfo.Bytes should have comment or be unexported (golint)
    • mp/proxy/config/config.go
    • Line 15: warning: exported type Configuration should have comment or be unexported (golint)
    • Line 29: warning: exported type ZipProxy should have comment or be unexported (golint)
    • Line 34: warning: exported type APIServer should have comment or be unexported (golint)
    • Line 46: warning: exported method APIServer.Server should have comment or be unexported (golint)
    • Line 88: warning: exported type Storage should have comment or be unexported (golint)
    • Line 96: warning: exported type Registry should have comment or be unexported (golint)
    • Line 103: warning: exported type Transforms should have comment or be unexported (golint)
    • mp/pkg/upstream/transformer.go
    • Line 187: warning: exported method StaticRedirectTransform.Modify should have comment or be unexported (golint)
    • Line 224: warning: exported method GoGetTransform.Modify should have comment or be unexported (golint)
    • Line 263: warning: exported method DomainPathTransform.Modify should have comment or be unexported (golint)
    • Line 310: warning: exported function NewDomainPathTransform should have comment or be unexported (golint)
    • Line 336: warning: exported function NewSetPathTransform should have comment or be unexported (golint)
    • Line 357: warning: exported method SetPathTransform.Modify should have comment or be unexported (golint)
    • Line 368: warning: exported function NewDomainHeaderTransform should have comment or be unexported (golint)
    • Line 385: warning: exported method DomainHeaderTransform.Modify should have comment or be unexported (golint)
    • Line 410: warning: exported function NewDomainTransportTransform should have comment or be unexported (golint)
    • Line 418: warning: exported type DomainTransportTransform should have comment or be unexported (golint)
    • Line 424: warning: exported method DomainTransportTransform.Modify should have comment or be unexported (golint)
    • mp/registry/internal/tools/finder/finder.go
    • Line 16: warning: exported type Result should have comment or be unexported (golint)
    • Line 22: warning: exported type Head should have comment or be unexported (golint)
    • Line 30: warning: exported type Tag should have comment or be unexported (golint)
    • Line 37: warning: exported type Versions should have comment or be unexported (golint)
    • Line 44: warning: exported type Finder should have comment or be unexported (golint)
    • Line 51: warning: exported type Options should have comment or be unexported (golint)
    • Line 57: warning: exported function New should have comment or be unexported (golint)
    • Line 107: warning: exported function Compatible should have comment or be unexported (golint)
    • mp/proxy/internal/problems/tracker.go
    • Line 15: warning: exported type Tracker should have comment or be unexported (golint)
    • Line 21: warning: exported type Problem should have comment or be unexported (golint)
    • Line 27: warning: exported function Create should have comment or be unexported (golint)
    • Line 41: warning: exported function New should have comment or be unexported (golint)
    • mp/pkg/webutil/middleware.go
    • Line 12: warning: comment on exported function Chain should be of the form "Chain ..." (golint)
    • Line 21: warning: exported const HeaderAPIKey should have comment (or a comment on this block) or be unexported (golint)
    • mp/registry/internal/data/store.go
    • Line 18: warning: exported type Store should have comment or be unexported (golint)
    • Line 35: warning: exported function Connect should have comment or be unexported (golint)
    • Line 44: warning: exported function New should have comment or be unexported (golint)
    • mp/registry/internal/service/registry.go
    • Line 14: warning: exported type Registry should have comment or be unexported (golint)
    • Line 23: warning: exported function NewRegistry should have comment or be unexported (golint)
    • Line 47: warning: exported method Registry.Run should have comment or be unexported (golint)
    • mp/registry/config/config.go
    • Line 15: warning: exported type Configuration should have comment or be unexported (golint)
    • Line 24: warning: exported type ProxyClient should have comment or be unexported (golint)
    • Line 33: warning: exported type WebServer should have comment or be unexported (golint)
    • Line 46: warning: exported method WebServer.Server should have comment or be unexported (golint)
    • Line 88: warning: exported type CSRF should have comment or be unexported (golint)
    • Line 107: warning: exported type Proxies should have comment or be unexported (golint)
    • mp/proxy/internal/modules/store/index.go
    • Line 53: warning: exported type ModuleAddition should have comment or be unexported (golint)
    • Line 63: warning: exported type IndexOptions should have comment or be unexported (golint)
    • Line 68: warning: exported function NewIndex should have comment or be unexported (golint)
    • mp/proxy/internal/web/output/write.go
    • Line 19: warning: exported const JSON should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported function Write should have comment or be unexported (golint)
    • Line 33: warning: exported function WriteJSON should have comment or be unexported (golint)
    • Line 40: warning: exported function WriteZip should have comment or be unexported (golint)
    • mp/proxy/internal/service/proxy.go
    • Line 19: warning: exported type Proxy should have comment or be unexported (golint)
    • Line 35: warning: exported function NewProxy should have comment or be unexported (golint)
    • Line 63: warning: exported method Proxy.Run 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!