src/frontend/packages/core/src/shared/components/list/list.component.ts
File list.component.ts
has 655 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { animate, style, transition, trigger } from '@angular/animations';
import {
AfterViewInit,
ChangeDetectorRef,
Component,
Function initialise
has 259 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private initialise() {
this.globalActions = this.setupActionsDefaultObservables(
this.config.getGlobalActions()
);
this.multiActions = this.setupActionsDefaultObservables(
Function initialise
has a Cognitive Complexity of 38 (exceeds 8 allowed). Consider refactoring. Open
Open
private initialise() {
this.globalActions = this.setupActionsDefaultObservables(
this.config.getGlobalActions()
);
this.multiActions = this.setupActionsDefaultObservables(
- 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
ListComponent
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
Open
@Component({
selector: 'app-list',
templateUrl: './list.component.html',
styleUrls: ['./list.component.scss'],
animations: [
Function filterStoreToWidget
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
tap((paginationFilter: ListFilter) => {
this.filterString = paginationFilter.string;
const filterKey = paginationFilter.filterKey;
if (filterKey) {
Avoid too many return
statements within this function. Open
Open
return 'none';
TODO found Open
Open
// TODO: This needs tidying up - NJ
- Exclude checks