opsforgeio/cabot

View on GitHub

Showing 840 of 1,637 total issues

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

    function _fnGetObjectDataFn( mSource )
    {
      if ( mSource === null )
      {
        /* Give an empty string for rendering / sorting etc */
Severity: Major
Found in cabot/static/theme/js/jquery.dataTables.min.js - About 2 hrs to fix

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

          this.data = (function() {
            var _i, _len, _results;
            _results = [];
            for (index = _i = 0, _len = data.length; _i < _len; index = ++_i) {
              row = data[index];
    Severity: Major
    Found in cabot/static/arachnys/js/morris.js - About 2 hrs to fix

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

        domManip: function( args, callback, allowIntersection ) {
      
          // Flatten any nested arrays
          args = core_concat.apply( [], args );
      
      
      Severity: Major
      Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 2 hrs to fix

        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

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

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

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

                                Rickshaw.Fixtures.Time.Local = function() {
                                
                                  var self = this;
                                
                                  this.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
                                Severity: Minor
                                Found in cabot/static/arachnys/js/rickshaw.js - About 2 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 keydown has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                            keydown: function( event ) {
                                                /*jshint maxcomplexity:15*/
                                                if ( this.element.prop( "readOnly" ) ) {
                                                    suppressKeyPress = true;
                                                    suppressInput = true;
                                Severity: Major
                                Found in cabot/static/theme/js/jquery.ui.autocomplete.js - About 2 hrs to fix

                                  Function keydown has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                              keydown: function( event ) {
                                                  /*jshint maxcomplexity:15*/
                                                  if ( this.element.prop( "readOnly" ) ) {
                                                      suppressKeyPress = true;
                                                      suppressInput = true;
                                  Severity: Major
                                  Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

                                    Function fnUpdate has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        this.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction )
                                        {
                                          var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
                                          var i, iLen, sDisplay;
                                          var iRow = (typeof mRow === 'object') ?
                                    Severity: Major
                                    Found in cabot/static/theme/js/jquery.dataTables.min.js - About 2 hrs to fix

                                      Function _refreshValue has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          _refreshValue: function() {
                                              var lastValPercent, valPercent, value, valueMin, valueMax,
                                                  oRange = this.options.range,
                                                  o = this.options,
                                                  that = this,
                                      Severity: Major
                                      Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language