Showing 110 of 168 total issues
Avoid deeply nested control flow statements. Open
Open
if (arguments[i] === undef) {
match[i] = undef;
}
Avoid deeply nested control flow statements. Open
Open
if (e.shiftKey) {
self.insert('\n');
} else {
if (history && command && !mask &&
((typeof options.historyFilter == 'function' &&
Avoid deeply nested control flow statements. Open
Open
if (new_object) {
$.extend(object, new_object);
}
Avoid deeply nested control flow statements. Open
Open
} else if (e.which === 8) { //backspace
if (reverse_search) {
reverse_search_string = reverse_search_string.slice(0, -1);
draw_reverse_prompt();
} else {
Avoid deeply nested control flow statements. Open
Open
if (last[last.length-1] !== ']') {
prev_format = last.match(format_begin_re)[1];
output_line += ']';
} else if (output_line.match(format_last_re)) {
var line_len = output_line.length;
Avoid deeply nested control flow statements. Open
Open
if (line[j] === '&') { // treat entity as one character
var m = line.substring(j).match(/^(&[^;]+;)/);
if (!m) {
// should never happen if used by terminal, because
// it always calls $.terminal.encode before this function
Avoid deeply nested control flow statements. Open
Open
} else if (type === 'object') {
$.extend(object, first);
recur(rest, success);
}
Avoid deeply nested control flow statements. Open
Open
if (matched[0].charAt(j) !== matched[i].charAt(j)) {
break loop;
}
Avoid deeply nested control flow statements. Open
Open
if (!silent) {
try {
settings.onTerminalChange(self);
} catch (e) {
display_exception(e, 'onTerminalChange');
Avoid deeply nested control flow statements. Open
Open
if (num_lines === 3) {
before.before('<div>' + $.terminal.encode(array[0], true) +
'</div>');
draw_cursor_line(array[1], position-first_len-1);
after.after('<div class="clear">' +
Avoid deeply nested control flow statements. Open
Open
if (result === false) {
lines = lines.slice(0, position).
concat(lines.slice(position+1));
} else {
lines = lines.slice(0, position).
Function filesize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
humanize.filesize = function(filesize, kilo, decimals, decPoint, thousandsSep, suffixSep) {
Avoid deeply nested control flow statements. Open
Open
for (i=strings.length-1; i>0; i--) {
// treat escape space as part of the string
if (strings[i-1][strings[i-1].length-1] == '\\') {
string = strings[i-1] + ' ' + string;
} else {
Function add
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
add: function(element, interval, label, fn, times, belay) {
Avoid deeply nested control flow statements. Open
Open
while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {
if ((field_match = /^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) {
field_list.push(field_match[1]);
}
else if ((field_match = /^\[(\d+)\]/.exec(replacement_field)) !== null) {
Avoid deeply nested control flow statements. Open
Open
if (output_line.match(']')) {
prev_format = '';
}
Avoid deeply nested control flow statements. Open
Open
if (fn.$timerID) {
window.clearInterval(timers[label][fn.$timerID]);
delete timers[label][fn.$timerID];
}
Avoid deeply nested control flow statements. Open
Open
if (terminals.length() > 1) {
self.focus(false);
return false;
}
Avoid deeply nested control flow statements. Open
Open
} else if (e.which === 34) { // PAGE DOWN
self.scroll(self.height());
} else if (e.which === 33) { // PAGE UP
self.scroll(-self.height());
} else {
Consider simplifying this complex logical expression. Open
Open
} else if (c === 0 || (c >= 5 && c <= 20) || (c % 10 >= 5 && c % 10 <= 9) || (c % 10 === 0) ) {
return 0;
} else if (c === 1 || c % 10 === 1) {
return 1;
} else if (c > 1) {