Preparing report...

Report for github.com/oxyno-zeta/s3-proxy

A+    Excellent!    Found 22 issues across 73 files

Tweet

gofmt98%

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!


gocyclo89%

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.

    • s3-proxy/pkg/s3-proxy/server/server_integration_test.go
    • Line 2495: warning: cyclomatic complexity 23 of function TestOIDCAuthentication() is high (> 15) (gocyclo)
    • Line 30: warning: cyclomatic complexity 22 of function TestPublicRouter() is high (> 15) (gocyclo)
    • Line 2271: warning: cyclomatic complexity 20 of function TestTracing() is high (> 15) (gocyclo)
    • Line 4138: warning: cyclomatic complexity 16 of function TestTrailingSlashRedirect() is high (> 15) (gocyclo)
    • Line 3286: warning: cyclomatic complexity 16 of function TestCORS() is high (> 15) (gocyclo)
    • s3-proxy/pkg/s3-proxy/bucket/error_management_test.go
    • Line 744: warning: cyclomatic complexity 24 of function Test_requestContext_HandleBadRequest() is high (> 15) (gocyclo)
    • Line 250: warning: cyclomatic complexity 17 of function Test_requestContext_HandleNotFound() is high (> 15) (gocyclo)
    • Line 497: warning: cyclomatic complexity 17 of function Test_requestContext_HandleForbidden() is high (> 15) (gocyclo)
    • Line 1013: warning: cyclomatic complexity 17 of function Test_requestContext_HandleUnauthorized() is high (> 15) (gocyclo)

golint79%

Golint is a linter for Go source code.

    • s3-proxy/pkg/s3-proxy/authx/models/oidc-user.go
    • Line 3: warning: exported const OIDCUserType should have comment or be unexported (golint)
    • Line 5: warning: exported type OIDCUser should have comment or be unexported (golint)
    • Line 15: warning: exported method OIDCUser.GetType should have comment or be unexported (golint)
    • Line 19: warning: exported method OIDCUser.GetIdentifier should have comment or be unexported (golint)
    • s3-proxy/pkg/s3-proxy/log/log.go
    • Line 7: warning: exported type Logger should have comment or be unexported (golint)
    • Line 45: warning: exported type TracingLogger should have comment or be unexported (golint)
    • Line 51: warning: exported type CorsLogger should have comment or be unexported (golint)
    • Line 55: warning: exported function NewLogger should have comment or be unexported (golint)
    • s3-proxy/pkg/s3-proxy/server/server.go
    • Line 25: warning: exported type Server should have comment or be unexported (golint)
    • Line 33: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 42: warning: exported method Server.Listen should have comment or be unexported (golint)
    • Line 49: warning: exported method Server.GenerateServer should have comment or be unexported (golint)
    • s3-proxy/pkg/s3-proxy/server/internal-server.go
    • Line 16: warning: exported type InternalServer should have comment or be unexported (golint)
    • Line 23: warning: exported function NewInternalServer should have comment or be unexported (golint)
    • Line 31: warning: exported method InternalServer.Listen should have comment or be unexported (golint)
    • Line 38: warning: exported method InternalServer.GenerateServer should have comment or be unexported (golint)
    • s3-proxy/pkg/s3-proxy/server/utils/utils.go
    • Line 63: warning: comment on exported function HandleUnauthorizedWithTemplate should be of the form "HandleUnauthorizedWithTemplate ..." (golint)
    • Line 77: warning: comment on exported function HandleBadRequestWithTemplate should be of the form "HandleBadRequestWithTemplate ..." (golint)
    • Line 168: warning: exported function GetRequestURI should have comment or be unexported (golint)
    • Line 179: warning: exported function RequestHost should have comment or be unexported (golint)
    • s3-proxy/pkg/s3-proxy/server/hostrouter.go
    • Line 16: warning: exported type HostRouter should have comment or be unexported (golint)
    • Line 22: warning: exported function NewHostRouter should have comment or be unexported (golint)
    • Line 30: warning: exported method HostRouter.Get should have comment or be unexported (golint)
    • Line 34: warning: exported method HostRouter.Map should have comment or be unexported (golint)
    • s3-proxy/pkg/s3-proxy/config/manager.go
    • Line 5: warning: comment on exported type Manager should be of the form "Manager ..." (with optional leading article) (golint)
    • Line 16: warning: exported function NewManager should have comment or be unexported (golint)
    • s3-proxy/pkg/s3-proxy/authx/models/basic-auth-user.go
    • Line 3: warning: exported const BasicAuthUserType should have comment or be unexported (golint)
    • Line 5: warning: exported type BasicAuthUser should have comment or be unexported (golint)
    • Line 9: warning: exported method BasicAuthUser.GetType should have comment or be unexported (golint)
    • Line 13: warning: exported method BasicAuthUser.GetIdentifier should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!