Showing 390 of 605 total issues
Function removeAttribute
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Spry.Utils.removeAttribute = function(ele, name)
{
ele = Spry.$(ele);
if (!ele || !name)
return;
- 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 loadURL
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Spry.Utils.loadURL = function(method, url, async, callback, opts)
{
var req = new Spry.Utils.loadURL.Request();
req.method = method;
req.url = url;
- 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 xpathSort
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function xpathSort(input, sort) {
if (sort.length == 0) {
return;
}
- 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 getSortFunc
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Spry.Data.DataSet.prototype.sort.getSortFunc = function(prop, type, order)
{
var sortfunc = null;
if (type == "number")
{
- 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 getDataSetContext
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Spry.Data.Region.ProcessingContext.prototype.getDataSetContext = function(dataSet)
{
if (!dataSet)
{
// We were called without a specified data set or
- 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 updateContent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
updateContent: function(responseText) {
var receiver = this.container[this.success() ? 'success' : 'failure'],
options = this.options;
if (!options.evalScripts) responseText = responseText.stripScripts();
- 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 (pressed == autocomplete)
{
if (this.nextDateDelimiterExists(this.oldValue, this.selection.start, group))
{
futureValue = this.oldValue;
Avoid deeply nested control flow statements. Open
for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
if ( item ) {
found = filter( item, match, i, curLoop );
var pass = not ^ !!found;
Avoid deeply nested control flow statements. Open
if ( !isXML ) {
elem.sizcache = doneName;
elem.sizset = i;
}
Function CLASS
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
CLASS: function(match, curLoop, inplace, result, not, isXML){
Function ATTR
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
ATTR: function(match, curLoop, inplace, result, not, isXML){
Avoid deeply nested control flow statements. Open
for (var sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start ++){
range_all.moveStart('character', 1);
}
Function contains
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Spry.Widget.Utils.contains = function (who, what)
{
if (typeof who.contains == 'object') {
return what && who && (who == what || who.contains(what));
} else {
- 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 (node.tagName !== "!") // Filter out comment nodes.
results.push(node);
Avoid deeply nested control flow statements. Open
if (out >= max_out) {
return false;
}
Avoid deeply nested control flow statements. Open
if (q < t) {
break;
}
Avoid deeply nested control flow statements. Open
if ( !anyFound ) {
return [];
}
Avoid deeply nested control flow statements. Open
if ( a == b ) {
hasDuplicate = true;
}
Avoid deeply nested control flow statements. Open
if ( !match ) {
anyFound = found = true;
} else if ( match === true ) {
continue;
}
Avoid deeply nested control flow statements. Open
if(group == this.lastDateGroup)
{
this.redTextFlash(); return false;
}
else