Showing 339 of 654 total issues
Avoid too many return
statements within this function. Open
return ret;
Avoid too many return
statements within this function. Open
return results;
Avoid too many return
statements within this function. Open
return jQuery.makeArray( selector, this );
Avoid too many return
statements within this function. Open
return results;
Avoid too many return
statements within this function. Open
return results;
Avoid too many return
statements within this function. Open
return select( selector.replace( rtrim, "$1" ), context, results, seed );
Avoid too many return
statements within this function. Open
return this.constructor( context ).find( selector );
Avoid too many return
statements within this function. Open
return rootjQuery.ready( selector );
Avoid too many return
statements within this function. Open
return ret == null ?
undefined :
ret;
Avoid too many return
statements within this function. Open
return a.compareDocumentPosition ? -1 : 1;
Avoid too many return
statements within this function. Open
return this;
Avoid too many return
statements within this function. Open
return results;
Avoid too many return
statements within this function. Open
return i ?
// Do a sibling check if the nodes have a common ancestor
siblingCheck( ap[i], bp[i] ) :
// Otherwise nodes in our document sort first
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return false;
Function init
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
EditableGrid.prototype.init = function (name, config)
{
if (typeof name != "string" || (typeof config != "object" && typeof config != "undefined")) {
alert("The EditableGrid constructor takes two arguments:\n- name (string)\n- config (object)\n\nGot instead " + (typeof name) + " and " + (typeof config) + ".");
};
- 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 getColumnIndex
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
EditableGrid.prototype.getColumnIndex = function(columnIndexOrName)
{
if (typeof columnIndexOrName == "undefined" || columnIndexOrName === "") return -1;
// TODO: problem because the name of a column could be a valid index, and we cannot make the distinction here!
- 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 _renderHeaders
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
EditableGrid.prototype._renderHeaders = function()
{
with (this) {
var rows = tHead.rows;
for (var i = 0; i < 1 /*rows.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 getTypedValue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
EditableGrid.prototype.getTypedValue = function(columnIndex, cellValue)
{
var colType = this.getColumnType(columnIndex);
if (colType == 'boolean') cellValue = (cellValue && cellValue != 0 && cellValue != "false") ? true : false;
if (colType == 'integer') { cellValue = parseInt(cellValue, 10); }
- 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"