opsforgeio/cabot

View on GitHub

Showing 840 of 1,637 total issues

Function X has 79 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Rickshaw.Graph.Axis.X = function(args) {

  var self = this;
  var berthRate = 0.10;

Severity: Major
Found in cabot/static/arachnys/js/rickshaw.js - About 3 hrs to fix

    Function fnSetColumnVis has 78 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        this.fnSetColumnVis = function ( iCol, bShow, bRedraw )
        {
          var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
          var i, iLen;
          var aoColumns = oSettings.aoColumns;
    Severity: Major
    Found in cabot/static/theme/js/jquery.dataTables.min.js - About 3 hrs to fix

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

        _registerMouseEvents: function() {
      
          var element = d3.select(this.element);
      
          var drag = {
      Severity: Minor
      Found in cabot/static/arachnys/js/rickshaw.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 _clear has 77 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _clear: function(event, noPropagation) {
      
              this.reverting = false;
              // We delay all events that have to be triggered to after the point where the placeholder has been removed and
              // everything else normalized again
      Severity: Major
      Found in cabot/static/theme/js/jquery-ui.js - About 3 hrs to fix

        Function $ has 77 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            this.$ = function ( sSelector, oOpts )
            {
              var i, iLen, a = [], tr;
              var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
              var aoData = oSettings.aoData;
        Severity: Major
        Found in cabot/static/theme/js/jquery.dataTables.min.js - About 3 hrs to fix

          Function _pathToRelative has 77 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  pathToRelative = R._pathToRelative = function (pathArray) {
                      var pth = paths(pathArray);
                      if (pth.rel) {
                          return pathClone(pth.rel);
                      }
          Severity: Major
          Found in cabot/static/arachnys/js/raphael.js - About 3 hrs to fix

            Function _fnSortAttachListener has 76 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function _fnSortAttachListener ( oSettings, nNode, iDataIndex, fnCallback )
                {
                  _fnBindAction( nNode, {}, function (e) {
                    /* If the column is not sortable - don't to anything */
                    if ( oSettings.aoColumns[iDataIndex].bSortable === false )
            Severity: Major
            Found in cabot/static/theme/js/jquery.dataTables.min.js - About 3 hrs to fix

              Function d3_geo_resample has 76 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function d3_geo_resample(project) {
                  var δ2 = .5, cosMinDistance = Math.cos(30 * d3_radians), maxDepth = 16;
                  function resample(stream) {
                    return (maxDepth ? resampleRecursive : resampleNone)(stream);
                  }
              Severity: Major
              Found in cabot/static/arachnys/js/d3.js - About 3 hrs to fix

                Function albersUsa has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  d3.geo.albersUsa = function() {
                    var lower48 = d3.geo.albers();
                    var alaska = d3.geo.conicEqualArea().rotate([ 154, 0 ]).center([ -2, 58.5 ]).parallels([ 55, 65 ]);
                    var hawaii = d3.geo.conicEqualArea().rotate([ 157, 0 ]).center([ -3, 19.9 ]).parallels([ 8, 18 ]);
                    var point, pointStream = {
                Severity: Major
                Found in cabot/static/arachnys/js/d3.js - About 3 hrs to fix

                  Function Sizzle has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function Sizzle( selector, context, results, seed ) {
                    var match, elem, m, nodeType,
                      // QSA vars
                      i, groups, old, nid, newContext, newSelector;
                  
                  
                  Severity: Major
                  Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 3 hrs to fix

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

                        _mouseStart: function(event, overrideHandle, noActivation) {
                    
                            var i, body,
                                o = this.options;
                    
                    
                    Severity: Major
                    Found in cabot/static/theme/js/jquery-ui.js - About 3 hrs to fix

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

                          _mouseDrag: function(event) {
                              var i, item, itemElement, intersection,
                                  o = this.options,
                                  scrolled = false;
                      
                      
                      Severity: Major
                      Found in cabot/static/theme/js/jquery-ui.js - About 3 hrs to fix

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

                            _mouseDrag: function(event) {
                        
                                this.dragged = true;
                        
                                if (this.options.disabled) {
                        Severity: Major
                        Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

                          Function Datepicker has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function Datepicker() {
                              this._curInst = null; // The current instance in use
                              this._keyEvent = false; // If the last event was a key event
                              this._disabledInputs = []; // List of date picker inputs that have been disabled
                              this._datepickerShowing = false; // True if the popup picker is showing , false if not
                          Severity: Major
                          Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

                            Function d3_scale_ordinal has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              function d3_scale_ordinal(domain, ranger) {
                                var index, range, rangeBand;
                                function scale(x) {
                                  return range[((index.get(x) || ranger.t === "range" && index.set(x, domain.push(x))) - 1) % range.length];
                                }
                            Severity: Major
                            Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

                              Function buildFragment has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                buildFragment: function( elems, context, scripts, selection ) {
                                  var j, elem, contains,
                                    tmp, tag, tbody, wrap,
                                    l = elems.length,
                              
                              
                              Severity: Major
                              Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 2 hrs to fix

                                Function _create has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    _create: function() {
                                        this.activeMenu = this.element;
                                        // flag used to prevent firing of the click handler
                                        // as the event bubbles up through nested menus
                                        this.mouseHandled = false;
                                Severity: Major
                                Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

                                  Function d3_locale_numberFormat has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    function d3_locale_numberFormat(locale) {
                                      var locale_decimal = locale.decimal, locale_thousands = locale.thousands, locale_grouping = locale.grouping, locale_currency = locale.currency, formatGroup = locale_grouping ? function(value) {
                                        var i = value.length, t = [], j = 0, g = locale_grouping[0];
                                        while (i > 0 && g > 0) {
                                          t.push(value.substring(i -= g, i + g));
                                  Severity: Major
                                  Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

                                    Function add has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      add: function( elem, types, handler, data, selector ) {
                                        var tmp, events, t, handleObjIn,
                                          special, eventHandle, handleObj,
                                          handlers, type, namespaces, origType,
                                          elemData = jQuery._data( elem );
                                    Severity: Major
                                    Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 2 hrs to fix

                                      Function widget has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      $.widget = function( name, base, prototype ) {
                                          var fullName, existingConstructor, constructor, basePrototype,
                                              // proxiedPrototype allows the provided prototype to remain unmodified
                                              // so that it can be used as a mixin for multiple widgets (#8876)
                                              proxiedPrototype = {},
                                      Severity: Major
                                      Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language