arrowjs/ArrowjsCore

View on GitHub
libs/ArrowApplication.js

Summary

Maintainability
F
1 wk
Test Coverage

File ArrowApplication.js has 758 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

/**
 * Module dependencies.
 */
Severity: Major
Found in libs/ArrowApplication.js - About 1 day to fix

    Function start has 168 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        start(setting) {
            let self = this;
    
            self.arrowSettings = setting;
            let stackBegin;
    Severity: Major
    Found in libs/ArrowApplication.js - About 6 hrs to fix

      Function handleError has 103 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function handleError(app) {
          /** Assume 'not found' in the error msg is a 404.
           * This is somewhat silly, but valid, you can do whatever you like, set properties, use instanceof etc.
           */
          app.use(function (err, req, res, next) {
      Severity: Major
      Found in libs/ArrowApplication.js - About 4 hrs to fix

        Function handleComponentRouteSetting has 81 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function handleComponentRouteSetting(arrow, componentRouteSetting, defaultRouteConfig, key, setting, componentKey) {
            let component = arrow[key][componentKey];
            let componentName = arrow[key][componentKey].name;
            let viewInfo = arrow[key][componentKey].views;
            //Handle Route Path;
        Severity: Major
        Found in libs/ArrowApplication.js - About 3 hrs to fix

          Function arrayMethod has 65 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  let arrayMethod = Object.keys(componentRouteSetting[path_name]).filter(function (method) {
                      if (componentRouteSetting[path_name][method].name) {
                          arrow._arrRoutes[componentRouteSetting[path_name][method].name] = path.normalize(prefix + routePath);
                      }
                      //handle function
          Severity: Major
          Found in libs/ArrowApplication.js - About 2 hrs to fix

            Function constructor has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                constructor(setting) {
                    //if NODE_ENV does not exist, use development by default
                    /* istanbul ignore next */
                    process.env.NODE_ENV = process.env.NODE_ENV || 'development';
            
            
            Severity: Minor
            Found in libs/ArrowApplication.js - About 1 hr to fix

              Function handleRole has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
              Open

              function handleRole(application, permissions, componentName, key) {
                  let arrayPermissions = [];
                  if (_.isArray(permissions)) {
                      arrayPermissions = permissions
                  } else {
              Severity: Minor
              Found in libs/ArrowApplication.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 configRenderLayout has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          .then(function configRenderLayout() {
                              let viewEngineSetting = _.assign(self._config.nunjuckSettings || {}, {express: self._expressApplication});
                              let applicationView = ViewEngine(self.arrFolder, viewEngineSetting, self);
                              self.applicationENV = applicationView;
              
              
              Severity: Minor
              Found in libs/ArrowApplication.js - About 1 hr to fix

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

                function associateModels(arrow) {
                    let defaultDatabase = require('./database').db();
                    if (arrow.models && Object.keys(arrow.models).length > 0) {
                        /* istanbul ignore next */
                        let defaultQueryResolve = function () {
                Severity: Minor
                Found in libs/ArrowApplication.js - About 1 hr to fix

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

                  function handleAuthenticate(application, name) {
                      let passport = application.passport;
                      if (_.isString(name)) {
                          if (application.passportSetting[name]) {
                              let strategy = application.passportSetting[name].strategy || name;
                  Severity: Minor
                  Found in libs/ArrowApplication.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 render has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                  self.render = function (view, options, callback) {
                                      let application = self;
                                      var done = callback;
                  
                                      var opts = options || {};
                  Severity: Minor
                  Found in libs/ArrowApplication.js - About 1 hr to fix

                    Function makeRender has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    function makeRender(req, res, application, componentView, componentName, component) {
                    Severity: Minor
                    Found in libs/ArrowApplication.js - About 45 mins to fix

                      Function handleComponentRouteSetting has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      function handleComponentRouteSetting(arrow, componentRouteSetting, defaultRouteConfig, key, setting, componentKey) {
                      Severity: Minor
                      Found in libs/ArrowApplication.js - About 45 mins to fix

                        Function start has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                            start(setting) {
                                let self = this;
                        
                                self.arrowSettings = setting;
                                let stackBegin;
                        Severity: Minor
                        Found in libs/ArrowApplication.js - About 45 mins 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 overrideViewRender has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        function overrideViewRender(application, componentView, componentName, component, key) {
                        Severity: Minor
                        Found in libs/ArrowApplication.js - About 35 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                                          return 0
                          Severity: Major
                          Found in libs/ArrowApplication.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                                            return 1
                            Severity: Major
                            Found in libs/ArrowApplication.js - About 30 mins to fix

                              Function associateModels has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function associateModels(arrow) {
                                  let defaultDatabase = require('./database').db();
                                  if (arrow.models && Object.keys(arrow.models).length > 0) {
                                      /* istanbul ignore next */
                                      let defaultQueryResolve = function () {
                              Severity: Minor
                              Found in libs/ArrowApplication.js - About 25 mins 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

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

                              function handleView(obj, application, componentName) {
                                  let miniPath = obj.func(application._config, componentName);
                                  let normalizePath;
                                  /* istanbul ignore if */
                                  if (miniPath[0] === path.sep) {
                              Severity: Major
                              Found in libs/ArrowApplication.js and 1 other location - About 4 hrs to fix
                              manager/SystemManager.js on lines 350..360

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

                              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

                                  beforeAuthenticate(func) {
                                      let self = this;
                                      /* istanbul ignore next */
                                      return new Promise(function (fulfill, reject) {
                                          if (typeof func == "function") {
                              Severity: Major
                              Found in libs/ArrowApplication.js and 1 other location - About 3 hrs to fix
                              libs/ArrowApplication.js on lines 153..164

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

                              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

                                  afterAuthenticate(func) {
                                      let self = this;
                                      /* istanbul ignore next */
                                      return new Promise(function (fulfill, reject) {
                                          if (typeof func == "function") {
                              Severity: Major
                              Found in libs/ArrowApplication.js and 1 other location - About 3 hrs to fix
                              libs/ArrowApplication.js on lines 135..146

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

                              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 2 locations. Consider refactoring.
                              Open

                                      if (application._config.viewExtension && view.indexOf(application._config.viewExtension) === -1 && view.indexOf(".") === -1) {
                                          view += "." + application._config.viewExtension;
                                      }
                              Severity: Major
                              Found in libs/ArrowApplication.js and 1 other location - About 2 hrs to fix
                              libs/ArrowApplication.js on lines 277..279

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

                              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 2 locations. Consider refactoring.
                              Open

                                                  if (application._config.viewExtension && view.indexOf(application._config.viewExtension) === -1 && view.indexOf(".") === -1) {
                                                      view += "." + application._config.viewExtension;
                                                  }
                              Severity: Major
                              Found in libs/ArrowApplication.js and 1 other location - About 2 hrs to fix
                              libs/ArrowApplication.js on lines 708..710

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

                              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

                                                  arrayPart = arrayPart.map(function (key) {
                                                      if (key[0] === ":") {
                                                          key = key.replace(":", "");
                                                          return application.getConfig(key);
                                                      } else {
                              Severity: Major
                              Found in libs/ArrowApplication.js and 1 other location - About 1 hr to fix
                              libs/ArrowApplication.js on lines 903..910

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

                              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

                                          arrayPart = arrayPart.map(function (key) {
                                              if (key[0] === ":") {
                                                  key = key.replace(":", "");
                                                  return app.getConfig(key);
                                              } else {
                              Severity: Major
                              Found in libs/ArrowApplication.js and 1 other location - About 1 hr to fix
                              libs/ArrowApplication.js on lines 282..289

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

                              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

                                          if (!_.isEmpty(arrow.beforeAuth)) {
                                              arrow.beforeAuth.map(function (func) {
                                                  arrayHandler.splice(0, 0, func)
                                              })
                                          }
                              Severity: Major
                              Found in libs/ArrowApplication.js and 1 other location - About 1 hr to fix
                              libs/ArrowApplication.js on lines 600..604

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

                              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

                                          if (!_.isEmpty(arrow.afterAuth)) {
                                              arrow.afterAuth.map(function (func) {
                                                  arrayHandler.splice(0, 0, func)
                                              })
                                          }
                              Severity: Major
                              Found in libs/ArrowApplication.js and 1 other location - About 1 hr to fix
                              libs/ArrowApplication.js on lines 614..618

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

                              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 2 locations. Consider refactoring.
                              Open

                                          arrayKey.map(function (name) {
                                              if (self[name]) {
                                                  result = self[name];
                                                  self = result;
                                              } else {
                              Severity: Major
                              Found in libs/ArrowApplication.js and 1 other location - About 1 hr to fix
                              manager/ConfigManager.js on lines 30..37

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

                              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 2 locations. Consider refactoring.
                              Open

                                  fs.readFile(configFile, 'utf8', function (err, data) {
                                      if (err) throw err;
                                      let obj = JSON.parse(data);
                              
                                      app.updateConfig(obj);
                              Severity: Minor
                              Found in libs/ArrowApplication.js and 1 other location - About 55 mins to fix
                              libs/ArrowApplication.js on lines 1042..1047

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

                              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 2 locations. Consider refactoring.
                              Open

                                          fs.readFile(configFile, 'utf8', function (err, data) {
                                              if (err) throw err;
                                              let obj = JSON.parse(data);
                              
                                              app.updateConfig(obj);
                              Severity: Minor
                              Found in libs/ArrowApplication.js and 1 other location - About 55 mins to fix
                              libs/ArrowApplication.js on lines 1034..1039

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

                              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