Showing 45 of 68 total issues
Function default
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export default function(tableDiv) {
if (!tableDiv) {
return false;
}
- 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 default
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function(tableDiv) {
if (this.dableClass) {
tableDiv.setAttribute('class', this.dableClass);
}
- 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 default
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function(tableDiv) {
if (!tableDiv) {
return false;
}
- 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 default
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(input) { //Check for existing table
if (input) {
if (input.nodeType && input.nodeName.toLowerCase() == 'div') {
if (input.hasAttribute('id')) {
this.id = input.getAttribute('id');
Function default
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export default function(columnIndex, ascending, currentRowObjects) {
var isInt = true;
var isDate = true;
var newRowObjects = currentRowObjects.slice(0);
for (var i = 0; i < currentRowObjects.length; ++i) {
- 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 default
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(tableInput) {
var tableId = this.CheckForTable(tableInput);
if (!tableId) {
return false;
}
Function default
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export default function(tableDiv, style) {
if (!tableDiv) {
tableDiv = document.getElementById(this.id);
if (!tableDiv) {
return false;
- 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 default
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export default function(tableNode) {
if (!tableNode) {
console.error('Dable Error: No HTML table to generate dable from');
return false;
}
- 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 default
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export default function(tableDiv) {
tableDiv.removeAttribute('class');
var children = tableDiv.children;
for (var i = 0; i < children.length; ++i) {
children[i].removeAttribute('class');
- 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 default
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(footer) {
if (!footer) {
return false;
}
var start = this.pageNumber * this.pageSize + 1;
Consider simplifying this complex logical expression. Open
if (splitDate.length != 3 ||
(splitDate[0].length < 1 || splitDate[0].length > 2) ||
(splitDate[1].length < 1 || splitDate[1].length > 2) ||
splitDate[2].length != 2 && splitDate[2].length != 4) {
isDate = false;
Function default
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function(footer) {
if (!footer) {
return false;
}
var start = this.pageNumber * this.pageSize + 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 default
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export default function() {
this.pageNumber = this.NumberOfPages() - 1;
//page number is 0 based
if (this.async &&
(this.asyncStart > this.pageNumber * this.pageSize ||
- 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
Avoid deeply nested control flow statements. Open
if (callback) {
return callback('Error, no rowCount in data from source');
}
Avoid deeply nested control flow statements. Open
if (arrayContains(includedRows, this.rows[j])) {
continue;
}
Avoid deeply nested control flow statements. Open
for (var k = 0; k < this.rows[j].length; ++k) {
if (this.filters[i](this.currentFilter, this.rows[j][k])) {
includedRows.push(this.rows[j]);
includedRowObjects.push(this.rowObjects[j]);
break;
Function mixin
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function mixin(obj, mixins) {
for (var key in mixins) {
if (Object.prototype.hasOwnProperty.call(mixins, key)) {
obj[key] = typeof mixins[key] === 'object' && mixins[key] !== null ?
mixin(mixins[key].constructor(), mixins[key]) : mixins[key];
- 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 default
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export default function(start, filter, sortColumn, ascending, callback) { //callback if async
Function default
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export default function(tableDiv) {
var result = false;
var checkId = '';
if (!tableDiv) {
- 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 default
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export default function(page) {
this.pageNumber = page;
if (this.async &&
(this.asyncStart > this.pageNumber * this.pageSize ||
this.pageNumber * this.pageSize >=
- 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"