radare/radare2-webui

View on GitHub

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) {
Severity: Major
Found in www/t/js/tiled.js - About 2 hrs to fix

    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) {
    Severity: Major
    Found in www/m/js/core/BlockNavigator.js - About 2 hrs to fix

      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);
      Severity: Major
      Found in www/enyo/js/disassembler.js - About 2 hrs to fix

        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');
        Severity: Major
        Found in www/t/js/main.js - About 2 hrs to fix

          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;
          Severity: Major
          Found in www/m/js/helpers/statusbar/statusbar.legacy.js - About 2 hrs to fix

            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';
            Severity: Minor
            Found in www/enyo/js/disassembler.js - About 2 hrs to fix

            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,
            Severity: Minor
            Found in www/m/js/modules/disasm/Disassembly.js - About 2 hrs to fix

            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';
            Severity: Minor
            Found in www/p/lib/js/panels/disasm_panel.js - About 2 hrs to fix

            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) {
            Severity: Minor
            Found in www/p/lib/js/panels/types_panel.js - About 2 hrs to fix

            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);
            Severity: Major
            Found in www/enyo/js/core/disassembler_old.js - About 2 hrs to fix

              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);
              Severity: Major
              Found in www/enyo/js/hexdump.js - About 2 hrs to fix

                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';
                Severity: Minor
                Found in www/enyo/js/mainpanel.js - About 2 hrs to fix

                  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++) {
                  Severity: Minor
                  Found in www/m/js/helpers/Table.js - About 1 hr to fix

                    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) {
                    Severity: Minor
                    Found in www/t/js/main.js - About 1 hr to fix

                      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;
                      Severity: Minor
                      Found in www/p/lib/js/panels/logs_panel.js - About 1 hr to fix

                        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
                                });
                        Severity: Minor
                        Found in www/enyo/js/disassembler.js - About 1 hr to fix

                          Function processSelection has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              processSelection(isPrev) {
                                  if (isPrev) {
                                      this.cleanSelection(true);
                                  }
                          
                          
                          Severity: Minor
                          Found in www/m/js/modules/hexdump/Hexdump.js - About 1 hr to fix

                            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;
                                    }
                            Severity: Minor
                            Found in www/m/js/layout/ContainerZone.js - About 1 hr to fix

                              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;
                              Severity: Minor
                              Found in www/p/lib/js/dependencies/tree.jquery.js - About 1 hr to fix

                                Function ready has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function ready() {
                                    if (twice) {
                                        return;
                                    }
                                    twice = true;
                                Severity: Minor
                                Found in www/m/js/app.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language