opsforgeio/cabot

View on GitHub

Showing 840 of 1,637 total issues

Function _setContainment has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _setContainment: function() {

        var over, c, ce,
            o = this.options;

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

    Function resize has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        resize: function( event ) {
            var woset, hoset, isParent, isOffsetRelative,
                that = $(this).data("ui-resizable"),
                o = that.options,
                co = that.containerOffset, cp = that.position,
    Severity: Minor
    Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

      Function _destroy has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _destroy: function() {
              if ( this.xhr ) {
                  this.xhr.abort();
              }
      
      
      Severity: Minor
      Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

        Function histogram has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          d3.layout.histogram = function() {
            var frequency = true, valuer = Number, ranger = d3_layout_histogramRange, binner = d3_layout_histogramBinSturges;
            function histogram(data, i) {
              var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x;
              while (++i < m) {
        Severity: Minor
        Found in cabot/static/arachnys/js/d3.js - About 1 hr to fix

          Function matcherFromTokens has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function matcherFromTokens( tokens ) {
            var checkContext, matcher, j,
              len = tokens.length,
              leadingRelative = Expr.relative[ tokens[0].type ],
              implicitRelative = leadingRelative || Expr.relative[" "],
          Severity: Minor
          Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 1 hr to fix

            Function resampleLineTo has 14 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                function resampleLineTo(x0, y0, λ0, a0, b0, c0, x1, y1, λ1, a1, b1, c1, depth, stream) {
            Severity: Major
            Found in cabot/static/arachnys/js/d3.js - About 1 hr to fix

              Function Time has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

              Rickshaw.Fixtures.Time = 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 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 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  def forwards(self, orm):
              
                      #
                      #  Update Content types. Necessary for the polymorphic model migrations
                      #
              Severity: Minor
              Found in cabot/cabotapp/migrations/0010_plugin_data_migration.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 show has 43 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                , show: function () {
                    var $tip
                      , inside
                      , pos
                      , actualWidth
              Severity: Minor
              Found in cabot/static/theme/js/bootstrap.js - About 1 hr to fix

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

                    refresh: function() {
                        var menus,
                            icon = this.options.icons.submenu,
                            submenus = this.element.find( this.options.menus );
                
                
                Severity: Minor
                Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                  Function _fnCreateTr has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function _fnCreateTr ( oSettings, iRow )
                      {
                        var oData = oSettings.aoData[iRow];
                        var nTd;
                  
                  
                  Severity: Minor
                  Found in cabot/static/theme/js/jquery.dataTables.min.js - About 1 hr to fix

                    Function _fnAddData has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function _fnAddData ( oSettings, aDataSupplied )
                        {
                          var oCol;
                    
                          /* Take an independent copy of the data source so we can bash it about as we wish */
                    Severity: Minor
                    Found in cabot/static/theme/js/jquery.dataTables.min.js - About 1 hr to fix

                      Function create has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          R._engine.create = function () {
                              var con = R._getContainer.apply(0, arguments),
                                  container = con && con.container,
                                  x = con.x,
                                  y = con.y,
                      Severity: Minor
                      Found in cabot/static/arachnys/js/raphael.js - About 1 hr to fix

                        Function d3_svg_line has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          function d3_svg_line(projection) {
                            var x = d3_geom_pointX, y = d3_geom_pointY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7;
                            function line(data) {
                              var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y);
                              function segment() {
                        Severity: Minor
                        Found in cabot/static/arachnys/js/d3.js - About 1 hr to fix

                          Function d3_geo_pathBuffer has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            function d3_geo_pathBuffer() {
                              var pointCircle = d3_geo_pathBufferCircle(4.5), buffer = [];
                              var stream = {
                                point: point,
                                lineStart: function() {
                          Severity: Minor
                          Found in cabot/static/arachnys/js/d3.js - About 1 hr to fix

                            Function point has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    point: function(λ, φ) {
                                      var point1 = [ λ, φ ], point2, v = visible(λ, φ), c = smallRadius ? v ? 0 : code(λ, φ) : v ? code(λ + (λ < 0 ? π : -π), φ) : 0;
                                      if (!point0 && (v00 = v0 = v)) listener.lineStart();
                                      if (v !== v0) {
                                        point2 = intersect(point0, point1);
                            Severity: Minor
                            Found in cabot/static/arachnys/js/d3.js - About 1 hr to fix

                              Function parseRows has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  dsv.parseRows = function(text, f) {
                                    var EOL = {}, EOF = {}, rows = [], N = text.length, I = 0, n = 0, t, eol;
                                    function token() {
                                      if (I >= N) return EOF;
                                      if (eol) return eol = false, EOL;
                              Severity: Minor
                              Found in cabot/static/arachnys/js/d3.js - About 1 hr to fix

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

                                    _mouseDrag: function(event) {
                                
                                        //Increase performance, avoid regex
                                        var data,
                                            el = this.helper, props = {},
                                Severity: Minor
                                Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

                                  Function set_up_html has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      Chosen.prototype.set_up_html = function() {
                                        var container_classes, container_props;
                                  
                                        container_classes = ["chosen-container"];
                                        container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
                                  Severity: Minor
                                  Found in cabot/static/theme/js/chosen.jquery.js - About 1 hr to fix

                                    Function result_select has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        Chosen.prototype.result_select = function(evt) {
                                          var high, item, selected_index;
                                    
                                          if (this.result_highlight) {
                                            high = this.result_highlight;
                                    Severity: Minor
                                    Found in cabot/static/theme/js/chosen.jquery.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language