Showing 44 of 51 total issues
Function render
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
render: function(renderer, set){
var self = this;
// TODO : compile and cache
- 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 makeRowSelection
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
makeRowSelection: function(tableInstance, $row, largeSelection){
// check if we already reached the max selection
var maxSelection = this.getOption("maxSelection", tableInstance);
if(maxSelection === 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 selectRow
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
selectRow : function(tableInstance, $row, selectionType){
var maxSelection = this.getOption("maxSelection", tableInstance);
var plugin = this;
- 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 drawHeaderColumns
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawHeaderColumns : function($row, tableInstance){
var self = this;
var currentOrderingIndexed = ZeroTable.clone(tableInstance.dataConnector.getOrder());
var i = 0;
Function exports
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(grunt) {
// Source files to include
var sourceFiles = grunt.file.readJSON('build.json');
Function SearchDetails
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
ZeroTable.Tools.SearchDetails = function(table, options){
this.options = {};
options = options || {};
Function render
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function(renderer, set){
var self = this;
// TODO : compile and cache
Function foreach
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
ZeroTable.foreach = function(set,callback){
if(set instanceof Array){
for(var i = 0; i < set.length ; i++ ){
var r = callback(set[i],i,set);
- 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 tableKeys
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
"tableKeys" : function(plugin){
return {
internalSelection: {},
Function drawInnerRow
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawInnerRow: function(tableInstance, dataRow, $row){
// Remove custom class because they depend on the data
var customClass = $row.attr('data-zt-rowcustom-class');
if(customClass){
Function fire
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
fire : function(what, params){
var event = new ZeroTable.Bindable.Event(this);
if(this.bindable_bounds && this.bindable_bounds[what]) {
- 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 data.orderChange
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
"data.orderChange": function(e){
var tableInstance = this.context;
var dataConnector = e.originalEvent.context;
var order = dataConnector.getOrder();
Function update
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
update : function(delay){
var transactionId = this.__generateGuid;
this._currentTransaction = transactionId;
Function Table
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
ZeroTable.Table = function(options){
var self = this;
ZeroTable.extend(this,[
Function Paginator
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
ZeroTable.Tools.Paginator = function(table){
this.table = table;
this.$item = $('<div class="zt-paginator"></div>');
var $firstPage = $('<div class="zt-pagi-ico zt-first-page"><<</div>');
Function selectRow
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
selectRow : function(tableInstance, $row, selectionType){
var maxSelection = this.getOption("maxSelection", tableInstance);
var plugin = this;
Function afterDrawCell
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
"afterDrawCell": function(e){
if(e.cell.hasRole("data")){
var value;
if(!e.columnDef.options.render && e.columnDef.options.content){
- 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 TableInstance
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
ZeroTable.TableInstance = function(table, datapool, options){
if(table instanceof ZeroTable.Table){
this.table = table;
Function SortDetails
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
ZeroTable.Tools.SortDetails = function(table, options){
this.options = {};
options = options || {};
Function parseFilters
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parseFilters(data, filters){
if(filters.length > 0){
for(var i = 0; i<filters.length; i++){
var params = filters[i].match(/\(.*\)/g);