opsforgeio/cabot

View on GitHub

Showing 1,637 of 1,637 total issues

Function init has 122 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        init: function (el, values, options, width, height) {
            var barWidth = parseInt(options.get('barWidth'), 10),
                barSpacing = parseInt(options.get('barSpacing'), 10),
                chartRangeMin = options.get('chartRangeMin'),
                chartRangeMax = options.get('chartRangeMax'),
Severity: Major
Found in cabot/static/theme/js/jquery.sparkline.min.js - About 4 hrs to fix

    Function axis has 122 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      d3.svg.axis = function() {
        var scale = d3.scale.linear(), orient = d3_svg_axisDefaultOrient, innerTickSize = 6, outerTickSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_;
        function axis(g) {
          g.each(function() {
            var g = d3.select(this);
    Severity: Major
    Found in cabot/static/arachnys/js/d3.js - About 4 hrs to fix

      Function animation has 121 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              animation = function () {
                  var Now = +new Date,
                      l = 0;
                  for (; l < animationElements.length; l++) {
                      var e = animationElements[l];
      Severity: Major
      Found in cabot/static/arachnys/js/raphael.js - About 4 hrs to fix

        Function support has 119 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        jQuery.support = (function( support ) {
        
          var all, a, input, select, fragment, opt, eventName, isSupported, i,
            div = document.createElement("div");
        
        
        Severity: Major
        Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 4 hrs to fix

          Function ClassList has 115 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          Rickshaw.Compat.ClassList = function() {
          
            /* adapted from http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
          
            if (typeof document !== "undefined" && !("classList" in document.createElement("a"))) {
          Severity: Major
          Found in cabot/static/arachnys/js/rickshaw.js - About 4 hrs to fix

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

              $.fn.popover = function (option) {
                return this.each(function () {
                  var $this   = $(this)
                  var data    = $this.data('bs.popover')
                  var options = typeof option == 'object' && option
            Severity: Major
            Found in cabot/static/bootstrap/js/bootstrap.js and 3 other locations - About 4 hrs to fix
            cabot/static/bootstrap/js/bootstrap.js on lines 1199..1208
            cabot/static/bootstrap/js/bootstrap.js on lines 1562..1571
            cabot/static/bootstrap/js/bootstrap.js on lines 1908..1917

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

            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 4 locations. Consider refactoring.
            Open

              $.fn.affix = function (option) {
                return this.each(function () {
                  var $this   = $(this)
                  var data    = $this.data('bs.affix')
                  var options = typeof option == 'object' && option
            Severity: Major
            Found in cabot/static/bootstrap/js/bootstrap.js and 3 other locations - About 4 hrs to fix
            cabot/static/bootstrap/js/bootstrap.js on lines 1199..1208
            cabot/static/bootstrap/js/bootstrap.js on lines 1317..1326
            cabot/static/bootstrap/js/bootstrap.js on lines 1908..1917

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

            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 4 locations. Consider refactoring.
            Open

              $.fn.tooltip = function (option) {
                return this.each(function () {
                  var $this   = $(this)
                  var data    = $this.data('bs.tooltip')
                  var options = typeof option == 'object' && option
            Severity: Major
            Found in cabot/static/bootstrap/js/bootstrap.js and 3 other locations - About 4 hrs to fix
            cabot/static/bootstrap/js/bootstrap.js on lines 1317..1326
            cabot/static/bootstrap/js/bootstrap.js on lines 1562..1571
            cabot/static/bootstrap/js/bootstrap.js on lines 1908..1917

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

            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 4 locations. Consider refactoring.
            Open

              $.fn.scrollspy = function (option) {
                return this.each(function () {
                  var $this   = $(this)
                  var data    = $this.data('bs.scrollspy')
                  var options = typeof option == 'object' && option
            Severity: Major
            Found in cabot/static/bootstrap/js/bootstrap.js and 3 other locations - About 4 hrs to fix
            cabot/static/bootstrap/js/bootstrap.js on lines 1199..1208
            cabot/static/bootstrap/js/bootstrap.js on lines 1317..1326
            cabot/static/bootstrap/js/bootstrap.js on lines 1562..1571

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

            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 (x) {
                      if (xExtentDomain) {
                        x0 = xExtentDomain[0], x1 = xExtentDomain[1];
                      } else {
                        x0 = xExtent[0], x1 = xExtent[1];
            Severity: Major
            Found in cabot/static/arachnys/js/d3.js and 1 other location - About 4 hrs to fix
            cabot/static/arachnys/js/d3.js on lines 9041..9049

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

            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 (y) {
                      if (yExtentDomain) {
                        y0 = yExtentDomain[0], y1 = yExtentDomain[1];
                      } else {
                        y0 = yExtent[0], y1 = yExtent[1];
            Severity: Major
            Found in cabot/static/arachnys/js/d3.js and 1 other location - About 4 hrs to fix
            cabot/static/arachnys/js/d3.js on lines 9032..9040

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

            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 4 locations. Consider refactoring.
            Open

                    'cabotapp.statuscheckresult': {
                        'Meta': {'object_name': 'StatusCheckResult'},
                        'check': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cabotapp.StatusCheck']"}),
                        'error': ('django.db.models.fields.TextField', [], {'null': 'True'}),
                        'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            Severity: Major
            Found in cabot/cabotapp/migrations/0005_auto__add_instance.py and 3 other locations - About 4 hrs to fix
            cabot/cabotapp/migrations/0004_auto.py on lines 113..121
            cabot/cabotapp/migrations/0006_auto__chg_field_statuscheck_created_by.py on lines 131..139
            cabot/cabotapp/migrations/0007_auto__add_instancestatussnapshot.py on lines 152..160

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

            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 4 locations. Consider refactoring.
            Open

                    'cabotapp.statuscheckresult': {
                        'Meta': {'object_name': 'StatusCheckResult'},
                        'check': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cabotapp.StatusCheck']"}),
                        'error': ('django.db.models.fields.TextField', [], {'null': 'True'}),
                        'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            cabot/cabotapp/migrations/0004_auto.py on lines 113..121
            cabot/cabotapp/migrations/0005_auto__add_instance.py on lines 178..186
            cabot/cabotapp/migrations/0007_auto__add_instancestatussnapshot.py on lines 152..160

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

            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 4 locations. Consider refactoring.
            Open

                    'cabotapp.statuscheckresult': {
                        'Meta': {'object_name': 'StatusCheckResult'},
                        'check': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cabotapp.StatusCheck']"}),
                        'error': ('django.db.models.fields.TextField', [], {'null': 'True'}),
                        'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            Severity: Major
            Found in cabot/cabotapp/migrations/0004_auto.py and 3 other locations - About 4 hrs to fix
            cabot/cabotapp/migrations/0005_auto__add_instance.py on lines 178..186
            cabot/cabotapp/migrations/0006_auto__chg_field_statuscheck_created_by.py on lines 131..139
            cabot/cabotapp/migrations/0007_auto__add_instancestatussnapshot.py on lines 152..160

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

            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 4 locations. Consider refactoring.
            Open

                    'cabotapp.statuscheckresult': {
                        'Meta': {'object_name': 'StatusCheckResult'},
                        'check': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cabotapp.StatusCheck']"}),
                        'error': ('django.db.models.fields.TextField', [], {'null': 'True'}),
                        'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            cabot/cabotapp/migrations/0004_auto.py on lines 113..121
            cabot/cabotapp/migrations/0005_auto__add_instance.py on lines 178..186
            cabot/cabotapp/migrations/0006_auto__chg_field_statuscheck_created_by.py on lines 131..139

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

            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 _fnFeatureHtmlTable has 113 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function _fnFeatureHtmlTable ( oSettings )
                {
                  /* Check if scrolling is enabled or not - if not then leave the DOM unaltered */
                  if ( oSettings.oScroll.sX === "" && oSettings.oScroll.sY === "" )
                  {
            Severity: Major
            Found in cabot/static/theme/js/jquery.dataTables.min.js - About 4 hrs to fix

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

                $.fn.popover = function (option) {
                  return this.each(function () {
                    var $this = $(this)
                      , data = $this.data('popover')
                      , options = typeof option == 'object' && option
              Severity: Major
              Found in cabot/static/theme/js/bootstrap.js and 1 other location - About 4 hrs to fix
              cabot/static/theme/js/bootstrap.js on lines 1995..2003

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

              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 = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= 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 4 hrs to fix
              cabot/static/theme/js/jquery-ui.js on lines 1492..1492

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

              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 = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= 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 4 hrs to fix
              cabot/static/theme/js/jquery-ui.js on lines 1495..1495

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

              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

                $.fn.affix = function (option) {
                  return this.each(function () {
                    var $this = $(this)
                      , data = $this.data('affix')
                      , options = typeof option == 'object' && option
              Severity: Major
              Found in cabot/static/theme/js/bootstrap.js and 1 other location - About 4 hrs to fix
              cabot/static/theme/js/bootstrap.js on lines 1314..1322

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

              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