Showing 243 of 2,691 total issues
Function other_frame
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.other_frame = function (dir) {
if (!this.curframe) {
return;
}
switch (dir) {
Function get
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
get(which, callback, force) {
var dir = (which === NavigatorDirection.BEFORE) ? 'prev' : 'next';
var item;
if (which === NavigatorDirection.CURRENT) {
Function handleTap
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleTap: function(inSender, inEvent) {
if (typeof inEvent.target.className === 'string') {
if (inEvent.target.className.indexOf(' addr ') > -1) {
var address = get_address_from_class(inEvent.target);
rehighlight_iaddress(address);
Function onkeydown
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
document.onkeydown = function (evt) {
evt = evt || window.event;
var isEscape = false;
if ('key' in evt) {
isEscape = (evt.key === 'Escape' || evt.key === 'Esc');
Function setStatusbarBody
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setStatusbarBody() {
function addElement(e, id) {
var doc = document.createElement(e);
doc.id = id;
doc.className = id;
Function handleInputTextChange
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
handleInputTextChange: function() {
if (this.renaming !== null && this.rbox.value.length > 0) {
if ($(this.selected).hasClass('insaddr')) {
var old_value = get_offset_flag(r2ui._dis.selected_offset);
var type = 'offsets';
- 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 drawAnalysisDialog
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
drawAnalysisDialog() {
this.analysisMethods = [{
name: 'Analyse current offset',
ugly: 'curoffset',
active: true,
- 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 handleInputTextChange
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
DisasmPanel.prototype.handleInputTextChange = function() {
if (this.renaming !== null && this.rbox.value.length > 0) {
if ($(this.selected).hasClass('insaddr')) {
var old_value = get_offset_flag(r2ui._dis.selected_offset);
var type = 'offsets';
- 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 insertData
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
TypesPanel.prototype.insertData = function(k, v, array) {
if (typeof array === 'undefined') { array = this.data; };
var kt = k[0].trim();
if (k.length == 1) {
- 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 colorbar_create
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
colorbar_create: function () {
var self = this;
r2.cmd ("p-j 24", function(x) {
try {
var y = JSON.parse (x);
Function colorbar_create
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
colorbar_create: function() {
var self = this;
r2.cmd('p-j', function(x) {
try {
var y = JSON.parse(x);
Function create
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
create: function() {
this.inherited(arguments);
var mode = readCookie('r2_view_mode');
if (!mode) mode = 'old';
Function addRow
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
addRow(cells) {
var tr = document.createElement('tr');
this.tbody.appendChild(tr);
for (var i = 0; i < cells.length; i++) {
Function fillFrame
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
var fillFrame = function () {
// TODO: list breakpoints with `dbj`
r2.cmdj('drj', function (regs) {
r2.cmd('pxQ@rsp', function (pxQ) {
r2.cmd('dbt', function (dbt) {
Function render
has 48 lines of code (exceeds 25 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;
Function rendered
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
rendered: function() {
this.inherited(arguments);
myLayout = $('#radareApp_mp_panels_pageDisassembler_panel').layout({
south__size: 200
});
Function processSelection
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
processSelection(isPrev) {
if (isPrev) {
this.cleanSelection(true);
}
Function add
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
add(widget) {
if (this.populatedWidgets.indexOf(widget) !== -1) {
// Can't open the same panel more than once: draw() should be called
return;
}
Function _initScrollParent
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
ScrollHandler.prototype._initScrollParent = function() {
var $scroll_parent, getParentWithOverflow, setDocumentAsScrollParent;
getParentWithOverflow = (function(_this) {
return function() {
var css_values, el, hasOverFlow, _i, _len, _ref;
Function ready
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ready() {
if (twice) {
return;
}
twice = true;