beevelop/corci-monitor

View on GitHub

Showing 374 of 374 total issues

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

},{}],29:[function(require,module,exports){
(function (global){
/**
 * Module dependencies.
 */
Severity: Major
Found in www/js/bundle.js - About 1 day to fix

    Function 55 has 346 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{}],55:[function(require,module,exports){
    var ioc = require('socket.io/node_modules/socket.io-client');
    require('../../lib/common/utils.js');
    var Msg = require('../../lib/common/Msg.js');
    var ko = require('knockout');
    Severity: Major
    Found in www/js/bundle.js - About 1 day to fix

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

          connect: function(url) {
              this.socket = ioc.connect(url);
              this.socket.heartbeatTimeout = 1000; // reconnect if not received heartbeat for 20 seconds
      
              this.socket.on('connect', this.onConnect.bind(this));
      Severity: Major
      Found in www/js/index.js and 1 other location - About 1 day to fix
      www/js/bundle.js on lines 13044..13060

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

      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

          connect: function(url) {
              this.socket = ioc.connect(url);
              this.socket.heartbeatTimeout = 1000; // reconnect if not received heartbeat for 20 seconds
      
              this.socket.on('connect', this.onConnect.bind(this));
      Severity: Major
      Found in www/js/bundle.js and 1 other location - About 1 day to fix
      www/js/index.js on lines 108..124

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

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

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

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

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

      Refactorings

      Further Reading

      Function 49 has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring.
      Open

      },{"./is-buffer":50,"isarray":52}],49:[function(require,module,exports){
      
      /**
       * Module dependencies.
       */
      Severity: Minor
      Found in www/js/bundle.js - About 1 day 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 48 has a Cognitive Complexity of 81 (exceeds 5 allowed). Consider refactoring.
      Open

      },{}],48:[function(require,module,exports){
      (function (global){
      /*global Blob,File*/
      
      /**
      Severity: Minor
      Found in www/js/bundle.js - About 1 day 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 7 has 297 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{}],7:[function(require,module,exports){
      (function (global){
      ////For performance tests please see: http://jsperf.com/js-inheritance-performance/34 + http://jsperf.com/js-inheritance-performance/35 + http://jsperf.com/js-inheritance-performance/36
      
      (function selfCall() {
      Severity: Major
      Found in www/js/bundle.js - About 1 day to fix

        Function selfCall has 292 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        (function selfCall() {
            var isNode = typeof global != "undefined";
            if (!String.prototype.format) {
                var regexes = {};
                String.prototype.format = function format(parameters) {
        Severity: Major
        Found in www/js/bundle.js - About 1 day to fix

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

            var GALOIS_LOG = [
              0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b,
              0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71,
              0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45,
              0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, 0xc9, 0x9a, 0x09, 0x78, 0x4d, 0xe4, 0x72, 0xa6,
          Severity: Major
          Found in www/js/qr-js/qr.js and 1 other location - About 1 day to fix
          www/js/qr-js/qr.js on lines 86..103

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

          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

            var GALOIS_EXPONENT = [
              0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,
              0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0,
              0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23,
              0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1,
          Severity: Major
          Found in www/js/qr-js/qr.js and 1 other location - About 1 day to fix
          www/js/qr-js/qr.js on lines 105..122

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

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

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

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

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

          Refactorings

          Further Reading

          Function generateFrame has 277 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function generateFrame(str) {
              var i, j, k, m, t, v, x, y;
          
              // Find the smallest version that fits the string.
              t = str.length;
          Severity: Major
          Found in www/js/qr-js/qr.js - About 1 day to fix

            Function 12 has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
            Open

            },{"./manager":12,"./socket":14,"./url":15,"debug":9,"socket.io-parser":49}],12:[function(require,module,exports){
            
            /**
             * Module dependencies.
             */
            Severity: Minor
            Found in www/js/bundle.js - About 1 day 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 55 has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
            Open

            },{}],55:[function(require,module,exports){
            var ioc = require('socket.io/node_modules/socket.io-client');
            require('../../lib/common/utils.js');
            var Msg = require('../../lib/common/Msg.js');
            var ko = require('knockout');
            Severity: Minor
            Found in www/js/bundle.js - About 1 day 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 12 has 251 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            },{"./manager":12,"./socket":14,"./url":15,"debug":9,"socket.io-parser":49}],12:[function(require,module,exports){
            
            /**
             * Module dependencies.
             */
            Severity: Major
            Found in www/js/bundle.js - About 1 day to fix

              Function 23 has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
              Open

              },{"./polling-jsonp":23,"./polling-xhr":24,"./websocket":26,"xmlhttprequest":27}],23:[function(require,module,exports){
              (function (global){
              
              /**
               * Module requirements.
              Severity: Minor
              Found in www/js/bundle.js - About 1 day 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 6 has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
              Open

              },{}],6:[function(require,module,exports){
              var hasOwn = Object.prototype.hasOwnProperty;
              var toString = Object.prototype.toString;
              var undefined;
              
              
              Severity: Minor
              Found in www/js/bundle.js - About 1 day 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 dependentObservable has 221 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              ko.computed = ko.dependentObservable = function (evaluatorFunctionOrOptions, evaluatorFunctionTarget, options) {
                  var _latestValue,
                      _needsEvaluation = true,
                      _isBeingEvaluated = false,
                      _suppressDisposalUntilDisposeWhenReturnsFalse = false,
              Severity: Major
              Found in www/js/bundle.js - About 1 day to fix

                Function 3 has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
                Open

                },{"array-sugar":3,"date-format-lite":4,"elapsed":5,"fast-class":7}],3:[function(require,module,exports){
                (function (arr) {
                    function isNumber(n) {
                        return !isNaN(parseFloat(n)) && isFinite(n);    //thx to http://stackoverflow.com/questions/18082/validate-numbers-in-javascript-isnumeric
                    }
                Severity: Minor
                Found in www/js/bundle.js - About 1 day 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

                  Tooltip.prototype.enter = function (obj) {
                    var self = obj instanceof this.constructor ?
                      obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
                
                    clearTimeout(self.timeout)
                Severity: Major
                Found in www/js/bootstrap.js and 1 other location - About 1 day to fix
                www/js/bootstrap.js on lines 1133..1146

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

                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

                  Tooltip.prototype.leave = function (obj) {
                    var self = obj instanceof this.constructor ?
                      obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
                
                    clearTimeout(self.timeout)
                Severity: Major
                Found in www/js/bootstrap.js and 1 other location - About 1 day to fix
                www/js/bootstrap.js on lines 1118..1131

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

                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

                Severity
                Category
                Status
                Source
                Language