SUSE/stratos

View on GitHub

Showing 1,395 of 1,395 total issues

Function main has 183 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func main() {
 
// Register time.Time in gob
gob.Register(time.Time{})
 
 
Severity: Major
Found in src/jetstream/main.go - About 6 hrs to fix

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

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

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

    it('Borked, usually due to starting timeouts', () => {
    let testData = makeTestData('STARTED', 'STAGED', ['TIMEOUT']);
    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 153..168

    Function generateCFEntities has 153 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function generateCFEntities(): StratosBaseCatalogEntity[] {
    const endpointDefinition: StratosEndpointExtensionDefinition = {
    urlValidationRegexString: urlValidationExpression,
    type: CF_ENDPOINT_TYPE,
    label: 'Cloud Foundry',
    Severity: Major
    Found in src/frontend/packages/cloud-foundry/src/cf-entity-generator.ts - About 6 hrs to fix

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

      staging_security_groups: [
      {
      metadata: {
      guid: '40c7d0e1-c3f1-47e4-a071-586dcd9b2196',
      url: '/v2/security_groups/40c7d0e1-c3f1-47e4-a071-586dcd9b2196',
      src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-orgs/cf-org-card/cf-org-card.component.spec.ts on lines 184..271

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

      security_groups: [
      {
      metadata: {
      guid: '40c7d0e1-c3f1-47e4-a071-586dcd9b2196',
      url: '/v2/security_groups/40c7d0e1-c3f1-47e4-a071-586dcd9b2196',
      src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/cf-orgs/cf-org-card/cf-org-card.component.spec.ts on lines 273..360

      File list-data-source.ts has 420 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import { DataSource } from '@angular/cdk/table';
      import { SortDirection } from '@angular/material/sort';
      import { Store } from '@ngrx/store';
      import {
      BehaviorSubject,

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

        return this.store.select(s => [s.uaaSetup, s.auth]).pipe(
        filter(([uaa, auth]: [UAASetupState, AuthState]) => {
        return !(uaa.settingUp || auth.verifying);
        }),
        delay(2000),
        src/frontend/packages/core/src/features/setup/local-account-wizard/local-account-wizard.component.ts on lines 51..77

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

        return this.store.select(s => [s.uaaSetup, s.auth]).pipe(
        filter(([uaa, auth]: [UAASetupState, AuthState]) => {
        return !(uaa.settingUp || auth.verifying);
        }),
        delay(2000),
        src/frontend/packages/core/src/features/setup/uaa-wizard/console-uaa-wizard.component.ts on lines 86..112

        File cloud-foundry-section.routing.ts has 415 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import { NgModule } from '@angular/core';
        import { RouterModule, Routes } from '@angular/router';
         
        import { DynamicExtensionRoutes } from '../../../../core/src/core/extension/dynamic-extension-routes';
        import { StratosActionType } from '../../../../core/src/core/extension/extension-service';

          File manage-users-by-username-stepper-e2e.spec.ts has 407 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import { browser, by, element, promise } from 'protractor';
           
          import { CfUser } from '../../frontend/packages/cloud-foundry/src/store/types/cf-user.types';
          import { APIResource } from '../../frontend/packages/store/src/types/api.types';
          import { e2e } from '../e2e';

            Method CustomBinder.bindData has a Cognitive Complexity of 41 (exceeds 8 allowed). Consider refactoring.
            Open

            func (b *CustomBinder) bindData(ptr interface{}, data map[string][]string, tag string) error {
            typ := reflect.TypeOf(ptr).Elem()
            val := reflect.ValueOf(ptr).Elem()
             
            if typ.Kind() != reflect.Struct {
            Severity: Minor
            Found in src/jetstream/custombinder/custombinder.go - About 5 hrs to fix

            File deploy-application-deployer.ts has 405 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import { Store } from '@ngrx/store';
            import { BehaviorSubject, of as observableOf, Subject, Subscription } from 'rxjs';
            import websocketConnect from 'rxjs-websockets';
            import { catchError, combineLatest, filter, first, map, mergeMap, share, switchMap, tap } from 'rxjs/operators';
             
             

              File store-test-helper.ts has 405 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import { ModuleWithProviders } from '@angular/core';
              import { TestBed } from '@angular/core/testing';
              import { Store, StoreModule, StoreRootModule } from '@ngrx/store';
              import {
              appReducers,
              Severity: Minor
              Found in src/frontend/packages/store/testing/src/store-test-helper.ts - About 5 hrs to fix

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

                import { HttpClient } from '@angular/common/http';
                import { Injectable } from '@angular/core';
                import { MatSnackBar } from '@angular/material/snack-bar';
                import { Actions, Effect, ofType } from '@ngrx/effects';
                import { Action, Store } from '@ngrx/store';
                Severity: Minor
                Found in src/frontend/packages/kubernetes/src/helm/store/helm.effects.ts - About 5 hrs to fix

                  File cf-org-card.component.spec.ts has 396 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import { async, ComponentFixture, TestBed } from '@angular/core/testing';
                  import { Store } from '@ngrx/store';
                  import { testSessionData } from '@stratosui/store/testing';
                   
                  import { ConfirmationDialogService } from '../../../../../../../../core/src/shared/components/confirmation-dialog.service';

                    File cf-user.service.ts has 391 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import { Injectable } from '@angular/core';
                    import { Store } from '@ngrx/store';
                    import { combineLatest, Observable, of as observableOf, of, ReplaySubject } from 'rxjs';
                    import { filter, first, map, multicast, publishReplay, refCount, startWith, switchMap } from 'rxjs/operators';
                     
                     

                      Function initialise has a Cognitive Complexity of 38 (exceeds 8 allowed). Consider refactoring.
                      Open

                      private initialise() {
                      this.globalActions = this.setupActionsDefaultObservables(
                      this.config.getGlobalActions()
                      );
                      this.multiActions = this.setupActionsDefaultObservables(

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

                      import { ActivatedRoute } from '@angular/router';
                      import { Store } from '@ngrx/store';
                      import { combineLatest, Observable } from 'rxjs';
                      import { filter, first, map, publishReplay, refCount, switchMap, tap } from 'rxjs/operators';
                       
                       
                      Severity: Minor
                      Found in src/frontend/packages/cloud-foundry/src/features/cf/cf.helpers.ts - About 5 hrs to fix

                        Function main has a Cognitive Complexity of 37 (exceeds 8 allowed). Consider refactoring.
                        Open

                        func main() {
                         
                        // Register time.Time in gob
                        gob.Register(time.Time{})
                         
                         
                        Severity: Minor
                        Found in src/jetstream/main.go - About 5 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language