opsforgeio/cabot

View on GitHub

Showing 1,637 of 1,637 total issues

Function _determineButtonType has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _determineButtonType: function() {
        var ancestor, labelSelector, checked;

        if ( this.element.is("[type=checkbox]") ) {
            this.type = "checkbox";
Severity: Minor
Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

    Function refreshPositions has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        refreshPositions: function(fast) {
    
            //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
            if(this.offsetParent && this.helper) {
                this.offset.parent = this._getParentOffset();
    Severity: Minor
    Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

      Function _makeDraggable has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _makeDraggable: function() {
              var that = this,
                  options = this.options;
      
              function filteredUi( ui ) {
      Severity: Minor
      Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

        Function fetchData has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                var fetchData = function (data, type, src) {
                  var a = src.split('.');
                  var arrayNotation, out, innerSrc;
        
                  if ( src !== "" )
        Severity: Minor
        Found in cabot/static/theme/js/jquery.dataTables.min.js - About 1 hr to fix

          Function fnOpen has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              this.fnOpen = function( nTr, mHtml, sClass )
              {
                /* Find settings from table node */
                var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
          
          
          Severity: Minor
          Found in cabot/static/theme/js/jquery.dataTables.min.js - About 1 hr to fix

            Function _fnLoadState has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function _fnLoadState ( oSettings, oInit )
                {
                  if ( !oSettings.oFeatures.bStateSave )
                  {
                    return;
            Severity: Minor
            Found in cabot/static/theme/js/jquery.dataTables.min.js - About 1 hr to fix

              Function _createButtons has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _createButtons: function() {
                      var that = this,
                          buttons = this.options.buttons;
              
                      // if we already have a button pane, remove it
              Severity: Minor
              Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                Function open has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    open: function( event ) {
                        var that = this,
                            target = $( event ? event.target : this.element )
                                // we need closest here due to mouseover bubbling,
                                // but always pointing at the same event target
                Severity: Minor
                Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                  Function close has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      close: function( event ) {
                          var that = this,
                              target = $( event ? event.currentTarget : this.element ),
                              tooltip = this._find( target );
                  
                  
                  Severity: Minor
                  Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                    Function token has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          function token() {
                            if (I >= N) return EOF;
                            if (eol) return eol = false, EOL;
                            var j = I;
                            if (text.charCodeAt(j) === 34) {
                    Severity: Minor
                    Found in cabot/static/arachnys/js/d3.js - About 1 hr to fix

                      Function circle has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        d3.geo.circle = function() {
                          var origin = [ 0, 0 ], angle, precision = 6, interpolate;
                          function circle() {
                            var center = typeof origin === "function" ? origin.apply(this, arguments) : origin, rotate = d3_geo_rotation(-center[0] * d3_radians, -center[1] * d3_radians, 0).invert, ring = [];
                            interpolate(null, null, 1, {
                      Severity: Minor
                      Found in cabot/static/arachnys/js/d3.js - About 1 hr to fix

                        Function brush has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function brush(g) {
                              g.each(function() {
                                var g = d3.select(this).style("pointer-events", "all").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart);
                                var background = g.selectAll(".background").data([ 0 ]);
                                background.enter().append("rect").attr("class", "background").style("visibility", "hidden").style("cursor", "crosshair");
                        Severity: Minor
                        Found in cabot/static/arachnys/js/d3.js - About 1 hr to fix

                          Function handlers has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            handlers: function( event, handlers ) {
                              var sel, handleObj, matches, i,
                                handlerQueue = [],
                                delegateCount = handlers.delegateCount,
                                cur = event.target;
                          Severity: Minor
                          Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 1 hr to fix

                            Function Donut has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function Donut(options) {
                                  this.select = __bind(this.select, this);
                            
                                  this.click = __bind(this.click, this);
                            
                            
                            Severity: Minor
                            Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

                              Function promise has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              jQuery.ready.promise = function( obj ) {
                                if ( !readyList ) {
                              
                                  readyList = jQuery.Deferred();
                              
                              
                              Severity: Minor
                              Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 1 hr to fix

                                Function attr has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  attr: function( elem, name, value ) {
                                    var hooks, ret,
                                      nType = elem.nodeType;
                                
                                    // don't get/set attributes on text, comment and attribute nodes
                                Severity: Minor
                                Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 1 hr to fix

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

                                              if (this.targetX !== undefined && this.targetY !== undefined &&
                                                  context.isPointInPath(this.targetX, this.targetY)) {
                                                  this.currentTargetShapeId = shapeid;
                                              }
                                  Severity: Major
                                  Found in cabot/static/theme/js/jquery.sparkline.min.js and 2 other locations - About 1 hr to fix
                                  cabot/static/theme/js/jquery.sparkline.min.js on lines 2750..2753
                                  cabot/static/theme/js/jquery.sparkline.min.js on lines 2760..2763

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

                                              if (this.targetX !== undefined && this.targetY !== undefined &&
                                                  context.isPointInPath(this.targetX, this.targetY)) {
                                                  this.currentTargetShapeId = shapeid;
                                              }
                                  Severity: Major
                                  Found in cabot/static/theme/js/jquery.sparkline.min.js and 2 other locations - About 1 hr to fix
                                  cabot/static/theme/js/jquery.sparkline.min.js on lines 2760..2763
                                  cabot/static/theme/js/jquery.sparkline.min.js on lines 2785..2788

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

                                              if (this.targetX !== undefined && this.targetY !== undefined &&
                                                  context.isPointInPath(this.targetX, this.targetY)) {
                                                  this.currentTargetShapeId = shapeid;
                                              }
                                  Severity: Major
                                  Found in cabot/static/theme/js/jquery.sparkline.min.js and 2 other locations - About 1 hr to fix
                                  cabot/static/theme/js/jquery.sparkline.min.js on lines 2750..2753
                                  cabot/static/theme/js/jquery.sparkline.min.js on lines 2785..2788

                                  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

                                  Function backdrop has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    Modal.prototype.backdrop = function (callback) {
                                      var that    = this
                                      var animate = this.$element.hasClass('fade') ? 'fade' : ''
                                  
                                      if (this.isShown && this.options.backdrop) {
                                  Severity: Minor
                                  Found in cabot/static/bootstrap/js/bootstrap.js - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language