Showing 243 of 2,691 total issues
Function render
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
LogsPanel.prototype.render = function() {
function encode(r) {
return r.replace(/[\x26\x0A\<>'"]/g, function(r) {return '&#' + r.charCodeAt(0) + ';';});
}
var self = this;
- 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 drawWords_
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
drawWords_(hexpairs, asciis, pairs, chars, modifications, offset, size) {
var words = this.pairs2words(pairs, size);
hexpairs.classList.add('words');
for (var x = 0 ; x < pairs.length ; x++) {
- 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 (line.dashed) ctx.setLineDash([2,3]);
Function appendTo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function appendTo(list, elems) {
if (elems === null) {
return;
}
for (var i = 0 ; i < elems.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
Avoid deeply nested control flow statements. Open
for (var i = 0; i < a.length; i++) { this.frames[col].push(a[i]); }
Avoid deeply nested control flow statements. Open
if (!space) {
continue;
}
Avoid deeply nested control flow statements. Open
for (var i = 0; i < a.length; i++) { this.frames.push(a[i]); }
Avoid deeply nested control flow statements. Open
if (color !== undefined && color !== null) {
if (sel == '.ec_gui_background' || sel == '.ec_gui_alt_background') {
myrules[j].style.backgroundColor = color;
} else if (sel == '.ec_border') myrules[j].style.borderColor = color;
else myrules[j].style.color = color;
Avoid deeply nested control flow statements. Open
for (var i = 0; i < lines.length; i++) {
var elems = lines[i].split(/ /g);
var name = '';
var addr = '';
for (var j = 0; j < elems.length; j++) {
Avoid deeply nested control flow statements. Open
for (var col in this.frames) {
for (var row in this.frames[col]) {
prev = this.frames[col][row];
break;
}
Avoid deeply nested control flow statements. Open
if (line.dashed) ctx.setLineDash([2,3]);
Consider simplifying this complex logical expression. Open
if ((r2.varMap[ins.fcn_addr] !== null && r2.varMap[ins.fcn_addr] !== undefined && r2.varMap[ins.fcn_addr].length > 0) ||
(r2.argMap[ins.fcn_addr] !== null && r2.argMap[ins.fcn_addr] !== undefined && r2.argMap[ins.fcn_addr].length > 0)) {
for (var i in r2.varMap[ins.fcn_addr]) {
var var_name = r2.varMap[ins.fcn_addr][i].name;
var var_id = r2.varMap[ins.fcn_addr][i].id;
Function uiSelect
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function uiSelect(dom, name, list, defaultOffset, onChange) {
Function new_frame
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
this.new_frame = function (name, body, update, pos, cb) {
Function Ajax
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function Ajax(method, uri, body, fn, err) {
Function addRow
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
addRow(cells) {
var tr = document.createElement('tr');
this.tbody.appendChild(tr);
for (var i = 0; i < cells.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 getFlags
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getFlags(minSize, callback) {
var filter = function(flags) {
var filteredFlags = [];
for (var i = 0 ; i < flags.length ; i++) {
if (flags[i].size >= minSize) {
- 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 init
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
init() {
this.root = document.createElement('table');
this.root.className = 'mdl-data-table mdl-data-table--selectable mdl-shadow--2dp';
if (this.root.id !== false) {
this.root.id = this.id;
- 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 getWidget
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getWidget(name, autobinding) {
var autobinding = (typeof autobinding === 'undefined'); // Default is true
for (var i = 0 ; i < this.widgets.length ; i++) {
if (this.widgets[i].getName() === name) {
- 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 statusMessage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function statusMessage(x, t) {
var statusbar = document.getElementById('statusbar');
if (x) {
statusLog.push(x);
}
- 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"