beevelop/corci-monitor

View on GitHub

Showing 374 of 374 total issues

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

    'onDisconnect': function() {
        this.disconnectedSince(new Date());
        this.status('disconnected');
        this.agents([]);
        this.builds([]);
Severity: Major
Found in www/js/index.js and 1 other location - About 5 hrs to fix
www/js/bundle.js on lines 13064..13075

Duplicated Code

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

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

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

Tuning

This issue has a mass of 139.

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

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

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

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

Refactorings

Further Reading

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

    'onDisconnect': function() {
        this.disconnectedSince(new Date());
        this.status('disconnected');
        this.agents([]);
        this.builds([]);
Severity: Major
Found in www/js/bundle.js and 1 other location - About 5 hrs to fix
www/js/index.js on lines 128..139

Duplicated Code

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

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

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

Tuning

This issue has a mass of 139.

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

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

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

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

Refactorings

Further Reading

Function 23 has 128 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{"./polling-jsonp":23,"./polling-xhr":24,"./websocket":26,"xmlhttprequest":27}],23:[function(require,module,exports){
(function (global){

/**
 * Module requirements.
Severity: Major
Found in www/js/bundle.js - About 5 hrs to fix

    Function 2 has 125 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"./utils":2,"extend":6}],2:[function(require,module,exports){
    var log = console.log;
    require('date-format-lite');
    require('fast-class');
    require('array-sugar');
    Severity: Major
    Found in www/js/bundle.js - About 5 hrs to fix

      Function 3 has 118 lines of code (exceeds 25 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: Major
      Found in www/js/bundle.js - About 4 hrs to fix

        Consider simplifying this complex logical expression.
        Open

                if (stringifySupported) {
                  // A test function object with a custom `toJSON` method.
                  (value = function () {
                    return 1;
                  }).toJSON = value;
        Severity: Critical
        Found in www/js/bundle.js - About 4 hrs to fix

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

            $.fn.scrollspy = function (option) {
              return this.each(function () {
                var $this   = $(this)
                var data    = $this.data('bs.scrollspy')
                var options = typeof option == 'object' && option
          Severity: Major
          Found in www/js/bootstrap.js and 1 other location - About 4 hrs to fix
          www/js/bootstrap.js on lines 1911..1920

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

          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

            $.fn.affix = function (option) {
              return this.each(function () {
                var $this   = $(this)
                var data    = $this.data('bs.affix')
                var options = typeof option == 'object' && option
          Severity: Major
          Found in www/js/bootstrap.js and 1 other location - About 4 hrs to fix
          www/js/bootstrap.js on lines 1654..1663

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

          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 9 has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
          Open

          },{}],9:[function(require,module,exports){
          
          /**
           * Expose `debug()` as the module.
           */
          Severity: Minor
          Found in www/js/bundle.js - About 4 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function expressionRewriting has 112 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          ko.expressionRewriting = (function () {
              var javaScriptReservedWords = ["true", "false", "null", "undefined"];
          
              // Matches something that can be assigned to--either an isolated identifier or something ending with a property accessor
              // This is designed to be simple and avoid false negatives, but could produce false positives (e.g., a+b.c).
          Severity: Major
          Found in www/js/bundle.js - About 4 hrs to fix

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

            },{}],5:[function(require,module,exports){
            function Elapsed (from, to) {
                this.from = from;
                this.to = to || new Date();
                if (!(this.from instanceof Date && this.to instanceof Date)) return;
            Severity: Minor
            Found in www/js/bundle.js - About 4 hrs to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            File index.js has 344 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            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');
            var stringformat = require('stringformat');
            Severity: Minor
            Found in www/js/index.js - About 4 hrs to fix

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

                  for (i = -2; i < 2; i++) {
                    frameBuffer[(x + i)     + width * (y - 2)]     = 1;
                    frameBuffer[(x - 2)     + width * (y + i + 1)] = 1;
                    frameBuffer[(x + 2)     + width * (y + i)]     = 1;
                    frameBuffer[(x + i + 1) + width * (y + 2)]     = 1;
              Severity: Major
              Found in www/js/qr-js/qr.js and 1 other location - About 4 hrs to fix
              www/js/qr-js/qr.js on lines 654..659

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

              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

                    for (x = 2; x < 4; x++) {
                      frameBuffer[(y + x) + width * (k + 2)] = 1;
                      frameBuffer[(y + 2) + width * (k + x + 1)] = 1;
                      frameBuffer[(y + 4) + width * (k + x)] = 1;
                      frameBuffer[(y + x + 1) + width * (k + 4)] = 1;
              Severity: Major
              Found in www/js/qr-js/qr.js and 1 other location - About 4 hrs to fix
              www/js/qr-js/qr.js on lines 302..307

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

              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 26 has 105 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              },{"../transport":21,"component-inherit":28,"debug":9,"engine.io-parser":29,"parseqs":39,"xmlhttprequest":27}],26:[function(require,module,exports){
              /**
               * Module dependencies.
               */
              
              
              Severity: Major
              Found in www/js/bundle.js - About 4 hrs to fix

                Function lex has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      var lex = function () {
                        var source = Source, length = source.length, value, begin, position, isSigned, charCode;
                        while (Index < length) {
                          charCode = source.charCodeAt(Index);
                          switch (charCode) {
                Severity: Major
                Found in www/js/bundle.js - About 4 hrs to fix

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

                    $.fn.alert = function (option) {
                      return this.each(function () {
                        var $this = $(this)
                        var data  = $this.data('bs.alert')
                  
                  
                  Severity: Major
                  Found in www/js/bootstrap.js and 1 other location - About 3 hrs to fix
                  www/js/bootstrap.js on lines 747..755

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

                  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

                    $.fn.dropdown = function (option) {
                      return this.each(function () {
                        var $this = $(this)
                        var data  = $this.data('bs.dropdown')
                  
                  
                  Severity: Major
                  Found in www/js/bootstrap.js and 1 other location - About 3 hrs to fix
                  www/js/bootstrap.js on lines 118..126

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

                  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 22 has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                  Open

                  },{"component-emitter":17,"engine.io-parser":29}],22:[function(require,module,exports){
                  (function (global){
                  /**
                   * Module dependencies
                   */
                  Severity: Minor
                  Found in www/js/bundle.js - About 3 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 update has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      'update': function (element, valueAccessor, allBindings) {
                          function selectedOptions() {
                              return ko.utils.arrayFilter(element.options, function (node) { return node.selected; });
                          }
                  
                  
                  Severity: Major
                  Found in www/js/bundle.js - About 3 hrs to fix
                    Severity
                    Category
                    Status
                    Source
                    Language