Showing 243 of 2,691 total issues
File tree.jquery.js
has 2649 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Generated by CoffeeScript 1.7.1
(function() {
var $, BorderDropHint, DragAndDropHandler, DragElement, ElementsRenderer, FolderElement, GhostDropHint, HitAreasGenerator, JqTreeWidget, KeyHandler, MouseWidget, Node, NodeElement, Position, SaveStateHandler, ScrollHandler, SelectNodeHandler, SimpleWidget, VisibleNodeIterator, get_json_stringify_function, html_escape, indexOf, isInt, __version__, _indexOf,
__slice = [].slice,
__hasProp = {}.hasOwnProperty,
Function Tiled
has a Cognitive Complexity of 251 (exceeds 5 allowed). Consider refactoring. Open
function Tiled (id) {
var obj = document.getElementById(id);
var self = this;
this.modal = null;
this.curframe = 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 onload
has 508 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.onload = function () {
var position = 'right';
var t = new Tiled('canvas');
var ctr = 0;
r2.cmd('e scr.color=3;eco sepia;e scr.html=true', function () {
File disasm.js
has 995 lines of code (exceeds 250 allowed). Consider refactoring. Open
var BBGraph = function() {
this.vertices = {};
this.edges = [];
this.elements = [];
this.links = [];
File Hexdump.js
has 939 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {HexPairNavigator} from './HexPairNavigator';
import {NavigatorDirection} from '../../core/NavigatorDirection';
import {RadareInfiniteBlock} from '../../layout/RadareInfiniteBlock';
import {FlexContainer} from '../../layout/FlexContainer';
import {WordSizes} from './WordSizes';
Function Tiled
has 437 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Tiled (id) {
var obj = document.getElementById(id);
var self = this;
this.modal = null;
this.curframe = undefined;
Function html_for_instruction
has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring. Open
function html_for_instruction(ins) {
var idump = '<div class="instruction enyo-selectable">';
var offset = '0x' + ins.offset.toString(16);
var address = offset;
var asm_flags = (r2.settings['asm.flags']);
- 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 handleKeyPress
has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring. Open
handleKeyPress: function(inSender, inEvent) {
var keynum = inEvent.keyCode || inEvent.charCode || inEvent.which || 0;
var key = String.fromCharCode(keynum);
// console.log(key);
- 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
File Disassembly.js
has 657 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {DisassemblyNavigator} from './DisassemblyNavigator';
import {RadareInfiniteBlock} from '../../layout/RadareInfiniteBlock';
import {FlexContainer} from '../../layout/FlexContainer';
import {uiContext} from '../../core/UIContext';
Function handleKeypress
has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring. Open
function handleKeypress(inEvent) {
var keynum = inEvent.keyCode || inEvent.charCode || inEvent.which || 0;
var key = String.fromCharCode(keynum);
// console.log(key);
- 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_instructions
has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring. Open
function render_instructions(instructions) {
var outergbox = document.createElement('div');
outergbox.id = 'outergbox';
var flatcanvas = document.getElementById('canvas');
flatcanvas.innerHTML = '';
- 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
File r2.js
has 574 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* radare2 Copyleft 2013-2024 pancake */
var r2 = {};
// TODO: avoid globals
Function filter_asm
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
r2.filter_asm = function(x, display) {
var curoff = backward ? prev_curoff : next_curoff;
var lastoff = backward ? prev_lastoff : next_lastoff;
var lines = x.split(/\n/g);
r2.cmd('s', function(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
File main.js
has 534 lines of code (exceeds 250 allowed). Consider refactoring. Open
function findPos (obj) {
var curtop = 0;
var curleft = 0;
if (obj.offsetParent) {
File disasm_panel.js
has 531 lines of code (exceeds 250 allowed). Consider refactoring. Open
// DISASSEMBLER PANEL
var DisasmPanel = function() {
this.display = 'flat';
this.min = 0;
this.max = 0;
File disassembler.js
has 490 lines of code (exceeds 250 allowed). Consider refactoring. Open
enyo.kind({
name: 'Disassembler',
kind: 'Scroller',
tag: 'div',
classes: 'ec_gui_background',
Function handleTap
has a Cognitive Complexity of 50 (exceeds 5 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);
- 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
File tiled.js
has 487 lines of code (exceeds 250 allowed). Consider refactoring. Open
function _ (x) { return document.getElementById(x); }
var html = {
text: function (text) {
var o = document.createElement('font');
Function drawContextualMenu
has 159 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawContextualMenu() {
var exportOp = (name, range, command, ext) => {
var output;
r2.cmd(command + ' ' + (range.to - range.from) + ' @' + range.from, (d) => { output = d; });
Function drawPairs_
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawPairs_(hexpairs, asciis, pairs, chars, modifications, offset) {
hexpairs.classList.add('pairs');
var editableHexEvent = {
keydown: (evt) => evt.keyCode === 13 && collectHexpair(evt.target),