Showing 7 of 7 total issues
Function exports
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
'use strict';
var path = require('path');
Function addItems
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Grid.prototype.addItems = function (elements, options, callback) {
var evt = new CustomEvent('savvior:addItems', {
detail: {
element: this.element,
grid: this
Function addItems
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
GridDispatch.prototype.addItems = function (gridSelector, elements, options, callback) {
var cb;
var opts;
var defaults = {
clone: false,
Function addColumns
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Grid.prototype.addColumns = function(items, options) {
var columnClasses = options.columnClasses || ['column', 'size-1of'+ options.columns];
var columnsFragment = document.createDocumentFragment();
var columnsItems = [];
var i = options.columns;
Function restore
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Grid.prototype.restore = function(callback, scope) {
if (!this.status) {
isFunction(callback) && callback(false);
return false;
}
Function ready
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
GridDispatch.prototype.ready = function(selector) {
if (selector === undefined) {
var grids = [];
for (var key in this.grids) {
(this.grids[key].ready) && grids.push(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 addItems
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
GridDispatch.prototype.addItems = function (gridSelector, elements, options, callback) {
var cb;
var opts;
var defaults = {
clone: 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"