src/frontend/packages/cloud-foundry/src/features/applications/application/application-tabs-base/application-tabs-base.component.ts
Function getBreadcrumbs
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private getBreadcrumbs(
application: IApp,
endpoint: EndpointModel,
org: APIResource<IOrganization>,
space: APIResource<ISpace>
Function constructor
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(
public applicationService: ApplicationService,
private store: Store<CFAppState>,
private endpointsService: EndpointsService,
private ngZone: NgZone,
File application-tabs-base.component.ts
has 262 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Component, NgZone, OnDestroy, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { GitSCMService, GitSCMType } from '@stratosui/git';
import { combineLatest as observableCombineLatest, Observable, Subscription } from 'rxjs';
import { filter, first, map, startWith, switchMap, withLatestFrom } from 'rxjs/operators';
Function ngOnInit
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ngOnInit() {
this.appSub$ = this.applicationService.entityService.entityMonitor.entityRequest$.subscribe(requestInfo => {
if (
requestInfo.deleting.deleted ||
requestInfo.error
Function constructor
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
Open
constructor(
public applicationService: ApplicationService,
private store: Store<CFAppState>,
private endpointsService: EndpointsService,
private ngZone: NgZone,
- 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"