opsforgeio/cabot

View on GitHub

Showing 1,637 of 1,637 total issues

Function parseDate has 148 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    parseDate: function (format, value, settings) {
        if (format == null || value == null) {
            throw "Invalid arguments";
        }

Severity: Major
Found in cabot/static/theme/js/jquery-ui.js - About 5 hrs to fix

    Function _fnDraw has 148 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function _fnDraw( oSettings )
        {
          /* Provide a pre-callback function which can be used to cancel the draw is false is returned */
          var aPreDraw = _fnCallbackFire( oSettings, 'aoPreDrawCallback', 'preDraw', [oSettings] );
          if ( $.inArray( false, aPreDraw ) !== -1 )
    Severity: Major
    Found in cabot/static/theme/js/jquery.dataTables.min.js - About 5 hrs to fix

      Function position has 147 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      $.fn.position = function( options ) {
          if ( !options || !options.of ) {
              return _position.apply( this, arguments );
          }
      
      
      Severity: Major
      Found in cabot/static/theme/js/jquery-ui.js - About 5 hrs to fix

        Function position has 147 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        $.fn.position = function( options ) {
            if ( !options || !options.of ) {
                return _position.apply( this, arguments );
            }
        
        
        Severity: Major
        Found in cabot/static/theme/js/jquery.ui.position.js - About 5 hrs to fix

          Function treemap has 146 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            d3.layout.treemap = function() {
              var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, mode = "squarify", ratio = .5 * (1 + Math.sqrt(5));
              function scale(children, k) {
                var i = -1, n = children.length, child, area;
                while (++i < n) {
          Severity: Major
          Found in cabot/static/arachnys/js/d3.js - About 5 hrs to fix

            Function Color has 146 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            Rickshaw.Fixtures.Color = function() {
            
              this.schemes = {};
            
              this.schemes.spectrum14 = [
            Severity: Major
            Found in cabot/static/arachnys/js/rickshaw.js - About 5 hrs to fix

              Function Donut has 143 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                Morris.Donut = (function(_super) {
              
                  __extends(Donut, _super);
              
                  Donut.prototype.defaults = {
              Severity: Major
              Found in cabot/static/arachnys/js/morris.js - About 5 hrs to fix

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        u'cabotapp.statuscheckresult': {
                            'Meta': {'ordering': "['-time_complete']", 'object_name': 'StatusCheckResult'},
                            'check': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['cabotapp.StatusCheck']"}),
                            'error': ('django.db.models.fields.TextField', [], {'null': 'True'}),
                            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
                cabot/cabotapp/migrations/0014_auto__add_alertacknowledgement.py on lines 172..181

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 93.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        u'cabotapp.statuscheckresult': {
                            'Meta': {'ordering': "['-time_complete']", 'object_name': 'StatusCheckResult'},
                            'check': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['cabotapp.StatusCheck']"}),
                            'error': ('django.db.models.fields.TextField', [], {'null': 'True'}),
                            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
                cabot/cabotapp/migrations/0015_auto__add_field_alertacknowledgement_cancelled_time__add_field_alertac.py on lines 178..187

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 93.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                  d3_selectionPrototype.html = function(value) {
                    return arguments.length ? this.each(typeof value === "function" ? function() {
                      var v = value.apply(this, arguments);
                      this.innerHTML = v == null ? "" : v;
                    } : value == null ? function() {
                Severity: Major
                Found in cabot/static/arachnys/js/d3.js and 1 other location - About 5 hrs to fix
                cabot/static/arachnys/js/d3.js on lines 703..712

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 145.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                  d3_selectionPrototype.text = function(value) {
                    return arguments.length ? this.each(typeof value === "function" ? function() {
                      var v = value.apply(this, arguments);
                      this.textContent = v == null ? "" : v;
                    } : value == null ? function() {
                Severity: Major
                Found in cabot/static/arachnys/js/d3.js and 1 other location - About 5 hrs to fix
                cabot/static/arachnys/js/d3.js on lines 713..722

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 145.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Function addArrow has 137 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    addArrow = function (o, value, isEnd) {
                        if (o.type == "path") {
                            var values = Str(value).toLowerCase().split("-"),
                                p = o.paper,
                                se = isEnd ? "end" : "start",
                Severity: Major
                Found in cabot/static/arachnys/js/raphael.js - About 5 hrs to fix

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                    if (abs_y >= 1000000000000)   { return y / 1000000000000 + "T" }
                    else if (abs_y >= 1000000000) { return y / 1000000000 + "B" }
                    else if (abs_y >= 1000000)    { return y / 1000000 + "M" }
                    else if (abs_y >= 1000)       { return y / 1000 + "K" }
                    else if (abs_y < 1 && y > 0)  { return y.toFixed(2) }
                  Severity: Major
                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 5 hrs to fix
                  cabot/static/arachnys/js/rickshaw.js on lines 1150..1156

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 144.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      else if (abs_y >= 1099511627776){ return y / 1099511627776 + "T" }
                      else if (abs_y >= 1073741824)   { return y / 1073741824 + "G" }
                      else if (abs_y >= 1048576)      { return y / 1048576 + "M" }
                      else if (abs_y >= 1024)         { return y / 1024 + "K" }
                      else if (abs_y < 1 && y > 0)    { return y.toFixed(2) }
                  Severity: Major
                  Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 5 hrs to fix
                  cabot/static/arachnys/js/rickshaw.js on lines 1138..1144

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 144.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

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

                      _create: function() {
                          this.element.closest( "form" )
                              .unbind( "reset" + this.eventNamespace )
                              .bind( "reset" + this.eventNamespace, formResetHandler );
                  
                  
                  Severity: Major
                  Found in cabot/static/theme/js/jquery-ui.js - About 5 hrs to fix

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

                        Grid.prototype.setData = function(data, redraw) {
                          var e, idx, index, maxGoal, minGoal, ret, row, step, total, y, ykey, ymax, ymin, yval;
                          if (redraw == null) {
                            redraw = true;
                          }
                    Severity: Major
                    Found in cabot/static/arachnys/js/morris.js - About 5 hrs to fix

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                              } else {
                                uncle = grandpa.L;
                                if (uncle && uncle.C) {
                                  parent.C = uncle.C = false;
                                  grandpa.C = true;
                      Severity: Major
                      Found in cabot/static/arachnys/js/d3.js and 1 other location - About 5 hrs to fix
                      cabot/static/arachnys/js/d3.js on lines 5189..5205

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 141.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                                      pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
                      Severity: Major
                      Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 5 hrs to fix
                      cabot/static/theme/js/jquery-ui.js on lines 4599..4599

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 141.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                              if (parent === grandpa.L) {
                                uncle = grandpa.R;
                                if (uncle && uncle.C) {
                                  parent.C = uncle.C = false;
                                  grandpa.C = true;
                      Severity: Major
                      Found in cabot/static/arachnys/js/d3.js and 1 other location - About 5 hrs to fix
                      cabot/static/arachnys/js/d3.js on lines 5205..5221

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 141.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                                      pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
                      Severity: Major
                      Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 5 hrs to fix
                      cabot/static/theme/js/jquery-ui.js on lines 4602..4602

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 141.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Severity
                      Category
                      Status
                      Source
                      Language