Showing 339 of 654 total issues
Function _createCellEditor
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
EditableGrid.prototype._createCellEditor = function(column)
{
column.cellEditor =
column.enumProvider ? new SelectCellEditor() :
column.datatype == "integer" || column.datatype == "double" ? new NumberCellEditor(column.datatype) :
- 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 _create
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
this.originalTitle = this.element.attr( "title" );
// #5742 - .attr() might return a DOMElement
if ( typeof this.originalTitle !== "string" ) {
this.originalTitle = "";
Consider simplifying this complex logical expression. Open
if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
inst.snapElements[i].snapping = false;
continue;
}
Function defaultPrefilter
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
function defaultPrefilter( elem, props, opts ) {
/*jshint validthis:true */
var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire,
anim = this,
style = elem.style,
Function _create
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
var that = this, o = this.options;
this.element.addClass("ui-resizable");
Function _insert
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
EditableGrid.prototype._insert = function(rowIndex, offset, rowId, cellValues, rowAttributes, dontSort)
{
var originalRowId = null;
var originalIndex = 0;
var _data = this.dataUnfiltered == null ? this.data : this.dataUnfiltered;
- 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 send
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
send: function( headers, complete ) {
// Get a new xhr
var handle, i,
xhr = s.xhr();
Function _rendergrid
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
EditableGrid.prototype._rendergrid = function(containerid, className, tableid)
{
with (this) {
// if we are already attached to an existing table, just update the cell contents
Function trigger
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
trigger: function( event, data, elem, onlyHandlers ) {
var i, cur, tmp, bubbleType, ontype, handle, special,
eventPath = [ elem || document ],
type = event.type || event,
Function Animation
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Animation( elem, properties, options ) {
var result,
stopped,
index = 0,
length = animationPrefilters.length,
Function mouseClicked
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
EditableGrid.prototype.mouseClicked = function(e)
{
e = e || window.event;
with (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 _createCellRenderer
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
EditableGrid.prototype._createCellRenderer = function(column)
{
column.cellRenderer =
column.enumProvider ? new EnumCellRenderer() :
column.datatype == "integer" || column.datatype == "double" ? new NumberCellRenderer() :
- 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 _keydown
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
_keydown: function( event ) {
var match, prev, character, skip, regex,
preventDefault = true;
function escape( value ) {
Function Sizzle
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Sizzle( selector, context, results, seed ) {
var match, elem, m, nodeType,
// QSA vars
i, groups, old, nid, newContext, newSelector;
Function _create
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
var accordionId = this.accordionId = "ui-accordion-" +
(this.element.attr( "id" ) || ++uid),
options = this.options;
Function Datepicker
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Datepicker() {
this.debug = false; // Change this to true to start debugging
this._curInst = null; // The current instance in use
this._keyEvent = false; // If the last event was a key event
this._disabledInputs = []; // List of date picker inputs that have been disabled
Function buildFragment
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildFragment: function( elems, context, scripts, selection ) {
var contains, elem, tag, tmp, wrap, tbody, j,
l = elems.length,
// Ensure a safe fragment
Function _create
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
this.activeMenu = this.element;
this.element
.uniqueId()
.addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
Function processXML
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
EditableGrid.prototype.processXML = function()
{
with (this) {
// clear model and pointer to current table
Function add
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
add: function( elem, types, handler, data, selector ) {
var handleObjIn, eventHandle, tmp,
events, t, handleObj,
special, handlers, type, namespaces, origType,