Showing 223 of 433 total issues
Function ignoreAll
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function ignoreAll() {
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 replaceAll
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function replaceAll() {
var ti = this.currentTextIndex;
var wi = this.currentWordIndex;
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
Method status
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def status
if draft?
STATUS[:draft]
elsif promoted? and RECOMMENDATION[recommendation][:show_elig]
STATUS[:can_refer]
- 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 ignoreAll
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function ignoreAll() {
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 replaceAll
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function replaceAll() {
var ti = this.currentTextIndex;
var wi = this.currentWordIndex;
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 onload
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
window.onload = function(evt) {
if (ieConsoleSavedOnLoad) ieConsoleSavedOnLoad(evt);
if (typeof console == "undefined") console = {};
if (typeof console.log == "undefined") {
console.log = function(msg) {
- 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 createButton
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
o.createButton = function() {
if(o.staticPos) { return; };
var but;
Function resolve
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
dom.resolve = function() {
var results = new Array();
var i,j,o;
for (var i=0; i<arguments.length; i++) {
var o = arguments[i];
Function setPosition
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Popup.prototype.setPosition = function() {
if (this.position!=null) {
var m = this.position.match(/^(\S+)\s+(\S+)/);
if (m!=null && m.length==3) {
var v = m[1];
Function getType
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
getType: function(value) {
var self = IEConsole;
var type = typeof value;
try {
if (type == "undefined") {
- 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 destroy
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
o.destroy = function() {
// Cleanup for Internet Explorer
datePickerController.removeEvent(o.staticPos ? o.table : document, "mousedown", o.events.onmousedown);
datePickerController.removeEvent(document, "mouseup", o.events.clearTimer);
o.removeKeyboardEvents();
Function getType
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
getType: function(value) {
var self = IEConsole;
var type = typeof value;
try {
if (type == "undefined") {
Function writeBody
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function writeBody() {
var d = window.document;
var is_html = false;
d.open();
Function returnFormattedDate
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
o.returnFormattedDate = function() {
var elem = o.getElem();
if(!elem) return;
Function writeBody
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function writeBody() {
var d = window.document;
var is_html = false;
d.open();
Method index
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
def index
#TODO test and refactor
flash[:notice]=nil
@without=params[:without]
Method add_extended_profile
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.add_extended_profile(student)
FactoryGirl.create :ext_summary, student: student
FactoryGirl.create :ext_adult_contact, student: student
FactoryGirl.create :ext_sibling, student: student
student.ext_test_scores.create!( [
Function show
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Popup.prototype.show = function(options, modal) {
this.modal = this.modal || (typeof(modal)=="boolean" && modal);
if (defined(options) && options!=null && typeof(options)=="object") {
for (var i in options) {
this[i] = options[i];
Function setDateFromInput
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
o.setDateFromInput = function() {
function m2c(val) {
return String(val).length < 2 ? "00".substring(0, 2 - String(val).length) + String(val) : val;
};
Function spellChecker
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function spellChecker( textObject ) {
// public properties - configurable
this.popUpUrl = '/speller/spellchecker.html';
this.popUpName = 'spellchecker';