opsforgeio/cabot

View on GitHub

Showing 840 of 1,637 total issues

Function build has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  build: function() {

    var element = this.element;
    var graph = this.graph;

Severity: Minor
Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

    Function render has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      render: function(args) {
    
        args = args || {};
    
        var graph = this.graph;
    Severity: Minor
    Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

      Function onclick has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                      label.onclick = function(e){
      
                              var disableAllOtherLines = line.series.disabled;
                              if ( ! disableAllOtherLines ) {
                                      for ( var i = 0; i < self.legend.lines.length; i++ ) {
      Severity: Minor
      Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

        Function fix has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          fix: function( event ) {
            if ( event[ jQuery.expando ] ) {
              return event;
            }
        
        
        Severity: Minor
        Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 1 hr to fix

          Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            finish: function( type ) {
              if ( type !== false ) {
                type = type || "fx";
              }
              return this.each(function() {
          Severity: Minor
          Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 1 hr to fix

            Function Annotate has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

            Rickshaw.Graph.Annotate = function(args) {
            
              var graph = this.graph = args.graph;
              this.elements = { timeline: args.element };
            
            
            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 forwards has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

                def forwards(self, orm):
                    """
                    Plugin Data migrations are done in 0010. This will test that the
                    migrations passed correctly.
                    """
            Severity: Minor
            Found in cabot/cabotapp/migrations/0011_plugin_data_migration_tests.py - 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 updatePosition has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    updatePosition: function (x, y) {
                        if (x === undefined) {
                            if (this.mousex === undefined) {
                                return;
                            }
            Severity: Minor
            Found in cabot/static/theme/js/jquery.sparkline.min.js - About 1 hr to fix

              Function refresh has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  refresh: function() {
                      //See #8237 & #8828
                      var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
              
                      if ( isDisabled !== this.options.disabled ) {
              Severity: Minor
              Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                Function stop has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    stop: function( event ) {
                        var that = $(this).data("ui-resizable"),
                            o = that.options,
                            pr = that._proportionallyResizeElements,
                            ista = pr.length && (/textarea/i).test(pr[0].nodeName),
                Severity: Minor
                Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                  Function _updateVirtualBoundaries has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _updateVirtualBoundaries: function(forceAspectRatio) {
                          var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
                              o = this.options;
                  
                          b = {
                  Severity: Minor
                  Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                    Function left has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            left: function( position, data ) {
                                var within = data.within,
                                    withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
                                    outerWidth = within.width,
                                    collisionPosLeft = position.left - data.collisionPosition.marginLeft,
                    Severity: Minor
                    Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                      Function _setupHeightStyle has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          _setupHeightStyle: function( heightStyle ) {
                              var maxHeight,
                                  parent = this.element.parent();
                      
                              if ( heightStyle === "fill" ) {
                      Severity: Minor
                      Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                        Function getDimensions has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function getDimensions( elem ) {
                            var raw = elem[0];
                            if ( raw.nodeType === 9 ) {
                                return {
                                    width: elem.width(),
                        Severity: Minor
                        Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                          Function _fnGetCellData has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function _fnGetCellData( oSettings, iRow, iCol, sSpecific )
                              {
                                var sData;
                                var oCol = oSettings.aoColumns[iCol];
                                var oData = oSettings.aoData[iRow]._aData;
                          Severity: Minor
                          Found in cabot/static/theme/js/jquery.dataTables.min.js - About 1 hr to fix

                            Function top has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    top: function( position, data ) {
                                        var within = data.within,
                                            withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
                                            outerHeight = data.within.height,
                                            collisionPosTop = position.top - data.collisionPosition.marginTop,
                            Severity: Minor
                            Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                              Function setData has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      var setData = function (data, val, src) {
                                        var a = src.split('.'), b;
                                        var arrayNotation, o, innerSrc;
                              
                                        for ( var i=0, iLen=a.length-1 ; i<iLen ; i++ )
                              Severity: Minor
                              Found in cabot/static/theme/js/jquery.dataTables.min.js - About 1 hr to fix

                                Function getDimensions has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function getDimensions( elem ) {
                                    var raw = elem[0];
                                    if ( raw.nodeType === 9 ) {
                                        return {
                                            width: elem.width(),
                                Severity: Minor
                                Found in cabot/static/theme/js/jquery.ui.position.js - About 1 hr to fix

                                  Function top has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          top: function( position, data ) {
                                              var within = data.within,
                                                  withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
                                                  outerHeight = data.within.height,
                                                  collisionPosTop = position.top - data.collisionPosition.marginTop,
                                  Severity: Minor
                                  Found in cabot/static/theme/js/jquery.ui.position.js - About 1 hr to fix

                                    Function _getContainer has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        R._getContainer = function (x, y, w, h) {
                                            var container;
                                            container = h == null && !R.is(x, "object") ? g.doc.getElementById(x) : x;
                                            if (container == null) {
                                                return;
                                    Severity: Minor
                                    Found in cabot/static/arachnys/js/raphael.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language