cloudfoundry/cf-k8s-controllers

View on GitHub
api/repositories/role_repository.go

Summary

Maintainability
A
2 hrs
Test Coverage
A
93%

Method RoleRepo.CreateRole has 58 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (r *RoleRepo) CreateRole(ctx context.Context, authInfo authorization.Info, role CreateRoleMessage) (RoleRecord, error) {
    userClient, err := r.userClientFactory.BuildClient(authInfo)
    if err != nil {
        return RoleRecord{}, fmt.Errorf("failed to build user client: %w", err)
    }
Severity: Minor
Found in api/repositories/role_repository.go - About 1 hr to fix

    Function NewRoleRepo has 7 arguments (exceeds 5 allowed). Consider refactoring.
    Open

        userClientFactory authorization.UserK8sClientFactory,
        spaceRepo *SpaceRepo,
        authorizedInChecker AuthorizedInChecker,
        namespacePermissions *authorization.NamespacePermissions,
        rootNamespace string,
    Severity: Major
    Found in api/repositories/role_repository.go - About 45 mins to fix

      There are no issues that match your filters.

      Category
      Status