Showing 885 of 1,395 total issues
File pagination-monitor.ts
has 315 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Store } from '@ngrx/store';
import { denormalize, schema as normalizrSchema } from '../../../store/src/normalizr/normalizr';
import { asapScheduler, combineLatest, Observable, ReplaySubject } from 'rxjs';
import { tag } from 'rxjs-spy/operators';
File deploy.go
has 562 lines of code (exceeds 500 allowed). Consider refactoring. Open
package cfapppush
import (
"encoding/base64"
"encoding/json"
Function constructor
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor(
ext: ExtensionService,
private store: Store<GeneralEntityAppState>,
eventService: GlobalEventService,
private userFavoriteManager: UserFavoriteManager,
File cf-entity-factory.ts
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { EntitySchema } from '../../store/src/helpers/entity-schema';
import { metricEntityType } from '../../store/src/helpers/stratos-entity-factory';
import { APIResource } from '../../store/src/types/api.types';
import {
CFApplicationEntitySchema,
File deploy-application-step2.component.ts
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { HttpClient } from '@angular/common/http';
import { AfterContentInit, Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { NgForm } from '@angular/forms';
import { ActivatedRoute } from '@angular/router';
import { Store } from '@ngrx/store';
Function hash
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static hash( string: any ) : string
{
let temp: string;
if ( typeof string !== 'string' )
Function InstallDashboard
has a Cognitive Complexity of 27 (exceeds 8 allowed). Consider refactoring. Open
func InstallDashboard(p interfaces.PortalProxy, endpointGUID, userGUID string) error {
// Download the Yaml for the dashboard
kubeDashboardImage := p.Env().String("STRATOS_KUBERNETES_DASHBOARD_IMAGE", "")
if len(kubeDashboardImage) == 0 {
kubeDashboardImage = dashboardInstallYAMLDownloadURL
- 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 update
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
update(): void {
let width;
if (this.series.length) {
width = this.xScale.bandwidth();
this.bandwidth.emit(width);
File application-deploy-e2e.spec.ts
has 307 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { browser, promise } from 'protractor';
import { e2e } from '../e2e';
import { CFHelpers } from '../helpers/cf-e2e-helpers';
import { ConsoleUserType } from '../helpers/e2e-helpers';
CfUserPermissionsChecker
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
export class CfUserPermissionsChecker extends BaseCurrentUserPermissionsChecker implements ICurrentUserPermissionsChecker {
static readonly ALL_SPACES = 'PERMISSIONS__ALL_SPACES_PLEASE';
constructor(private store: Store<GeneralEntityAppState>) {
super();
ListDataSource
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
export abstract class ListDataSource<T, A = T> extends DataSource<T> implements IListDataSource<T> {
// -------------- Public
// Core observables
public pagination$: Observable<PaginationEntityState>;
Function getDefaultInitialTestStratosStoreState
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getDefaultInitialTestStratosStoreState() {
return {
recentlyVisited: {},
userFavoritesGroups: {
busy: false,
Function start
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public start() {
if (this.isStarted()) {
return;
}
File endpoint.effects.ts
has 303 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { HttpClient, HttpErrorResponse, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { Store } from '@ngrx/store';
import { catchError, mergeMap } from 'rxjs/operators';
Method MetricsSpecification.getMetricsEndpoints
has a Cognitive Complexity of 26 (exceeds 8 allowed). Consider refactoring. Open
func (m *MetricsSpecification) getMetricsEndpoints(userGUID string, cnsiList []string) (map[string]EndpointMetricsRelation, error) {
metricsProviders := make([]MetricsMetadata, 0)
endpointsMap := make(map[string]*interfaces.ConnectedEndpoint)
results := make(map[string]EndpointMetricsRelation)
- 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 PolymorphicSchema
has a Cognitive Complexity of 26 (exceeds 8 allowed). Consider refactoring. Open
var PolymorphicSchema = /*#__PURE__*/function () {
function PolymorphicSchema(definition, schemaAttribute) {
if (schemaAttribute) {
this._schemaAttribute = typeof schemaAttribute === 'string' ? function (input) {
return input[schemaAttribute];
- 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
ServicesHelperE2E
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
export class ServicesHelperE2E {
constructor(public e2eSetup: E2ESetup, createServiceInstance: CreateMarketplaceServiceInstance = null, seed?: ServicesHelperE2E) {
this.cfRequestHelper = seed ? seed.cfRequestHelper : new CFRequestHelpers(e2eSetup);
this.cfHelper = seed ? seed.cfHelper : new CFHelpers(e2eSetup);
File entity-catalog-entity.ts
has 298 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { ActionReducer } from '@ngrx/store';
import { IRequestEntityTypeState } from '../../app-state';
import {
EntitiesFetchHandler,
Function ngOnInit
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
ngOnInit() {
this.canManageCredentials$ = fetchAutoscalerInfo(
this.applicationService.cfGuid,
this.entityServiceFactory
Method CFPushApp.Init
has a Cognitive Complexity of 25 (exceeds 8 allowed). Consider refactoring. Open
func (c *CFPushApp) Init(appDir string, manifestPath string, overrides CFPushAppOverrides) error {
// App name
if len(overrides.Name) > 0 {
c.pushCommand.OptionalArgs = flag.OptionalAppName{
- 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"