opsforgeio/cabot

View on GitHub

Showing 1,637 of 1,637 total issues

Function ajaxConvert has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function ajaxConvert( s, response, jqXHR, isSuccess ) {
  var conv2, current, conv, tmp, prev,
    converters = {},
    // Work with a copy of dataTypes in case we need to modify it for conversion
    dataTypes = s.dataTypes.slice();
Severity: Major
Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 2 hrs to fix

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

        Chosen.prototype.register_observers = function() {
          var _this = this;
    
          this.container.bind('mousedown.chosen', function(evt) {
            _this.container_mousedown(evt);
    Severity: Major
    Found in cabot/static/theme/js/chosen.jquery.js - About 2 hrs to fix

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

          function _fnPageChange ( oSettings, mAction )
          {
            var iOldStart = oSettings._iDisplayStart;
      
            if ( typeof mAction === "number" )
      Severity: Major
      Found in cabot/static/theme/js/jquery.dataTables.min.js - About 2 hrs to fix

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

                } else if (R.is(clr, "object") && "h" in clr && "s" in clr && "l" in clr) {
                    rgb = R.hsl2rgb(clr);
                    clr.r = rgb.r;
                    clr.g = rgb.g;
                    clr.b = rgb.b;
        Severity: Major
        Found in cabot/static/arachnys/js/raphael.js and 1 other location - About 2 hrs to fix
        cabot/static/arachnys/js/raphael.js on lines 643..670

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

        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

            rightHandle.enter()
              .append("rect")
              .attr('width', this.config.frameHandleThickness)
              .attr('height', this.config.height)
              .style("cursor", "ew-resize")
        Severity: Major
        Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 2 hrs to fix
        cabot/static/arachnys/js/rickshaw.js on lines 2721..2727

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

        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 (R.is(clr, "object") && "h" in clr && "s" in clr && "b" in clr) {
                    rgb = R.hsb2rgb(clr);
                    clr.r = rgb.r;
                    clr.g = rgb.g;
                    clr.b = rgb.b;
        Severity: Major
        Found in cabot/static/arachnys/js/raphael.js and 1 other location - About 2 hrs to fix
        cabot/static/arachnys/js/raphael.js on lines 649..670

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

        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 ($.support.transition && this.$element.hasClass('slide')) {
              this.$element.trigger(e)
              if (e.isDefaultPrevented()) return
              $next.addClass(type)
              $next[0].offsetWidth // force reflow
        Severity: Major
        Found in cabot/static/bootstrap/js/bootstrap.js and 1 other location - About 2 hrs to fix
        cabot/static/theme/js/bootstrap.js on lines 355..375

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

        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 ($.support.transition && this.$element.hasClass('slide')) {
                this.$element.trigger(e)
                if (e.isDefaultPrevented()) return
                $next.addClass(type)
                $next[0].offsetWidth // force reflow
        Severity: Major
        Found in cabot/static/theme/js/bootstrap.js and 1 other location - About 2 hrs to fix
        cabot/static/bootstrap/js/bootstrap.js on lines 345..367

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

        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

            leftHandle.enter()
              .append("rect")
              .attr('width', this.config.frameHandleThickness)
              .attr('height', this.config.height)
              .style("cursor", "ew-resize")
        Severity: Major
        Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 2 hrs to fix
        cabot/static/arachnys/js/rickshaw.js on lines 2734..2740

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

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

            AbstractChosen.prototype.winnow_results = function() {
              var escapedSearchText, option, regex, regexAnchor, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
        
              this.no_results_clear();
              results = 0;
        Severity: Major
        Found in cabot/static/theme/js/chosen.jquery.js - About 2 hrs to fix

          Function _mouseStart has 54 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _mouseStart: function(event) {
                  var that = this,
                      options = this.options;
          
                  this.opos = [event.pageX, event.pageY];
          Severity: Major
          Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

            Function addGradientFill has 54 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                addGradientFill = function (o, gradient, fill) {
                    o.attrs = o.attrs || {};
                    var attrs = o.attrs,
                        pow = Math.pow,
                        opacity,
            Severity: Major
            Found in cabot/static/arachnys/js/raphael.js - About 2 hrs to fix

              Function stack has 54 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                d3.layout.stack = function() {
                  var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY;
                  function stack(data, index) {
                    var series = data.map(function(d, i) {
                      return values.call(stack, d, i);
              Severity: Major
              Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

                Function parseDate has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  Morris.parseDate = function(date) {
                    var isecs, m, msecs, n, o, offsetmins, p, q, r, ret, secs;
                    if (typeof date === 'number') {
                      return date;
                    }
                Severity: Major
                Found in cabot/static/arachnys/js/morris.js - About 2 hrs to fix

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

                              if (this.values[1] !== null) {
                                  shape = this.renderPerformance().append();
                                  this.shapes[shape.id] = 'p1';
                                  this.valueShapes.p1 = shape.id;
                              }
                  Severity: Major
                  Found in cabot/static/theme/js/jquery.sparkline.min.js and 1 other location - About 2 hrs to fix
                  cabot/static/theme/js/jquery.sparkline.min.js on lines 2242..2246

                  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

                              if (this.values[0] !== null) {
                                  shape = this.renderTarget().append();
                                  this.shapes[shape.id] = 't0';
                                  this.valueShapes.t0 = shape.id;
                              }
                  Severity: Major
                  Found in cabot/static/theme/js/jquery.sparkline.min.js and 1 other location - About 2 hrs to fix
                  cabot/static/theme/js/jquery.sparkline.min.js on lines 2237..2241

                  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

                  Function parse has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      parse: function( red, green, blue, alpha ) {
                          if ( red === undefined ) {
                              this._rgba = [ null, null, null, null ];
                              return this;
                          }
                  Severity: Major
                  Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

                    Function _fnCreateCookie has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function _fnCreateCookie ( sName, sValue, iSecs, sBaseName, fnCallback )
                        {
                          var date = new Date();
                          date.setTime( date.getTime()+(iSecs*1000) );
                    
                    
                    Severity: Major
                    Found in cabot/static/theme/js/jquery.dataTables.min.js - About 2 hrs to fix

                      Function interHelper has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function interHelper(bez1, bez2, justCount) {
                              var bbox1 = R.bezierBBox(bez1),
                                  bbox2 = R.bezierBBox(bez2);
                              if (!R.isBBoxIntersect(bbox1, bbox2)) {
                                  return justCount ? 0 : [];
                      Severity: Major
                      Found in cabot/static/arachnys/js/raphael.js - About 2 hrs to fix

                        Function redraw has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            Donut.prototype.redraw = function() {
                              var C, cx, cy, i, idx, last, max_value, min, next, seg, total, value, w, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;
                              this.el.empty();
                              this.raphael = new Raphael(this.el[0]);
                              cx = this.el.width() / 2;
                        Severity: Major
                        Found in cabot/static/arachnys/js/morris.js - About 2 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language