opsforgeio/cabot

View on GitHub

Showing 1,637 of 1,637 total issues

Function set_up_html has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    Chosen.prototype.set_up_html = function() {
      var container_classes, container_props;

      container_classes = ["chosen-container"];
      container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
Severity: Minor
Found in cabot/static/theme/js/chosen.jquery.js - About 1 hr to fix

    Function _mouseDrag has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _mouseDrag: function(event) {
    
            //Increase performance, avoid regex
            var data,
                el = this.helper, props = {},
    Severity: Minor
    Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

      Function _createWrapper has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _createWrapper: function() {
              this.uiDialog = $("<div>")
                  .addClass( "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " +
                      this.options.dialogClass )
                  .hide()
      Severity: Minor
      Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

        Function shake has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        $.effects.effect.shake = function( o, done ) {
        
            var el = $( this ),
                props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
                mode = $.effects.setMode( el, o.mode || "effect" ),
        Severity: Minor
        Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

          Function _fnGetTdNodes has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function _fnGetTdNodes ( oSettings, iIndividualRow )
              {
                var anReturn = [];
                var iCorrector;
                var anTds, nTd;
          Severity: Minor
          Found in cabot/static/theme/js/jquery.dataTables.min.js - About 1 hr to fix

            Function pathBBox has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var pathDimensions = R.pathBBox = function (path) {
                    var pth = paths(path);
                    if (pth.bbox) {
                        return pth.bbox;
                    }
            Severity: Minor
            Found in cabot/static/arachnys/js/raphael.js - About 1 hr to fix

              Function processPath has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                              processPath = function (path, d) {
                                  var nx, ny;
                                  if (!path) {
                                      return ["C", d.x, d.y, d.x, d.y, d.x, d.y];
                                  }
              Severity: Minor
              Found in cabot/static/arachnys/js/raphael.js - About 1 hr to fix

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

                    force.start = function() {
                      var i, n = nodes.length, m = links.length, w = size[0], h = size[1], neighbors, o;
                      for (i = 0; i < n; ++i) {
                        (o = nodes[i]).index = i;
                        o.weight = 0;
                Severity: Minor
                Found in cabot/static/arachnys/js/d3.js - About 1 hr to fix

                  Function generatePaths has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      Line.prototype.generatePaths = function() {
                        var c, coords, i, r, smooth;
                        return this.paths = (function() {
                          var _i, _ref, _ref1, _results;
                          _results = [];
                  Severity: Minor
                  Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                            if(!(/^(document|window|parent)$/).test(o.containment)) {
                                ce = $(o.containment)[0];
                                co = $(o.containment).offset();
                                over = ($(ce).css("overflow") !== "hidden");
                    
                    
                    Severity: Critical
                    Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                              if (this.floating && horizontalDirection) {
                                  return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf));
                              } else {
                                  return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf));
                              }
                      Severity: Critical
                      Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                                if ( ( ( $target[0].id !== $.datepicker._mainDivId &&
                                        $target.parents("#" + $.datepicker._mainDivId).length === 0 &&
                                        !$target.hasClass($.datepicker.markerClassName) &&
                                        !$target.closest("." + $.datepicker._triggerClass).length &&
                                        $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
                        Severity: Critical
                        Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                                      if (rgb[5]) {
                                          values = rgb[5][split](commaSpaces);
                                          red = toFloat(values[0]);
                                          values[0].slice(-1) == "%" && (red *= 2.55);
                                          green = toFloat(values[1]);
                          Severity: Critical
                          Found in cabot/static/arachnys/js/raphael.js - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                                        if (rgb[6]) {
                                            values = rgb[6][split](commaSpaces);
                                            red = toFloat(values[0]);
                                            values[0].slice(-1) == "%" && (red *= 2.55);
                                            green = toFloat(values[1]);
                            Severity: Critical
                            Found in cabot/static/arachnys/js/raphael.js - About 1 hr to fix

                              Consider simplifying this complex logical expression.
                              Open

                                    if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
                                      ( jQuery.support.htmlSerialize || !rnoshimcache.test( value )  ) &&
                                      ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
                                      !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
                              
                              
                              Severity: Critical
                              Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 1 hr to fix

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

                                        if ( this.options.values && this.options.values.length ) {
                                            uiHash.value = this.values( index );
                                            uiHash.values = this.values();
                                        }
                                Severity: Major
                                Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 1 hr to fix
                                cabot/static/theme/js/jquery-ui.js on lines 12919..12922

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

                                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 ( oRange === "min" && this.orientation === "horizontal" ) {
                                                this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
                                            }
                                Severity: Major
                                Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 1 hr to fix
                                cabot/static/theme/js/jquery-ui.js on lines 13212..13214

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

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

                                            if (t1 > 0 && t1 < 1) {
                                                dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1);
                                                x.push(dot.x);
                                                y.push(dot.y);
                                            }
                                Severity: Major
                                Found in cabot/static/arachnys/js/raphael.js and 3 other locations - About 1 hr to fix
                                cabot/static/arachnys/js/raphael.js on lines 1644..1648
                                cabot/static/arachnys/js/raphael.js on lines 1649..1653
                                cabot/static/arachnys/js/raphael.js on lines 1666..1670

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

                                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(o.opacity) { // opacity option
                                            if (this.helper.css("opacity")) {
                                                this._storedOpacity = this.helper.css("opacity");
                                            }
                                            this.helper.css("opacity", o.opacity);
                                Severity: Major
                                Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 1 hr to fix
                                cabot/static/theme/js/jquery-ui.js on lines 3739..3744

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

                                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

                                                x: pow(t1, 3) * p1x + pow(t1, 2) * 3 * t * c1x + t1 * 3 * t * t * c2x + pow(t, 3) * p2x,
                                Severity: Major
                                Found in cabot/static/arachnys/js/raphael.js and 1 other location - About 1 hr to fix
                                cabot/static/arachnys/js/raphael.js on lines 1630..1630

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

                                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