SUSE/stratos

View on GitHub

Showing 1,395 of 1,395 total issues

Avoid too many return statements within this function.
Open

    return paginationIgnoreMaxed(state, action as IgnorePaginationMaxedState);

    Avoid too many return statements within this function.
    Open

        return paginationResetSortAndFilter(state, action as ResetPaginationSortFilter);

      Avoid too many return statements within this function.
      Open

          return paginationResetPagination(state, action, true);

        Avoid too many return statements within this function.
        Open

          return type;

          Avoid too many return statements within this function.
          Open

                    return false;

            Avoid too many return statements within this function.
            Open

                      return 'none';
            Severity: Major
            Found in src/frontend/packages/core/src/shared/components/list/list.component.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  return 0;

                Avoid too many return statements within this function.
                Open

                    return this.precisionIfUseful(mb) + ' MB';
                Severity: Major
                Found in src/frontend/packages/core/src/core/utils.service.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return { message: 'Authentication mechanism is not supported', warning: true };

                    Avoid too many return statements within this function.
                    Open

                          return true;

                      Avoid too many return statements within this function.
                      Open

                        return value;

                        Avoid too many return statements within this function.
                        Open

                              return false;

                          Avoid too many return statements within this function.
                          Open

                                return {};

                            Avoid too many return statements within this function.
                            Open

                                return `${duration.asSeconds().toPrecision(2)} msec`;

                              Avoid too many return statements within this function.
                              Open

                                  return false;
                              Severity: Major
                              Found in src/frontend/packages/core/src/app.module.ts - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                      return false;

                                  Avoid too many return statements within this function.
                                  Open

                                    return false;
                                  Severity: Major
                                  Found in src/frontend/packages/core/src/core/utils.service.ts - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                          return true;

                                      Avoid too many return statements within this function.
                                      Open

                                            return this.getColorScheme('ok');

                                        Method UserInvite.AssociateSpaceRoles has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring.
                                        Open

                                        func (invite *UserInvite) AssociateSpaceRoles(cnsiGUID, userID, newUserGUID string, inviteRequest *UserInviteReq) (*CFError, error) {
                                            if inviteRequest.SpaceRoles.Auditor {
                                                if cfError, err := invite.AssociateSpaceRoleForUser(cnsiGUID, userID, newUserGUID, inviteRequest.Space, "auditors"); err != nil {
                                                    return cfError, err
                                                }
                                        Severity: Minor
                                        Found in src/jetstream/plugins/userinvite/invite.go - About 25 mins to fix

                                        Cognitive Complexity

                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                        A method's cognitive complexity is based on a few simple rules:

                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                        • Code is considered more complex for each "break in the linear flow of the code"
                                        • Code is considered more complex when "flow breaking structures are nested"

                                        Further reading

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language