SUSE/stratos

View on GitHub

Showing 1,395 of 1,395 total issues

File kubernetes.effects.ts has 500 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { Action, Store } from '@ngrx/store';
import { ClearPaginationOfEntity, ClearPaginationOfType } from 'frontend/packages/store/src/actions/pagination.actions';

    File kube.types.ts has 499 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { Observable } from 'rxjs';
     
    import {
    OrchestratedActionBuilderConfig,
    OrchestratedActionBuilders,
    Severity: Minor
    Found in src/frontend/packages/kubernetes/src/kubernetes/store/kube.types.ts - About 1 day to fix

      File autoscaler-transform-metric.spec.ts has 487 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import {
      isEqual
      } from './autoscaler-util';
      import {
      insertEmptyMetrics, buildMetricData

        File current-user-permissions.service.spec.ts has 487 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import { TestBed } from '@angular/core/testing';
        import { createBasicStoreModule, createEntityStoreState, TestStoreEntity } from '@stratosui/store/testing';
        import { first, tap } from 'rxjs/operators';
         
        import { AppState } from '../../../../store/src/app-state';

          Function setupCfUserRemovalTests has 189 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function setupCfUserRemovalTests(
          cfLevel: CfUserRemovalTestLevel,
          removalLevel: CfRolesRemovalLevel,
          navToUserTableFn: (cfGuid: string, orgGuid: string, spaceGuid: string) => promise.Promise<any>
          ) {
          Severity: Major
          Found in src/test-e2e/cloud-foundry/users-removal-e2e.helper.ts - About 7 hrs to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            it('Borked, usually due to platform issues', () => {
            let testData = makeTestData('STARTED', 'STAGED', ['RUNNING', 'CRASHED']);
            let res = cfAppStateService.get(testData.summary, testData.instances);
            expect(res.indicator).toBe('warning');
            expect($translate.instant(res.label)).toBe('Deployed');
            src/frontend/packages/cloud-foundry/src/shared/services/application-state.service.spec.ts on lines 222..238

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            it('Borked, usually due to platform issues (2)', () => {
            let testData = makeTestData('STARTED', 'STAGED', ['RUNNING', 'UNKNOWN']);
            let res = cfAppStateService.get(testData.summary, testData.instances);
            expect(res.indicator).toBe('warning');
            expect($translate.instant(res.label)).toBe('Deployed');
            src/frontend/packages/cloud-foundry/src/shared/services/application-state.service.spec.ts on lines 204..220

            Function processArray has a Cognitive Complexity of 51 (exceeds 8 allowed). Consider refactoring.
            Open

            function processArray(array, output?, nested?: boolean) {
            let format;
            let oneOf;
            let type;
             
             

            Function setupInviteUserTests has 181 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function setupInviteUserTests(
            isSpace: boolean,
            navToOrgSpaceUsersList: (cfHelper: CFHelpers, defaultCf: E2EConfigCloudFoundry) => promise.Promise<any>,
            navToCfSummary: () => promise.Promise<any>
            ) {
            Severity: Major
            Found in src/test-e2e/cloud-foundry/invite-users-e2e.helper.ts - About 7 hrs to fix

              File entity-relations-validate.spec.ts has 465 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import { inject, TestBed } from '@angular/core/testing';
              import { Store } from '@ngrx/store';
              import { createBasicStoreModule, createEntityStoreState, TestStoreEntity } from '@stratosui/store/testing';
               
              import { environment } from '../../../core/src/environments/environment';

                File cf-e2e-helpers.ts has 462 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import { browser, promise } from 'protractor';
                 
                import {
                IApp,
                IDomain,
                Severity: Minor
                Found in src/test-e2e/helpers/cf-e2e-helpers.ts - About 7 hrs to fix

                  Function createApplicationDeployTests has 172 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function createApplicationDeployTests(type = CREATE_APP_DEPLOY_TEST_TYPE.GIT_CLONE): {
                  testApp: string,
                  testAppName: string,
                  deployedCommit: promise.Promise<string>,
                  appDetails: {
                  Severity: Major
                  Found in src/test-e2e/application/application-deploy-helper.ts - About 6 hrs to fix

                    CFHelpers has 49 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    export class CFHelpers {
                    static cachedDefaultCfGuid: string;
                    static cachedDefaultOrgGuid: string;
                    static cachedDefaultSpaceGuid: string;
                    static cachedAdminGuid: string;
                    Severity: Minor
                    Found in src/test-e2e/helpers/cf-e2e-helpers.ts - About 6 hrs to fix

                      File entity-relations.ts has 448 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import { Action, Store } from '@ngrx/store';
                      import { denormalize } from '../../../store/src/normalizr/normalizr';
                      import { Observable, of as observableOf } from 'rxjs';
                      import { filter, first, map, mergeMap, pairwise, skipWhile, switchMap, withLatestFrom } from 'rxjs/operators';
                       
                       

                        File normalizr.js has 447 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        function _defineProperties(target, props) {
                        for (var i = 0; i < props.length; i++) {
                        var descriptor = props[i];
                        descriptor.enumerable = descriptor.enumerable || false;
                        descriptor.configurable = true;
                        Severity: Minor
                        Found in src/frontend/packages/store/src/normalizr/normalizr.js - About 6 hrs to fix

                          File specify-details-step.component.ts has 444 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import { COMMA, ENTER, SPACE } from '@angular/cdk/keycodes';
                          import { AfterContentInit, Component, Input, OnDestroy } from '@angular/core';
                          import { AbstractControl, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms';
                          import { MatChipInputEvent } from '@angular/material/chips';
                          import { Store } from '@ngrx/store';

                            File list.po.ts has 436 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import { browser, by, element, Key, promise, protractor } from 'protractor';
                            import { ElementArrayFinder, ElementFinder } from 'protractor/built';
                             
                            import { Component } from './component.po';
                            import { FormComponent } from './form.po';
                            Severity: Minor
                            Found in src/test-e2e/po/list.po.ts - About 6 hrs to fix

                              Method portalProxy.updateEndpoint has a Cognitive Complexity of 45 (exceeds 8 allowed). Consider refactoring.
                              Open

                              func (p *portalProxy) updateEndpoint(ec echo.Context) error {
                              log.Debug("updateEndpoint")
                               
                              params := new(interfaces.UpdateEndpointParams)
                              if err := ec.Bind(params); err != nil {
                              Severity: Minor
                              Found in src/jetstream/cnsi.go - About 6 hrs to fix

                              Function createPodExpandedStatus has a Cognitive Complexity of 45 (exceeds 8 allowed). Consider refactoring.
                              Open

                              static createPodExpandedStatus(pod: KubernetesPod): KubernetesPodExpandedStatus {
                               
                              let restarts = 0;
                              const totalContainers = pod.spec.containers ? pod.spec.containers.length : 0;
                              let readyContainers = 0;

                              File cf-user-permissions-checkers.ts has 432 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              import { Store } from '@ngrx/store';
                              import { combineLatest, Observable, of } from 'rxjs';
                              import { distinctUntilChanged, filter, map, switchMap } from 'rxjs/operators';
                               
                              import {
                                Severity
                                Category
                                Status
                                Source
                                Language