opsforgeio/cabot

View on GitHub

Showing 840 of 1,637 total issues

Function name has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $.fn[ name ] = function( options ) {
        var isMethodCall = typeof options === "string",
            args = slice.call( arguments, 1 ),
            returnValue = this;

Severity: Minor
Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

    Function updateDisplay has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            updateDisplay: function () {
                var splist = this.splist,
                     spcount = splist.length,
                     needsRefresh = false,
                     offset = this.$canvas.offset(),
    Severity: Minor
    Found in cabot/static/theme/js/jquery.sparkline.min.js - About 1 hr to fix

      Function clip has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Function load has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            load: function( index, event ) {
                index = this._getIndex( index );
                var that = this,
                    tab = this.tabs.eq( index ),
                    anchor = tab.find( ".ui-tabs-anchor" ),
        Severity: Minor
        Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

          Function print has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              paperproto.print = function (x, y, string, font, size, origin, letter_spacing) {
                  origin = origin || "middle"; // baseline|middle
                  letter_spacing = mmax(mmin(letter_spacing || 0, 1), -1);
                  var letters = Str(string)[split](E),
                      shift = 0,
          Severity: Minor
          Found in cabot/static/arachnys/js/raphael.js - About 1 hr to fix

            Function autoGridLines has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                Grid.prototype.autoGridLines = function(ymin, ymax, nlines) {
                  var gmax, gmin, grid, smag, span, step, unit, y, ymag;
                  span = ymax - ymin;
                  ymag = Math.floor(Math.log(span) / Math.log(10));
                  unit = Math.pow(10, ymag);
            Severity: Minor
            Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

              Function when has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                when: function( subordinate /* , ..., subordinateN */ ) {
                  var i = 0,
                    resolveValues = core_slice.call( arguments ),
                    length = resolveValues.length,
              
              
              Severity: Minor
              Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 1 hr to fix

                Function Palette has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                Rickshaw.Color.Palette = function(args) {
                
                  var color = new Rickshaw.Fixtures.Color();
                
                  args = args || {};
                Severity: Minor
                Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr 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 effect has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    effect: function( /* effect, options, speed, callback */ ) {
                        var args = _normalizeArguments.apply( this, arguments ),
                            mode = args.mode,
                            queue = args.queue,
                            effectMethod = $.effects.effect[ args.effect ];
                Severity: Minor
                Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                  Function _toggle has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _toggle: function( data ) {
                          var toShow = data.newPanel,
                              toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
                  
                          // handle activating a panel during the animation for another activation
                  Severity: Minor
                  Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                    Function _mouseCapture has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _mouseCapture: function(event, overrideHandle) {
                            var currentItem = null,
                                validHandle = false,
                                that = this;
                    
                    
                    Severity: Minor
                    Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                      Function drag has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          drag: function( event ) {
                      
                              var i = $(this).data("ui-draggable"), o = i.options, scrolled = false;
                      
                              if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
                      Severity: Minor
                      Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                        Function _dialogDatepicker has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            _dialogDatepicker: function(input, date, onSelect, settings, pos) {
                                var id, browserWidth, browserHeight, scrollX, scrollY,
                                    inst = this._dialogInst; // internal instance
                        
                                if (!inst) {
                        Severity: Minor
                        Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                          Function cancel has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              cancel: function() {
                          
                                  if(this.dragging) {
                          
                                      this._mouseUp({ target: null });
                          Severity: Minor
                          Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                            Function _resetButton has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                _resetButton: function() {
                                    if ( this.type === "input" ) {
                                        if ( this.options.label ) {
                                            this.element.val( this.options.label );
                                        }
                            Severity: Minor
                            Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                              Function _hideDatepicker has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  _hideDatepicker: function(input) {
                                      var showAnim, duration, postProcess, onClose,
                                          inst = this._curInst;
                              
                                      if (!inst || (input && inst !== $.data(input, PROP_NAME))) {
                              Severity: Minor
                              Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                                Function slide has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

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

                                  Function _createTitlebar has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      _createTitlebar: function() {
                                          var uiDialogTitle;
                                  
                                          this.uiDialogTitlebar = $("<div>")
                                              .addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix")
                                  Severity: Minor
                                  Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                                    Function pulsate has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    $.effects.effect.pulsate = function( o, done ) {
                                        var elem = $( this ),
                                            mode = $.effects.setMode( elem, o.mode || "show" ),
                                            show = mode === "show",
                                            hide = mode === "hide",
                                    Severity: Minor
                                    Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                                      Function _parseDots has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              parseDots = R._parseDots = cacher(function (gradient) {
                                                  var dots = [];
                                                  for (var i = 0, ii = gradient.length; i < ii; i++) {
                                                      var dot = {},
                                                          par = gradient[i].match(/^([^:]*):?([\d\.]*)/);
                                      Severity: Minor
                                      Found in cabot/static/arachnys/js/raphael.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language