Showing 885 of 1,395 total issues
File cf-e2e-helpers.ts
has 462 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { browser, promise } from 'protractor';
import {
IApp,
IDomain,
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: {
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;
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;
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';
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 {
- Read upRead up
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
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;
- Read upRead up
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
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 {
Function main
has 183 lines of code (exceeds 50 allowed). Consider refactoring. Open
func main() {
// Register time.Time in gob
gob.Register(time.Time{})
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',
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,
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 {
- Read upRead up
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
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,
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';
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';