Showing 243 of 2,691 total issues
Function processSelection
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
processSelection(isPrev) {
if (isPrev) {
this.cleanSelection(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 do_rename
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function do_rename(element, inEvent) {
var address = get_address_from_class(element);
if ($(element).hasClass('addr') && $(element).hasClass('flag')) {
var space = '*';
if ($(element).hasClass('function')) space = 'functions';
- 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 add
has a Cognitive Complexity of 20 (exceeds 5 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;
}
- 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 handleKeyDown
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
KeyHandler.prototype.handleKeyDown = function(e) {
var current_node, key, moveDown, moveLeft, moveRight, moveUp, selectNode;
if (!this.tree_widget.options.keyboardSupport) {
return;
}
File statusbar.legacy.js
has 275 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* TODO
* - add timestamp
* - support tabs and console
*/
var statusLog = [];
Function itemSelected
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
itemSelected: function(inSender, inEvent) {
var self = this;
var selected = inEvent.originator.content;
var is_visible = this.$.menu.getShowing();
r2ui.rp = self;
Function getTextLogger
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
r2.getTextLogger = function(obj) {
if (typeof (obj) != 'object') {
obj = {};
}
obj.last = 0;
Function addLongListDialog
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
addLongListDialog(list) {
var _this = this;
var dialog = document.createElement('dialog');
dialog.className = 'mdl-dialog';
Function populateFrom
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
populateFrom(offset) {
// From currentOffset
// I want at least 80% of 3 screens
// go up of 1 screen, take first in order
- 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 render
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
BBGraph.prototype.render = function() {
var name = Object.keys(this.vertices).toString();
var outergbox = document.createElement('div');
outergbox.id = 'outergbox';
var bbcanvas = document.getElementById('canvas');
- 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 drawChunk
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawChunk(chunk, where) {
if (chunk.offset === 0 && chunk.hex.length === 0) {
return this.firstElement;
}
Function do_rename
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
function do_rename(element, inEvent) {
var address = get_address_from_class(element);
if ($(element).hasClass('addr') && $(element).hasClass('flag')) {
var space = '*';
if ($(element).hasClass('function')) space = 'functions';
Function getPanel
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
getPanel() {
var c = document.createElement('div');
var header = document.createElement('div');
header.style.position = 'fixed';
Function _selectNode
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
JqTreeWidget.prototype._selectNode = function(node, must_toggle) {
var canSelect, deselected_node, openParents, saveState;
if (must_toggle == null) {
must_toggle = false;
}
Function Ajax
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Ajax(method, uri, body, fn, err) {
if (typeof (XMLHttpRequest) == 'undefined') {
return false;
}
if (r2.asyncMode == 'fake') {
Function handleClick
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function handleClick(inEvent) {
if ($(inEvent.target).hasClass('addr')) {
if ($(inEvent.target).hasClass('history')) {
var idx = inEvent.target.className.split(' ').filter(function(x) { return x.substr(0, 'history_idx_'.length) == 'history_idx_'; });
Function getPanel
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
getPanel() {
var c = document.createElement('div');
if (this.inColor) {
c.style.backgroundColor = '#202020';
}
Function instanciate_
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
instanciate_(widget) {
switch (widget) {
case Widgets.OVERVIEW:
this.widgets[widget] = new OverviewWidget();
break;
Function modalMenu
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function modalMenu () {
var menu = [
'Analyze:aaa',
'Assembler:&Assembler',
'Classes:icc',
Function handle_hex_double_click
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function handle_hex_double_click(inEvent) {
// handle offset seek
if ($(inEvent.target).hasClass('hexaddr')) {
var address = get_address_from_class(inEvent.target, 'hexaddr');
console.log(address);