Preparing report...

Report for github.com/oxyno-zeta/opa-center

A+    Excellent!    Found 57 issues across 146 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!


gocyclo95%

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.


golint63%

Golint is a linter for Go source code.

    • opa-center/backend/pkg/opa-center/common/errors/conflict-error.go
    • Line 9: warning: exported function NewConflictError should have comment or be unexported (golint)
    • Line 13: warning: exported function NewConflictErrorWithError should have comment or be unexported (golint)
    • Line 17: warning: exported function NewConflictErrorWithExtensions should have comment or be unexported (golint)
    • Line 21: warning: exported function NewConflictErrorWithExtensionsAndError should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/common/errors/generic-error.go
    • Line 5: warning: exported type GenericError should have comment or be unexported (golint)
    • Line 15: warning: exported method GenericError.StackTrace should have comment or be unexported (golint)
    • Line 25: warning: exported method GenericError.Extensions should have comment or be unexported (golint)
    • Line 29: warning: exported method GenericError.StatusCode should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/server/opa-publisher-server.go
    • Line 20: warning: exported type OPAPublisherServer should have comment or be unexported (golint)
    • Line 30: warning: exported function NewOPAPublisherServer should have comment or be unexported (golint)
    • Line 45: warning: exported method OPAPublisherServer.GenerateServer should have comment or be unexported (golint)
    • Line 113: warning: exported method OPAPublisherServer.Listen should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/server/server.go
    • Line 32: warning: exported type Server should have comment or be unexported (golint)
    • Line 43: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 59: warning: exported method Server.GenerateServer should have comment or be unexported (golint)
    • Line 161: warning: exported method Server.Listen should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/log/middleware.go
    • Line 22: warning: exported function GetLoggerFromContext should have comment or be unexported (golint)
    • Line 28: warning: exported function GetLoggerFromGin should have comment or be unexported (golint)
    • Line 35: warning: exported function SetLoggerToContext should have comment or be unexported (golint)
    • Line 39: warning: exported function SetLoggerToGin should have comment or be unexported (golint)
    • Line 43: warning: exported function Middleware should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/common/errors/locked-error.go
    • Line 9: warning: exported function NewLockedError should have comment or be unexported (golint)
    • Line 13: warning: exported function NewLockedErrorWithError should have comment or be unexported (golint)
    • Line 17: warning: exported function NewLockedErrorWithExtensions should have comment or be unexported (golint)
    • Line 21: warning: exported function NewLockedErrorWithExtensionsAndError should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/common/errors/too-many-requests-error.go
    • Line 9: warning: exported function NewTooManyRequestsError should have comment or be unexported (golint)
    • Line 13: warning: exported function NewTooManyRequestsErrorWithError should have comment or be unexported (golint)
    • Line 17: warning: exported function NewTooManyRequestsErrorWithExtensions should have comment or be unexported (golint)
    • Line 21: warning: exported function NewTooManyRequestsErrorWithExtensionsAndError should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/log/log.go
    • Line 13: warning: exported type Logger should have comment or be unexported (golint)
    • Line 53: warning: exported type TracingLogger should have comment or be unexported (golint)
    • Line 59: warning: exported type LockDistributorLogger should have comment or be unexported (golint)
    • Line 63: warning: exported type GormLogger should have comment or be unexported (golint)
    • Line 71: warning: exported function NewLogger should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/common/errors/invalid-input-error.go
    • Line 9: warning: exported function NewInvalidInputError should have comment or be unexported (golint)
    • Line 13: warning: exported function NewInvalidInputErrorWithError should have comment or be unexported (golint)
    • Line 17: warning: exported function NewInvalidInputErrorWithExtensions should have comment or be unexported (golint)
    • Line 21: warning: exported function NewInvalidInputErrorWithExtensionsAndError should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/server/graphql/utils/utils.go
    • Line 18: warning: exported function ToIDRelay should have comment or be unexported (golint)
    • Line 22: warning: exported function FromIDRelay should have comment or be unexported (golint)
    • Line 44: warning: exported function FormatTime should have comment or be unexported (golint)
    • Line 48: warning: exported function GetPaginateCursor should have comment or be unexported (golint)
    • Line 52: warning: exported function GetPageInfo should have comment or be unexported (golint)
    • Line 74: warning: exported function GetPageInput should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/database/common/sort-enum.go
    • Line 20: warning: exported var SortOrderEnumAsc should have comment or be unexported (golint)
    • Line 24: warning: exported var AllSortOrderEnum should have comment or be unexported (golint)
    • Line 29: warning: exported method SortOrderEnum.IsValid should have comment or be unexported (golint)
    • Line 42: warning: exported method SortOrderEnum.UnmarshalGQL should have comment or be unexported (golint)
    • Line 56: warning: exported method SortOrderEnum.MarshalGQL should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/business/services.go
    • Line 13: warning: exported type Services should have comment or be unexported (golint)
    • Line 20: warning: exported method Services.MigrateDB should have comment or be unexported (golint)
    • Line 42: warning: exported method Services.Initialize should have comment or be unexported (golint)
    • Line 46: warning: exported method Services.Reload should have comment or be unexported (golint)
    • Line 50: warning: exported function NewServices should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/common/errors/forbidden-error.go
    • Line 9: warning: exported function NewForbiddenError should have comment or be unexported (golint)
    • Line 13: warning: exported function NewForbiddenErrorWithError should have comment or be unexported (golint)
    • Line 17: warning: exported function NewForbiddenErrorWithExtensions should have comment or be unexported (golint)
    • Line 21: warning: exported function NewForbiddenErrorWithExtensionsAndError should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/common/errors/not-found-error.go
    • Line 9: warning: exported function NewNotFoundError should have comment or be unexported (golint)
    • Line 13: warning: exported function NewNotFoundErrorWithError should have comment or be unexported (golint)
    • Line 17: warning: exported function NewNotFoundErrorWithExtensions should have comment or be unexported (golint)
    • Line 21: warning: exported function NewNotFoundErrorWithExtensionsAndError should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/server/internal-server.go
    • Line 19: warning: exported type InternalServer should have comment or be unexported (golint)
    • Line 27: warning: exported type CheckerInput should have comment or be unexported (golint)
    • Line 33: warning: exported function NewInternalServer should have comment or be unexported (golint)
    • Line 98: warning: exported method InternalServer.Listen should have comment or be unexported (golint)
    • Line 105: warning: exported method InternalServer.GenerateServer should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/business/partitions/retention-clean-task.go
    • Line 11: warning: comment on exported const ListLimit should be of the form "ListLimit ..." (golint)
    • Line 14: warning: exported type RetentionCleanTask should have comment or be unexported (golint)
    • Line 20: warning: exported method RetentionCleanTask.Description should have comment or be unexported (golint)
    • Line 21: warning: exported method RetentionCleanTask.Key should have comment or be unexported (golint)
    • Line 31: warning: exported method RetentionCleanTask.Run should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/common/errors/internal-server-error.go
    • Line 9: warning: exported function NewInternalServerError should have comment or be unexported (golint)
    • Line 13: warning: exported function NewInternalServerErrorWithError should have comment or be unexported (golint)
    • Line 17: warning: exported function NewInternalServerErrorWithExtensions should have comment or be unexported (golint)
    • Line 21: warning: exported function NewInternalServerErrorWithExtensionsAndError should have comment or be unexported (golint)
    • opa-center/backend/pkg/opa-center/common/errors/unauthorized-error.go
    • Line 9: warning: exported function NewUnauthorizedError should have comment or be unexported (golint)
    • Line 13: warning: exported function NewUnauthorizedErrorWithError should have comment or be unexported (golint)
    • Line 17: warning: exported function NewUnauthorizedErrorWithExtensions should have comment or be unexported (golint)
    • Line 21: warning: exported function NewUnauthorizedErrorWithExtensionsAndError 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!


misspell99%

Misspell Finds commonly misspelled English words