Showing 650 of 1,370 total issues
Function initServiceObservables
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
private initServiceObservables() {
this.serviceEntityService = cfEntityCatalog.service.store.getEntityService(this.serviceGuid, this.cfGuid, {});
this.service$ = this.serviceEntityService.waitForEntity$.pipe(
filter(o => !!o && !!o.entity),
map(o => o.entity),
- 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 ngOnInit
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
ngOnInit() {
const chartConfigBuilder = getMetricsChartConfigBuilder<IMetricApplication>(
result => {
const metric = result.metric;
if (!!metric.pod && !!metric.namespace) {
- 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 compareCharts
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
private compareCharts(a: ChartMetadata, b: ChartMetadata): number {
// Basic properties must be the same
if (a.name !== b.name) {
return -1;
}
- 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 init
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
private init() {
// Observabled for loading schema and values for the Chart
const schema$ = this.httpClient.get(this.schemaUrl).pipe(catchError(e => of(null)));
const values$: Observable<string> = this.httpClient.get(this.valuesUrl, { responseType: 'text' }).pipe(
catchError(e => of(null))
- 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 ngOnInit
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
ngOnInit() {
if (this.addSelect || this.expandComponent || this.addActions) {
const newColumns = [...this.columns];
if (this.addSelect) {
newColumns.splice(0, 0, tableColumnSelect);
- 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 getCurrentPageStartIndex
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
export function getCurrentPageStartIndex<T = any>(entities: (T | T[])[], pageSize: number, requiredPage: number) {
const data = {
index: null,
currentPage: 0,
splitPages: 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
Function ngOnInit
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
ngOnInit() {
this.committedAction = this.metricsConfig.metricsAction;
this.metricsMonitor = this.entityMonitorFactory.create<IMetrics>(
this.metricsConfig.metricsAction.guid,
this.committedAction
- 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 ngOnInit
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
ngOnInit() {
const check$ = this.checkLayout.asObservable().pipe(filter(v => v));
const scroll$ = this.scrollDispatcher.scrolled().pipe(map((e: any) => {
const el = e.elementRef.nativeElement;
return el.scrollTop;
- 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 handleOther
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
private handleOther(auth: AuthState) {
this.loggedIn = auth.loggedIn;
this.loggingIn = auth.loggingIn;
this.isLoginFlow = this.isLoginFlow || auth.loggingIn;
this.verifying = auth.verifying;
- 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 getDateFromStoreMetric
has a Cognitive Complexity of 9 (exceeds 8 allowed). Consider refactoring. Open
public getDateFromStoreMetric(metrics: IMetrics, times = this.times): StoreMetricTimeRange {
if (metrics) {
if (metrics.windowValue) {
return {
timeRange: times.find(time => time.value === metrics.windowValue)
- 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"