Showing 223 of 433 total issues
Avoid too many return
statements within this function. Open
Open
return "DOMNodeList";
Avoid too many return
statements within this function. Open
Open
return o.killEvent(e);
Avoid too many return
statements within this function. Open
Open
return '"' + result.replace('"', '\\"')
.replace("\n", '\\n')
.replace("\r", '\\r')
+ '"';
Avoid too many return
statements within this function. Open
Open
return o.killEvent(e);
Avoid too many return
statements within this function. Open
Open
return 'undefined';
Avoid too many return
statements within this function. Open
Open
return "unknown";
Avoid too many return
statements within this function. Open
Open
return "Array(length: " + result.length + ")";
Avoid too many return
statements within this function. Open
Open
return 'function() {}';
Avoid too many return
statements within this function. Open
Open
return "Failed to format result: " + e.message;
Avoid too many return
statements within this function. Open
Open
return "Array";
Avoid too many return
statements within this function. Open
Open
return "object";
Avoid too many return
statements within this function. Open
Open
if(o.outOfRange(tmpDate)) return o.killEvent(e);
Avoid too many return
statements within this function. Open
Open
return o.killEvent(e);
Avoid too many return
statements within this function. Open
Open
return "" + result;
Avoid too many return
statements within this function. Open
Open
if ( kc < 37 || kc > 40 ) return true;
Avoid too many return
statements within this method. Open
Open
@messages << "Score is not between #{min} and #{max} #{line.to_s}" and return false
Avoid too many return
statements within this method. Open
Open
redirect_to students_url and return false
Avoid too many return
statements within this method. Open
Open
check_for_duplicate(intervention,line) and return false
Function replaceWord
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
function replaceWord() {
var wi = this.currentWordIndex;
var ti = this.currentTextIndex;
if( !this.wordWin ) {
alert( 'Error: Word frame not available.' );
- 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 createPromptAndInput
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
createPromptAndInput: function() {
var container = document.createElement("div");
container.innerHTML = "<table style=\"width: 100%\" cellspacing=\"0\" cellpadding=\"0\"><tr>" +
"<td width=\"25\" style=\"padding-top: 10px;\">>>></td>" +
"<td><input type=\"text\" /></td>" +
- 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"