radare/radare2-webui

View on GitHub
www/m/js/modules/disasm/DisassemblyNavigator.js

Summary

Maintainability
C
1 day
Test Coverage

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
Severity: Minor
Found in www/m/js/modules/disasm/DisassemblyNavigator.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 populateFrom has 42 lines of code (exceeds 25 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
Severity: Minor
Found in www/m/js/modules/disasm/DisassemblyNavigator.js - About 1 hr to fix

    Function get has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        get(offset, size, callback) {
            // TODO: retrieve data (async) and call
            var item;
            for (var i = 0 ; i < this.items.length ; i++) {
                if (this.items[i].offset === offset &&
    Severity: Minor
    Found in www/m/js/modules/disasm/DisassemblyNavigator.js - About 1 hr to fix

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

          configureWorker_() {
              var _this = this;
              this.providerWorker.onmessage = function(e) {
                  var item;
                  for (var i = 0 ; i < _this.items.length ; i++) {
      Severity: Minor
      Found in www/m/js/modules/disasm/DisassemblyNavigator.js - About 1 hr 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 get has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

          get(offset, size, callback) {
              // TODO: retrieve data (async) and call
              var item;
              for (var i = 0 ; i < this.items.length ; i++) {
                  if (this.items[i].offset === offset &&
      Severity: Minor
      Found in www/m/js/modules/disasm/DisassemblyNavigator.js - About 1 hr 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

      Missing JSDoc comment.
      Open

          get(offset, size, callback) {

      require JSDoc comments (require-jsdoc)

      JSDoc is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

      /**
       * Adds two numbers together.
       * @param {int} num1 The first number.
       * @param {int} num2 The second number.
       * @returns {int} The sum of the two numbers.
       */
      function sum(num1, num2) {
          return num1 + num2;
      }

      Some style guides require JSDoc comments for all functions as a way of explaining function behavior.

      Rule Details

      This rule requires JSDoc comments for specified nodes. Supported nodes:

      • "FunctionDeclaration"
      • "ClassDeclaration"
      • "MethodDefinition"
      • "ArrowFunctionExpression"

      Options

      This rule has a single object option:

      • "require" requires JSDoc comments for the specified nodes

      Default option settings are:

      {
          "require-jsdoc": ["error", {
              "require": {
                  "FunctionDeclaration": true,
                  "MethodDefinition": false,
                  "ClassDeclaration": false,
                  "ArrowFunctionExpression": false
              }
          }]
      }

      require

      Examples of incorrect code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      function foo() {
          return 10;
      }
      
      var foo = () => {
          return 10;
      }
      
      class Test{
          getDate(){}
      }

      Examples of correct code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      /**
       * It returns 10
       */
      function foo() {
          return 10;
      }
      
      /**
       * It returns test + 10
       * @params {int} test - some number
       * @returns {int} sum of test and 10
       */
      var foo = (test) => {
          return test + 10;
      }
      
      /**
       * It returns 10
       */
      var foo = () => {
          return 10;
      }
      
      /**
       * It returns 10
       */
      var foo = function() {
          return 10;
      }
      
      var array = [1,2,3];
      array.filter(function(item) {
          return item > 2;
      });
      
      /**
       * It returns 10
       */
      class Test{
          /**
          * returns the date
          */
          getDate(){}
      }
      
      setTimeout(() => {}, 10); // since it's an anonymous arrow function

      When Not To Use It

      If you do not require JSDoc for your functions, then you can leave this rule off.

      Related Rules

      Missing JSDoc comment.
      Open

          crunchingData(onReadyCallback) {

      require JSDoc comments (require-jsdoc)

      JSDoc is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

      /**
       * Adds two numbers together.
       * @param {int} num1 The first number.
       * @param {int} num2 The second number.
       * @returns {int} The sum of the two numbers.
       */
      function sum(num1, num2) {
          return num1 + num2;
      }

      Some style guides require JSDoc comments for all functions as a way of explaining function behavior.

      Rule Details

      This rule requires JSDoc comments for specified nodes. Supported nodes:

      • "FunctionDeclaration"
      • "ClassDeclaration"
      • "MethodDefinition"
      • "ArrowFunctionExpression"

      Options

      This rule has a single object option:

      • "require" requires JSDoc comments for the specified nodes

      Default option settings are:

      {
          "require-jsdoc": ["error", {
              "require": {
                  "FunctionDeclaration": true,
                  "MethodDefinition": false,
                  "ClassDeclaration": false,
                  "ArrowFunctionExpression": false
              }
          }]
      }

      require

      Examples of incorrect code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      function foo() {
          return 10;
      }
      
      var foo = () => {
          return 10;
      }
      
      class Test{
          getDate(){}
      }

      Examples of correct code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      /**
       * It returns 10
       */
      function foo() {
          return 10;
      }
      
      /**
       * It returns test + 10
       * @params {int} test - some number
       * @returns {int} sum of test and 10
       */
      var foo = (test) => {
          return test + 10;
      }
      
      /**
       * It returns 10
       */
      var foo = () => {
          return 10;
      }
      
      /**
       * It returns 10
       */
      var foo = function() {
          return 10;
      }
      
      var array = [1,2,3];
      array.filter(function(item) {
          return item > 2;
      });
      
      /**
       * It returns 10
       */
      class Test{
          /**
          * returns the date
          */
          getDate(){}
      }
      
      setTimeout(() => {}, 10); // since it's an anonymous arrow function

      When Not To Use It

      If you do not require JSDoc for your functions, then you can leave this rule off.

      Related Rules

      Missing JSDoc comment.
      Open

      function line2offset(line) {

      require JSDoc comments (require-jsdoc)

      JSDoc is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

      /**
       * Adds two numbers together.
       * @param {int} num1 The first number.
       * @param {int} num2 The second number.
       * @returns {int} The sum of the two numbers.
       */
      function sum(num1, num2) {
          return num1 + num2;
      }

      Some style guides require JSDoc comments for all functions as a way of explaining function behavior.

      Rule Details

      This rule requires JSDoc comments for specified nodes. Supported nodes:

      • "FunctionDeclaration"
      • "ClassDeclaration"
      • "MethodDefinition"
      • "ArrowFunctionExpression"

      Options

      This rule has a single object option:

      • "require" requires JSDoc comments for the specified nodes

      Default option settings are:

      {
          "require-jsdoc": ["error", {
              "require": {
                  "FunctionDeclaration": true,
                  "MethodDefinition": false,
                  "ClassDeclaration": false,
                  "ArrowFunctionExpression": false
              }
          }]
      }

      require

      Examples of incorrect code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      function foo() {
          return 10;
      }
      
      var foo = () => {
          return 10;
      }
      
      class Test{
          getDate(){}
      }

      Examples of correct code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      /**
       * It returns 10
       */
      function foo() {
          return 10;
      }
      
      /**
       * It returns test + 10
       * @params {int} test - some number
       * @returns {int} sum of test and 10
       */
      var foo = (test) => {
          return test + 10;
      }
      
      /**
       * It returns 10
       */
      var foo = () => {
          return 10;
      }
      
      /**
       * It returns 10
       */
      var foo = function() {
          return 10;
      }
      
      var array = [1,2,3];
      array.filter(function(item) {
          return item > 2;
      });
      
      /**
       * It returns 10
       */
      class Test{
          /**
          * returns the date
          */
          getDate(){}
      }
      
      setTimeout(() => {}, 10); // since it's an anonymous arrow function

      When Not To Use It

      If you do not require JSDoc for your functions, then you can leave this rule off.

      Related Rules

      Missing JSDoc comment.
      Open

          configureWorker_() {

      require JSDoc comments (require-jsdoc)

      JSDoc is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

      /**
       * Adds two numbers together.
       * @param {int} num1 The first number.
       * @param {int} num2 The second number.
       * @returns {int} The sum of the two numbers.
       */
      function sum(num1, num2) {
          return num1 + num2;
      }

      Some style guides require JSDoc comments for all functions as a way of explaining function behavior.

      Rule Details

      This rule requires JSDoc comments for specified nodes. Supported nodes:

      • "FunctionDeclaration"
      • "ClassDeclaration"
      • "MethodDefinition"
      • "ArrowFunctionExpression"

      Options

      This rule has a single object option:

      • "require" requires JSDoc comments for the specified nodes

      Default option settings are:

      {
          "require-jsdoc": ["error", {
              "require": {
                  "FunctionDeclaration": true,
                  "MethodDefinition": false,
                  "ClassDeclaration": false,
                  "ArrowFunctionExpression": false
              }
          }]
      }

      require

      Examples of incorrect code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      function foo() {
          return 10;
      }
      
      var foo = () => {
          return 10;
      }
      
      class Test{
          getDate(){}
      }

      Examples of correct code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      /**
       * It returns 10
       */
      function foo() {
          return 10;
      }
      
      /**
       * It returns test + 10
       * @params {int} test - some number
       * @returns {int} sum of test and 10
       */
      var foo = (test) => {
          return test + 10;
      }
      
      /**
       * It returns 10
       */
      var foo = () => {
          return 10;
      }
      
      /**
       * It returns 10
       */
      var foo = function() {
          return 10;
      }
      
      var array = [1,2,3];
      array.filter(function(item) {
          return item > 2;
      });
      
      /**
       * It returns 10
       */
      class Test{
          /**
          * returns the date
          */
          getDate(){}
      }
      
      setTimeout(() => {}, 10); // since it's an anonymous arrow function

      When Not To Use It

      If you do not require JSDoc for your functions, then you can leave this rule off.

      Related Rules

      Missing JSDoc comment.
      Open

          getSeekOffset() {

      require JSDoc comments (require-jsdoc)

      JSDoc is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

      /**
       * Adds two numbers together.
       * @param {int} num1 The first number.
       * @param {int} num2 The second number.
       * @returns {int} The sum of the two numbers.
       */
      function sum(num1, num2) {
          return num1 + num2;
      }

      Some style guides require JSDoc comments for all functions as a way of explaining function behavior.

      Rule Details

      This rule requires JSDoc comments for specified nodes. Supported nodes:

      • "FunctionDeclaration"
      • "ClassDeclaration"
      • "MethodDefinition"
      • "ArrowFunctionExpression"

      Options

      This rule has a single object option:

      • "require" requires JSDoc comments for the specified nodes

      Default option settings are:

      {
          "require-jsdoc": ["error", {
              "require": {
                  "FunctionDeclaration": true,
                  "MethodDefinition": false,
                  "ClassDeclaration": false,
                  "ArrowFunctionExpression": false
              }
          }]
      }

      require

      Examples of incorrect code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      function foo() {
          return 10;
      }
      
      var foo = () => {
          return 10;
      }
      
      class Test{
          getDate(){}
      }

      Examples of correct code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      /**
       * It returns 10
       */
      function foo() {
          return 10;
      }
      
      /**
       * It returns test + 10
       * @params {int} test - some number
       * @returns {int} sum of test and 10
       */
      var foo = (test) => {
          return test + 10;
      }
      
      /**
       * It returns 10
       */
      var foo = () => {
          return 10;
      }
      
      /**
       * It returns 10
       */
      var foo = function() {
          return 10;
      }
      
      var array = [1,2,3];
      array.filter(function(item) {
          return item > 2;
      });
      
      /**
       * It returns 10
       */
      class Test{
          /**
          * returns the date
          */
          getDate(){}
      }
      
      setTimeout(() => {}, 10); // since it's an anonymous arrow function

      When Not To Use It

      If you do not require JSDoc for your functions, then you can leave this rule off.

      Related Rules

      Missing JSDoc comment.
      Open

          getChunkPositionFor(offset) {

      require JSDoc comments (require-jsdoc)

      JSDoc is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

      /**
       * Adds two numbers together.
       * @param {int} num1 The first number.
       * @param {int} num2 The second number.
       * @returns {int} The sum of the two numbers.
       */
      function sum(num1, num2) {
          return num1 + num2;
      }

      Some style guides require JSDoc comments for all functions as a way of explaining function behavior.

      Rule Details

      This rule requires JSDoc comments for specified nodes. Supported nodes:

      • "FunctionDeclaration"
      • "ClassDeclaration"
      • "MethodDefinition"
      • "ArrowFunctionExpression"

      Options

      This rule has a single object option:

      • "require" requires JSDoc comments for the specified nodes

      Default option settings are:

      {
          "require-jsdoc": ["error", {
              "require": {
                  "FunctionDeclaration": true,
                  "MethodDefinition": false,
                  "ClassDeclaration": false,
                  "ArrowFunctionExpression": false
              }
          }]
      }

      require

      Examples of incorrect code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      function foo() {
          return 10;
      }
      
      var foo = () => {
          return 10;
      }
      
      class Test{
          getDate(){}
      }

      Examples of correct code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      /**
       * It returns 10
       */
      function foo() {
          return 10;
      }
      
      /**
       * It returns test + 10
       * @params {int} test - some number
       * @returns {int} sum of test and 10
       */
      var foo = (test) => {
          return test + 10;
      }
      
      /**
       * It returns 10
       */
      var foo = () => {
          return 10;
      }
      
      /**
       * It returns 10
       */
      var foo = function() {
          return 10;
      }
      
      var array = [1,2,3];
      array.filter(function(item) {
          return item > 2;
      });
      
      /**
       * It returns 10
       */
      class Test{
          /**
          * returns the date
          */
          getDate(){}
      }
      
      setTimeout(() => {}, 10); // since it's an anonymous arrow function

      When Not To Use It

      If you do not require JSDoc for your functions, then you can leave this rule off.

      Related Rules

      Missing JSDoc comment.
      Open

          populateFrom(offset) {

      require JSDoc comments (require-jsdoc)

      JSDoc is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

      /**
       * Adds two numbers together.
       * @param {int} num1 The first number.
       * @param {int} num2 The second number.
       * @returns {int} The sum of the two numbers.
       */
      function sum(num1, num2) {
          return num1 + num2;
      }

      Some style guides require JSDoc comments for all functions as a way of explaining function behavior.

      Rule Details

      This rule requires JSDoc comments for specified nodes. Supported nodes:

      • "FunctionDeclaration"
      • "ClassDeclaration"
      • "MethodDefinition"
      • "ArrowFunctionExpression"

      Options

      This rule has a single object option:

      • "require" requires JSDoc comments for the specified nodes

      Default option settings are:

      {
          "require-jsdoc": ["error", {
              "require": {
                  "FunctionDeclaration": true,
                  "MethodDefinition": false,
                  "ClassDeclaration": false,
                  "ArrowFunctionExpression": false
              }
          }]
      }

      require

      Examples of incorrect code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      function foo() {
          return 10;
      }
      
      var foo = () => {
          return 10;
      }
      
      class Test{
          getDate(){}
      }

      Examples of correct code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      /**
       * It returns 10
       */
      function foo() {
          return 10;
      }
      
      /**
       * It returns test + 10
       * @params {int} test - some number
       * @returns {int} sum of test and 10
       */
      var foo = (test) => {
          return test + 10;
      }
      
      /**
       * It returns 10
       */
      var foo = () => {
          return 10;
      }
      
      /**
       * It returns 10
       */
      var foo = function() {
          return 10;
      }
      
      var array = [1,2,3];
      array.filter(function(item) {
          return item > 2;
      });
      
      /**
       * It returns 10
       */
      class Test{
          /**
          * returns the date
          */
          getDate(){}
      }
      
      setTimeout(() => {}, 10); // since it's an anonymous arrow function

      When Not To Use It

      If you do not require JSDoc for your functions, then you can leave this rule off.

      Related Rules

      Missing JSDoc comment.
      Open

      export class DisassemblyNavigator extends BlockNavigator {

      require JSDoc comments (require-jsdoc)

      JSDoc is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

      /**
       * Adds two numbers together.
       * @param {int} num1 The first number.
       * @param {int} num2 The second number.
       * @returns {int} The sum of the two numbers.
       */
      function sum(num1, num2) {
          return num1 + num2;
      }

      Some style guides require JSDoc comments for all functions as a way of explaining function behavior.

      Rule Details

      This rule requires JSDoc comments for specified nodes. Supported nodes:

      • "FunctionDeclaration"
      • "ClassDeclaration"
      • "MethodDefinition"
      • "ArrowFunctionExpression"

      Options

      This rule has a single object option:

      • "require" requires JSDoc comments for the specified nodes

      Default option settings are:

      {
          "require-jsdoc": ["error", {
              "require": {
                  "FunctionDeclaration": true,
                  "MethodDefinition": false,
                  "ClassDeclaration": false,
                  "ArrowFunctionExpression": false
              }
          }]
      }

      require

      Examples of incorrect code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      function foo() {
          return 10;
      }
      
      var foo = () => {
          return 10;
      }
      
      class Test{
          getDate(){}
      }

      Examples of correct code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      /**
       * It returns 10
       */
      function foo() {
          return 10;
      }
      
      /**
       * It returns test + 10
       * @params {int} test - some number
       * @returns {int} sum of test and 10
       */
      var foo = (test) => {
          return test + 10;
      }
      
      /**
       * It returns 10
       */
      var foo = () => {
          return 10;
      }
      
      /**
       * It returns 10
       */
      var foo = function() {
          return 10;
      }
      
      var array = [1,2,3];
      array.filter(function(item) {
          return item > 2;
      });
      
      /**
       * It returns 10
       */
      class Test{
          /**
          * returns the date
          */
          getDate(){}
      }
      
      setTimeout(() => {}, 10); // since it's an anonymous arrow function

      When Not To Use It

      If you do not require JSDoc for your functions, then you can leave this rule off.

      Related Rules

      Missing JSDoc comment.
      Open

          populateFirst() {

      require JSDoc comments (require-jsdoc)

      JSDoc is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

      /**
       * Adds two numbers together.
       * @param {int} num1 The first number.
       * @param {int} num2 The second number.
       * @returns {int} The sum of the two numbers.
       */
      function sum(num1, num2) {
          return num1 + num2;
      }

      Some style guides require JSDoc comments for all functions as a way of explaining function behavior.

      Rule Details

      This rule requires JSDoc comments for specified nodes. Supported nodes:

      • "FunctionDeclaration"
      • "ClassDeclaration"
      • "MethodDefinition"
      • "ArrowFunctionExpression"

      Options

      This rule has a single object option:

      • "require" requires JSDoc comments for the specified nodes

      Default option settings are:

      {
          "require-jsdoc": ["error", {
              "require": {
                  "FunctionDeclaration": true,
                  "MethodDefinition": false,
                  "ClassDeclaration": false,
                  "ArrowFunctionExpression": false
              }
          }]
      }

      require

      Examples of incorrect code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      function foo() {
          return 10;
      }
      
      var foo = () => {
          return 10;
      }
      
      class Test{
          getDate(){}
      }

      Examples of correct code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      /**
       * It returns 10
       */
      function foo() {
          return 10;
      }
      
      /**
       * It returns test + 10
       * @params {int} test - some number
       * @returns {int} sum of test and 10
       */
      var foo = (test) => {
          return test + 10;
      }
      
      /**
       * It returns 10
       */
      var foo = () => {
          return 10;
      }
      
      /**
       * It returns 10
       */
      var foo = function() {
          return 10;
      }
      
      var array = [1,2,3];
      array.filter(function(item) {
          return item > 2;
      });
      
      /**
       * It returns 10
       */
      class Test{
          /**
          * returns the date
          */
          getDate(){}
      }
      
      setTimeout(() => {}, 10); // since it's an anonymous arrow function

      When Not To Use It

      If you do not require JSDoc for your functions, then you can leave this rule off.

      Related Rules

      Missing JSDoc comment.
      Open

          init() {

      require JSDoc comments (require-jsdoc)

      JSDoc is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

      /**
       * Adds two numbers together.
       * @param {int} num1 The first number.
       * @param {int} num2 The second number.
       * @returns {int} The sum of the two numbers.
       */
      function sum(num1, num2) {
          return num1 + num2;
      }

      Some style guides require JSDoc comments for all functions as a way of explaining function behavior.

      Rule Details

      This rule requires JSDoc comments for specified nodes. Supported nodes:

      • "FunctionDeclaration"
      • "ClassDeclaration"
      • "MethodDefinition"
      • "ArrowFunctionExpression"

      Options

      This rule has a single object option:

      • "require" requires JSDoc comments for the specified nodes

      Default option settings are:

      {
          "require-jsdoc": ["error", {
              "require": {
                  "FunctionDeclaration": true,
                  "MethodDefinition": false,
                  "ClassDeclaration": false,
                  "ArrowFunctionExpression": false
              }
          }]
      }

      require

      Examples of incorrect code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      function foo() {
          return 10;
      }
      
      var foo = () => {
          return 10;
      }
      
      class Test{
          getDate(){}
      }

      Examples of correct code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      /**
       * It returns 10
       */
      function foo() {
          return 10;
      }
      
      /**
       * It returns test + 10
       * @params {int} test - some number
       * @returns {int} sum of test and 10
       */
      var foo = (test) => {
          return test + 10;
      }
      
      /**
       * It returns 10
       */
      var foo = () => {
          return 10;
      }
      
      /**
       * It returns 10
       */
      var foo = function() {
          return 10;
      }
      
      var array = [1,2,3];
      array.filter(function(item) {
          return item > 2;
      });
      
      /**
       * It returns 10
       */
      class Test{
          /**
          * returns the date
          */
          getDate(){}
      }
      
      setTimeout(() => {}, 10); // since it's an anonymous arrow function

      When Not To Use It

      If you do not require JSDoc for your functions, then you can leave this rule off.

      Related Rules

      Missing JSDoc comment.
      Open

          getOverlappingIntervals(start, end) {

      require JSDoc comments (require-jsdoc)

      JSDoc is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

      /**
       * Adds two numbers together.
       * @param {int} num1 The first number.
       * @param {int} num2 The second number.
       * @returns {int} The sum of the two numbers.
       */
      function sum(num1, num2) {
          return num1 + num2;
      }

      Some style guides require JSDoc comments for all functions as a way of explaining function behavior.

      Rule Details

      This rule requires JSDoc comments for specified nodes. Supported nodes:

      • "FunctionDeclaration"
      • "ClassDeclaration"
      • "MethodDefinition"
      • "ArrowFunctionExpression"

      Options

      This rule has a single object option:

      • "require" requires JSDoc comments for the specified nodes

      Default option settings are:

      {
          "require-jsdoc": ["error", {
              "require": {
                  "FunctionDeclaration": true,
                  "MethodDefinition": false,
                  "ClassDeclaration": false,
                  "ArrowFunctionExpression": false
              }
          }]
      }

      require

      Examples of incorrect code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      function foo() {
          return 10;
      }
      
      var foo = () => {
          return 10;
      }
      
      class Test{
          getDate(){}
      }

      Examples of correct code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      /**
       * It returns 10
       */
      function foo() {
          return 10;
      }
      
      /**
       * It returns test + 10
       * @params {int} test - some number
       * @returns {int} sum of test and 10
       */
      var foo = (test) => {
          return test + 10;
      }
      
      /**
       * It returns 10
       */
      var foo = () => {
          return 10;
      }
      
      /**
       * It returns 10
       */
      var foo = function() {
          return 10;
      }
      
      var array = [1,2,3];
      array.filter(function(item) {
          return item > 2;
      });
      
      /**
       * It returns 10
       */
      class Test{
          /**
          * returns the date
          */
          getDate(){}
      }
      
      setTimeout(() => {}, 10); // since it's an anonymous arrow function

      When Not To Use It

      If you do not require JSDoc for your functions, then you can leave this rule off.

      Related Rules

      Missing JSDoc comment.
      Open

          getSize(offset) {

      require JSDoc comments (require-jsdoc)

      JSDoc is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

      /**
       * Adds two numbers together.
       * @param {int} num1 The first number.
       * @param {int} num2 The second number.
       * @returns {int} The sum of the two numbers.
       */
      function sum(num1, num2) {
          return num1 + num2;
      }

      Some style guides require JSDoc comments for all functions as a way of explaining function behavior.

      Rule Details

      This rule requires JSDoc comments for specified nodes. Supported nodes:

      • "FunctionDeclaration"
      • "ClassDeclaration"
      • "MethodDefinition"
      • "ArrowFunctionExpression"

      Options

      This rule has a single object option:

      • "require" requires JSDoc comments for the specified nodes

      Default option settings are:

      {
          "require-jsdoc": ["error", {
              "require": {
                  "FunctionDeclaration": true,
                  "MethodDefinition": false,
                  "ClassDeclaration": false,
                  "ArrowFunctionExpression": false
              }
          }]
      }

      require

      Examples of incorrect code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      function foo() {
          return 10;
      }
      
      var foo = () => {
          return 10;
      }
      
      class Test{
          getDate(){}
      }

      Examples of correct code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      /**
       * It returns 10
       */
      function foo() {
          return 10;
      }
      
      /**
       * It returns test + 10
       * @params {int} test - some number
       * @returns {int} sum of test and 10
       */
      var foo = (test) => {
          return test + 10;
      }
      
      /**
       * It returns 10
       */
      var foo = () => {
          return 10;
      }
      
      /**
       * It returns 10
       */
      var foo = function() {
          return 10;
      }
      
      var array = [1,2,3];
      array.filter(function(item) {
          return item > 2;
      });
      
      /**
       * It returns 10
       */
      class Test{
          /**
          * returns the date
          */
          getDate(){}
      }
      
      setTimeout(() => {}, 10); // since it's an anonymous arrow function

      When Not To Use It

      If you do not require JSDoc for your functions, then you can leave this rule off.

      Related Rules

      Missing JSDoc comment.
      Open

          cleanOldData() {

      require JSDoc comments (require-jsdoc)

      JSDoc is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

      /**
       * Adds two numbers together.
       * @param {int} num1 The first number.
       * @param {int} num2 The second number.
       * @returns {int} The sum of the two numbers.
       */
      function sum(num1, num2) {
          return num1 + num2;
      }

      Some style guides require JSDoc comments for all functions as a way of explaining function behavior.

      Rule Details

      This rule requires JSDoc comments for specified nodes. Supported nodes:

      • "FunctionDeclaration"
      • "ClassDeclaration"
      • "MethodDefinition"
      • "ArrowFunctionExpression"

      Options

      This rule has a single object option:

      • "require" requires JSDoc comments for the specified nodes

      Default option settings are:

      {
          "require-jsdoc": ["error", {
              "require": {
                  "FunctionDeclaration": true,
                  "MethodDefinition": false,
                  "ClassDeclaration": false,
                  "ArrowFunctionExpression": false
              }
          }]
      }

      require

      Examples of incorrect code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      function foo() {
          return 10;
      }
      
      var foo = () => {
          return 10;
      }
      
      class Test{
          getDate(){}
      }

      Examples of correct code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      /**
       * It returns 10
       */
      function foo() {
          return 10;
      }
      
      /**
       * It returns test + 10
       * @params {int} test - some number
       * @returns {int} sum of test and 10
       */
      var foo = (test) => {
          return test + 10;
      }
      
      /**
       * It returns 10
       */
      var foo = () => {
          return 10;
      }
      
      /**
       * It returns 10
       */
      var foo = function() {
          return 10;
      }
      
      var array = [1,2,3];
      array.filter(function(item) {
          return item > 2;
      });
      
      /**
       * It returns 10
       */
      class Test{
          /**
          * returns the date
          */
          getDate(){}
      }
      
      setTimeout(() => {}, 10); // since it's an anonymous arrow function

      When Not To Use It

      If you do not require JSDoc for your functions, then you can leave this rule off.

      Related Rules

      Missing JSDoc comment.
      Open

          go(dir) {

      require JSDoc comments (require-jsdoc)

      JSDoc is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

      /**
       * Adds two numbers together.
       * @param {int} num1 The first number.
       * @param {int} num2 The second number.
       * @returns {int} The sum of the two numbers.
       */
      function sum(num1, num2) {
          return num1 + num2;
      }

      Some style guides require JSDoc comments for all functions as a way of explaining function behavior.

      Rule Details

      This rule requires JSDoc comments for specified nodes. Supported nodes:

      • "FunctionDeclaration"
      • "ClassDeclaration"
      • "MethodDefinition"
      • "ArrowFunctionExpression"

      Options

      This rule has a single object option:

      • "require" requires JSDoc comments for the specified nodes

      Default option settings are:

      {
          "require-jsdoc": ["error", {
              "require": {
                  "FunctionDeclaration": true,
                  "MethodDefinition": false,
                  "ClassDeclaration": false,
                  "ArrowFunctionExpression": false
              }
          }]
      }

      require

      Examples of incorrect code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      function foo() {
          return 10;
      }
      
      var foo = () => {
          return 10;
      }
      
      class Test{
          getDate(){}
      }

      Examples of correct code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      /**
       * It returns 10
       */
      function foo() {
          return 10;
      }
      
      /**
       * It returns test + 10
       * @params {int} test - some number
       * @returns {int} sum of test and 10
       */
      var foo = (test) => {
          return test + 10;
      }
      
      /**
       * It returns 10
       */
      var foo = () => {
          return 10;
      }
      
      /**
       * It returns 10
       */
      var foo = function() {
          return 10;
      }
      
      var array = [1,2,3];
      array.filter(function(item) {
          return item > 2;
      });
      
      /**
       * It returns 10
       */
      class Test{
          /**
          * returns the date
          */
          getDate(){}
      }
      
      setTimeout(() => {}, 10); // since it's an anonymous arrow function

      When Not To Use It

      If you do not require JSDoc for your functions, then you can leave this rule off.

      Related Rules

      Missing JSDoc comment.
      Open

          refreshCurrentOffset() {

      require JSDoc comments (require-jsdoc)

      JSDoc is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

      /**
       * Adds two numbers together.
       * @param {int} num1 The first number.
       * @param {int} num2 The second number.
       * @returns {int} The sum of the two numbers.
       */
      function sum(num1, num2) {
          return num1 + num2;
      }

      Some style guides require JSDoc comments for all functions as a way of explaining function behavior.

      Rule Details

      This rule requires JSDoc comments for specified nodes. Supported nodes:

      • "FunctionDeclaration"
      • "ClassDeclaration"
      • "MethodDefinition"
      • "ArrowFunctionExpression"

      Options

      This rule has a single object option:

      • "require" requires JSDoc comments for the specified nodes

      Default option settings are:

      {
          "require-jsdoc": ["error", {
              "require": {
                  "FunctionDeclaration": true,
                  "MethodDefinition": false,
                  "ClassDeclaration": false,
                  "ArrowFunctionExpression": false
              }
          }]
      }

      require

      Examples of incorrect code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      function foo() {
          return 10;
      }
      
      var foo = () => {
          return 10;
      }
      
      class Test{
          getDate(){}
      }

      Examples of correct code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      /**
       * It returns 10
       */
      function foo() {
          return 10;
      }
      
      /**
       * It returns test + 10
       * @params {int} test - some number
       * @returns {int} sum of test and 10
       */
      var foo = (test) => {
          return test + 10;
      }
      
      /**
       * It returns 10
       */
      var foo = () => {
          return 10;
      }
      
      /**
       * It returns 10
       */
      var foo = function() {
          return 10;
      }
      
      var array = [1,2,3];
      array.filter(function(item) {
          return item > 2;
      });
      
      /**
       * It returns 10
       */
      class Test{
          /**
          * returns the date
          */
          getDate(){}
      }
      
      setTimeout(() => {}, 10); // since it's an anonymous arrow function

      When Not To Use It

      If you do not require JSDoc for your functions, then you can leave this rule off.

      Related Rules

      Missing JSDoc comment.
      Open

          constructor(howManyLines, startOffset) {

      require JSDoc comments (require-jsdoc)

      JSDoc is a JavaScript API documentation generator. It uses specially-formatted comments inside of code to generate API documentation automatically. For example, this is what a JSDoc comment looks like for a function:

      /**
       * Adds two numbers together.
       * @param {int} num1 The first number.
       * @param {int} num2 The second number.
       * @returns {int} The sum of the two numbers.
       */
      function sum(num1, num2) {
          return num1 + num2;
      }

      Some style guides require JSDoc comments for all functions as a way of explaining function behavior.

      Rule Details

      This rule requires JSDoc comments for specified nodes. Supported nodes:

      • "FunctionDeclaration"
      • "ClassDeclaration"
      • "MethodDefinition"
      • "ArrowFunctionExpression"

      Options

      This rule has a single object option:

      • "require" requires JSDoc comments for the specified nodes

      Default option settings are:

      {
          "require-jsdoc": ["error", {
              "require": {
                  "FunctionDeclaration": true,
                  "MethodDefinition": false,
                  "ClassDeclaration": false,
                  "ArrowFunctionExpression": false
              }
          }]
      }

      require

      Examples of incorrect code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      function foo() {
          return 10;
      }
      
      var foo = () => {
          return 10;
      }
      
      class Test{
          getDate(){}
      }

      Examples of correct code for this rule with the { "require": { "FunctionDeclaration": true, "MethodDefinition": true, "ClassDeclaration": true, "ArrowFunctionExpression": true } } option:

      /*eslint "require-jsdoc": ["error", {
          "require": {
              "FunctionDeclaration": true,
              "MethodDefinition": true,
              "ClassDeclaration": true
          }
      }]*/
      
      /**
       * It returns 10
       */
      function foo() {
          return 10;
      }
      
      /**
       * It returns test + 10
       * @params {int} test - some number
       * @returns {int} sum of test and 10
       */
      var foo = (test) => {
          return test + 10;
      }
      
      /**
       * It returns 10
       */
      var foo = () => {
          return 10;
      }
      
      /**
       * It returns 10
       */
      var foo = function() {
          return 10;
      }
      
      var array = [1,2,3];
      array.filter(function(item) {
          return item > 2;
      });
      
      /**
       * It returns 10
       */
      class Test{
          /**
          * returns the date
          */
          getDate(){}
      }
      
      setTimeout(() => {}, 10); // since it's an anonymous arrow function

      When Not To Use It

      If you do not require JSDoc for your functions, then you can leave this rule off.

      Related Rules

      TODO found
      Open

              // TODO: retrieve data (async) and call

      TODO found
      Open

              TODO: check if existing (data field), if not, ask provider

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

              for (var i = 0 ; i < this.currentlyShown.length ; i++) {
                  if (this.currentlyShown[i].offset === offset) {
                      return this.currentlyShown[i].size;
                  }
              }
      Severity: Major
      Found in www/m/js/modules/disasm/DisassemblyNavigator.js and 2 other locations - About 1 hr to fix
      www/m/js/modules/hexdump/HexPairNavigator.js on lines 57..61
      www/m/js/modules/hexdump/Hexdump.js on lines 1150..1154

      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 69.

      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

      There are no issues that match your filters.

      Category
      Status