radare/radare2-webui

View on GitHub

Showing 2,691 of 2,691 total issues

Function onload has a Cognitive Complexity of 35 (exceeds 5 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 () {
Severity: Minor
Found in www/t/js/main.js - About 5 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

Identical blocks of code found in 4 locations. Consider refactoring.
Open

                                                if (f.length == len && str1.indexOf(str) >= 0) {
                                                    var fd = {
                                                        offset: f.paddr,
                                                        label: atob(f.string),
                                                        children: [
Severity: Major
Found in www/p/lib/js/panels/strings_panel.js and 3 other locations - About 5 hrs to fix
www/p/lib/js/panels/strings_panel.js on lines 46..58
www/p/lib/js/panels/strings_panel.js on lines 60..72
www/p/lib/js/panels/strings_panel.js on lines 111..123

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 139.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

                        if (str1.indexOf(str) >= 0 && f.length == len) {
                            var fd = {
                                offset: f.paddr,
                                label: atob(f.string),
                                children: [
Severity: Major
Found in www/p/lib/js/panels/strings_panel.js and 3 other locations - About 5 hrs to fix
www/p/lib/js/panels/strings_panel.js on lines 60..72
www/p/lib/js/panels/strings_panel.js on lines 96..108
www/p/lib/js/panels/strings_panel.js on lines 111..123

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 139.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

                                                if (f.length == len) {
                                                    var fd = {
                                                        offset: f.paddr,
                                                        label: atob(f.string),
                                                        children: [
Severity: Major
Found in www/p/lib/js/panels/strings_panel.js and 3 other locations - About 5 hrs to fix
www/p/lib/js/panels/strings_panel.js on lines 46..58
www/p/lib/js/panels/strings_panel.js on lines 60..72
www/p/lib/js/panels/strings_panel.js on lines 96..108

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 139.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 4 locations. Consider refactoring.
Open

                        if (str1.indexOf(str) >= 0) {
                            var fd = {
                                offset: f.paddr,
                                label: atob(f.string),
                                children: [
Severity: Major
Found in www/p/lib/js/panels/strings_panel.js and 3 other locations - About 5 hrs to fix
www/p/lib/js/panels/strings_panel.js on lines 46..58
www/p/lib/js/panels/strings_panel.js on lines 96..108
www/p/lib/js/panels/strings_panel.js on lines 111..123

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 139.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function drawAnalysisDialog has 129 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    drawAnalysisDialog() {
        this.analysisMethods = [{
            name: 'Analyse current offset',
            ugly: 'curoffset',
            active: true,
Severity: Major
Found in www/m/js/modules/disasm/Disassembly.js - About 5 hrs to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    function imgButton(iconName, title, onclick = null) {
        const button = document.createElement('button');
        button.className = 'mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect';
        button.style.margin = MARGIN;
        button.title = title;
    Severity: Major
    Found in www/m/js/helpers/Inputs.js and 1 other location - About 5 hrs to fix
    www/m/js/helpers/Inputs.js on lines 40..51

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 138.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    function iconButton(iconName, title, onclick = null) {
        const button = document.createElement('button');
        button.className = 'mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-js-ripple-effect';
        button.style.margin = MARGIN;
        button.title = title;
    Severity: Major
    Found in www/m/js/helpers/Inputs.js and 1 other location - About 5 hrs to fix
    www/m/js/helpers/Inputs.js on lines 27..38

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 138.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    function get_symbol_flag(symbol) {
        var full_name = symbol;
        var found = false;
        r2.cmdj('fs symbols;fj', function(x) {
            for (var i in x) {
    Severity: Major
    Found in www/lib/disasm.js and 1 other location - About 5 hrs to fix
    www/lib/disasm.js on lines 1105..1125

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 136.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    function get_reloc_flag(reloc) {
        var full_name = reloc;
        var found = false;
        r2.cmdj('fs relocs;fj', function(x) {
            for (var i in x) {
    Severity: Major
    Found in www/lib/disasm.js and 1 other location - About 5 hrs to fix
    www/lib/disasm.js on lines 1083..1103

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 136.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function has too many statements (58). Maximum allowed is 30.
    Open

    BBGraph.prototype.render = function() {
    Severity: Minor
    Found in www/lib/disasm.js by eslint

    enforce a maximum number of statements allowed in function blocks (max-statements)

    The max-statements rule allows you to specify the maximum number of statements allowed in a function.

    function foo() {
      var bar = 1; // one statement
      var baz = 2; // two statements
      var qux = 3; // three statements
    }

    Rule Details

    This rule enforces a maximum number of statements allowed in function blocks.

    Options

    This rule has a number or object option:

    • "max" (default 10) enforces a maximum number of statements allows in function blocks

    Deprecated: The object property maximum is deprecated; please use the object property max instead.

    This rule has an object option:

    • "ignoreTopLevelFunctions": true ignores top-level functions

    max

    Examples of incorrect code for this rule with the default { "max": 10 } option:

    /*eslint max-statements: ["error", 10]*/
    /*eslint-env es6*/
    
    function foo() {
      var foo1 = 1;
      var foo2 = 2;
      var foo3 = 3;
      var foo4 = 4;
      var foo5 = 5;
      var foo6 = 6;
      var foo7 = 7;
      var foo8 = 8;
      var foo9 = 9;
      var foo10 = 10;
    
      var foo11 = 11; // Too many.
    }
    
    let foo = () => {
      var foo1 = 1;
      var foo2 = 2;
      var foo3 = 3;
      var foo4 = 4;
      var foo5 = 5;
      var foo6 = 6;
      var foo7 = 7;
      var foo8 = 8;
      var foo9 = 9;
      var foo10 = 10;
    
      var foo11 = 11; // Too many.
    };

    Examples of correct code for this rule with the default { "max": 10 } option:

    /*eslint max-statements: ["error", 10]*/
    /*eslint-env es6*/
    
    function foo() {
      var foo1 = 1;
      var foo2 = 2;
      var foo3 = 3;
      var foo4 = 4;
      var foo5 = 5;
      var foo6 = 6;
      var foo7 = 7;
      var foo8 = 8;
      var foo9 = 9;
      var foo10 = 10;
      return function () {
    
        // The number of statements in the inner function does not count toward the
        // statement maximum.
    
        return 42;
      };
    }
    
    let foo = () => {
      var foo1 = 1;
      var foo2 = 2;
      var foo3 = 3;
      var foo4 = 4;
      var foo5 = 5;
      var foo6 = 6;
      var foo7 = 7;
      var foo8 = 8;
      var foo9 = 9;
      var foo10 = 10;
      return function () {
    
        // The number of statements in the inner function does not count toward the
        // statement maximum.
    
        return 42;
      };
    }

    ignoreTopLevelFunctions

    Examples of additional correct code for this rule with the { "max": 10 }, { "ignoreTopLevelFunctions": true } options:

    /*eslint max-statements: ["error", 10, { "ignoreTopLevelFunctions": true }]*/
    
    function foo() {
      var foo1 = 1;
      var foo2 = 2;
      var foo3 = 3;
      var foo4 = 4;
      var foo5 = 5;
      var foo6 = 6;
      var foo7 = 7;
      var foo8 = 8;
      var foo9 = 9;
      var foo10 = 10;
      var foo11 = 11;
    }

    Related Rules

    • [complexity](complexity.md)
    • [max-depth](max-depth.md)
    • [max-len](max-len.md)
    • [max-nested-callbacks](max-nested-callbacks.md)
    • [max-params](max-params.md) Source: http://eslint.org/docs/rules/

    Function drawControls has 123 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        drawControls(dom) {
            dom.innerHTML = '';
    
            var controlList = document.createElement('ul');
            controlList.classList.add('controlList');
    Severity: Major
    Found in www/m/js/modules/hexdump/Hexdump.js - About 4 hrs to fix

      Function render has 121 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      StringsPanel.prototype.render = function() {
          $('#strings_tab').html('<div id="strings" style="color:rgb(127,127,127);"></div>');
          //Added String search bar and length bar
          $('#strings').before('<div class="ui-toolbar ui-widget-header ui-helper-clearfix" style="padding:5px;"><input id="search_string" type="text" placeholder="Search "><input id="string_length" type="text" placeholder="Length" style="margin-left:50px;"></div>');
          r2.cmdj('izj', function(strings) {
      Severity: Major
      Found in www/p/lib/js/panels/strings_panel.js - About 4 hrs to fix

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

          more: function() {
            var text = this.$.text;
            this.max += this.block;
            r2.get_disasm (this.base+"+"+this.max, this.block, function (x) {
              x = docss (r2.filter_asm (x, "pd"));
        Severity: Major
        Found in www/enyo/js/core/disassembler_old.js and 1 other location - About 4 hrs to fix
        www/enyo/js/hexdump.js on lines 40..47

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 129.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

            more: function() {
                var text = this.$.text;
                this.max += this.block;
                r2.get_hexdump(this.base + '+' + this.max, this.block, function(x) {
                    x = docss(r2.filter_asm(x, 'px'));
        Severity: Major
        Found in www/enyo/js/hexdump.js and 1 other location - About 4 hrs to fix
        www/enyo/js/core/disassembler_old.js on lines 34..41

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 129.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Function drawContextualMenu has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
        Open

            drawContextualMenu(enableAoj) {
                var _this = this;
        
                var displayRes = function(offset, cmd) {
                    var output;
        Severity: Minor
        Found in www/m/js/modules/disasm/Disassembly.js - About 4 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 'do_rename' has too many statements (54). Maximum allowed is 30.
        Open

        function do_rename(element, inEvent) {
        Severity: Minor
        Found in www/p/lib/js/panels/disasm_panel.js by eslint

        enforce a maximum number of statements allowed in function blocks (max-statements)

        The max-statements rule allows you to specify the maximum number of statements allowed in a function.

        function foo() {
          var bar = 1; // one statement
          var baz = 2; // two statements
          var qux = 3; // three statements
        }

        Rule Details

        This rule enforces a maximum number of statements allowed in function blocks.

        Options

        This rule has a number or object option:

        • "max" (default 10) enforces a maximum number of statements allows in function blocks

        Deprecated: The object property maximum is deprecated; please use the object property max instead.

        This rule has an object option:

        • "ignoreTopLevelFunctions": true ignores top-level functions

        max

        Examples of incorrect code for this rule with the default { "max": 10 } option:

        /*eslint max-statements: ["error", 10]*/
        /*eslint-env es6*/
        
        function foo() {
          var foo1 = 1;
          var foo2 = 2;
          var foo3 = 3;
          var foo4 = 4;
          var foo5 = 5;
          var foo6 = 6;
          var foo7 = 7;
          var foo8 = 8;
          var foo9 = 9;
          var foo10 = 10;
        
          var foo11 = 11; // Too many.
        }
        
        let foo = () => {
          var foo1 = 1;
          var foo2 = 2;
          var foo3 = 3;
          var foo4 = 4;
          var foo5 = 5;
          var foo6 = 6;
          var foo7 = 7;
          var foo8 = 8;
          var foo9 = 9;
          var foo10 = 10;
        
          var foo11 = 11; // Too many.
        };

        Examples of correct code for this rule with the default { "max": 10 } option:

        /*eslint max-statements: ["error", 10]*/
        /*eslint-env es6*/
        
        function foo() {
          var foo1 = 1;
          var foo2 = 2;
          var foo3 = 3;
          var foo4 = 4;
          var foo5 = 5;
          var foo6 = 6;
          var foo7 = 7;
          var foo8 = 8;
          var foo9 = 9;
          var foo10 = 10;
          return function () {
        
            // The number of statements in the inner function does not count toward the
            // statement maximum.
        
            return 42;
          };
        }
        
        let foo = () => {
          var foo1 = 1;
          var foo2 = 2;
          var foo3 = 3;
          var foo4 = 4;
          var foo5 = 5;
          var foo6 = 6;
          var foo7 = 7;
          var foo8 = 8;
          var foo9 = 9;
          var foo10 = 10;
          return function () {
        
            // The number of statements in the inner function does not count toward the
            // statement maximum.
        
            return 42;
          };
        }

        ignoreTopLevelFunctions

        Examples of additional correct code for this rule with the { "max": 10 }, { "ignoreTopLevelFunctions": true } options:

        /*eslint max-statements: ["error", 10, { "ignoreTopLevelFunctions": true }]*/
        
        function foo() {
          var foo1 = 1;
          var foo2 = 2;
          var foo3 = 3;
          var foo4 = 4;
          var foo5 = 5;
          var foo6 = 6;
          var foo7 = 7;
          var foo8 = 8;
          var foo9 = 9;
          var foo10 = 10;
          var foo11 = 11;
        }

        Related Rules

        • [complexity](complexity.md)
        • [max-depth](max-depth.md)
        • [max-len](max-len.md)
        • [max-nested-callbacks](max-nested-callbacks.md)
        • [max-params](max-params.md) Source: http://eslint.org/docs/rules/

        File hex_panel.js has 352 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // HEXDUMP PANEL
        var HexPanel = function() {
            this.block = 1024;
            this.base = 'entry0';
            this.first = 0;
        Severity: Minor
        Found in www/p/lib/js/panels/hex_panel.js - About 4 hrs to fix

          Function configureWorker_ has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
          Open

              configureWorker_() {
                  var _this = this;
                  this.providerWorker.onmessage = function(e) {
                      if (e.data.dir === NavigatorDirection.CURRENT) {
                          if (typeof _this.curChunk.data.callback !== 'undefined') {
          Severity: Minor
          Found in www/m/js/core/BlockNavigator.js - About 4 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 handleKeyPress has 109 lines of code (exceeds 25 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);
          
          
          Severity: Major
          Found in www/enyo/js/disassembler.js - About 4 hrs to fix
            Severity
            Category
            Status
            Source
            Language