jonshaffer/angular-data-table

View on GitHub
src/components/DataTableController.js

Summary

Maintainability
C
1 day
Test Coverage

Showing 4 of 4 total issues

Function onSorted has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
Open

onSorted() {
if (!this.rows) {
return;
}
 
 
Severity: Minor
Found in src/components/DataTableController.js - About 4 hrs to fix

DataTableController has 21 functions (exceeds 20 allowed). Consider refactoring.
Open

export default class DataTableController {
/**
* Creates an instance of the DataTable Controller
* @param {scope}
* @param {filter}
Severity: Minor
Found in src/components/DataTableController.js - About 2 hrs to fix

Function onSorted has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

onSorted() {
if (!this.rows) {
return;
}
 
 
Severity: Minor
Found in src/components/DataTableController.js - About 1 hr to fix

Avoid too many return statements within this function.
Open

return 0;
Severity: Major
Found in src/components/DataTableController.js - About 30 mins to fix

There are no issues that match your filters.

Category
Status