opsforgeio/cabot

View on GitHub

Showing 1,637 of 1,637 total issues

Function _fnAddOptionsHtml has 111 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function _fnAddOptionsHtml ( oSettings )
    {
      /*
       * Create a temporary, empty, div which we can later on replace with what we have generated
       * we do it this way to rendering the 'options' html offline - speed :-)
Severity: Major
Found in cabot/static/theme/js/jquery.dataTables.min.js - About 4 hrs to fix

    Function chord has 111 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      d3.layout.chord = function() {
        var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords;
        function relayout() {
          var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;
          chords = [];
    Severity: Major
    Found in cabot/static/arachnys/js/d3.js - About 4 hrs to fix

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

        $.fn.typeahead = function (option) {
          return this.each(function () {
            var $this = $(this)
              , data = $this.data('typeahead')
              , options = typeof option == 'object' && option
      Severity: Major
      Found in cabot/static/theme/js/bootstrap.js and 3 other locations - About 4 hrs to fix
      cabot/static/theme/js/bootstrap.js on lines 545..553
      cabot/static/theme/js/bootstrap.js on lines 1208..1216
      cabot/static/theme/js/bootstrap.js on lines 1456..1464

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

      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.collapse = function (option) {
          return this.each(function () {
            var $this = $(this)
              , data = $this.data('collapse')
              , options = typeof option == 'object' && option
      Severity: Major
      Found in cabot/static/theme/js/bootstrap.js and 3 other locations - About 4 hrs to fix
      cabot/static/theme/js/bootstrap.js on lines 1208..1216
      cabot/static/theme/js/bootstrap.js on lines 1456..1464
      cabot/static/theme/js/bootstrap.js on lines 1893..1901

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

      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)
              , data = $this.data('scrollspy')
              , options = typeof option == 'object' && option
      Severity: Major
      Found in cabot/static/theme/js/bootstrap.js and 3 other locations - About 4 hrs to fix
      cabot/static/theme/js/bootstrap.js on lines 545..553
      cabot/static/theme/js/bootstrap.js on lines 1208..1216
      cabot/static/theme/js/bootstrap.js on lines 1893..1901

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

      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)
              , data = $this.data('tooltip')
              , options = typeof option == 'object' && option
      Severity: Major
      Found in cabot/static/theme/js/bootstrap.js and 3 other locations - About 4 hrs to fix
      cabot/static/theme/js/bootstrap.js on lines 545..553
      cabot/static/theme/js/bootstrap.js on lines 1456..1464
      cabot/static/theme/js/bootstrap.js on lines 1893..1901

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

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

        d3.layout.tree = function() {
          var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ], nodeSize = false;
          function tree(d, i) {
            var nodes = hierarchy.call(this, d, i), root = nodes[0];
            function firstWalk(node, previousSibling) {
      Severity: Major
      Found in cabot/static/arachnys/js/d3.js - About 4 hrs to fix

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

                            if ( that.orientation === "horizontal" ) {
                                if ( i === 0 ) {
                                    that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
                                }
                                if ( i === 1 ) {
        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 13185..13192

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

        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 ( i === 0 ) {
                                    that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
                                }
                                if ( i === 1 ) {
        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 13178..13185

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

        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 ( this._hasScroll() ) {
                    base = this.active.offset().top;
                    height = this.element.height();
                    this.active.prevAll( ".ui-menu-item" ).each(function() {
                        item = $( this );
        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 11971..11983

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

        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 ( this._hasScroll() ) {
                    base = this.active.offset().top;
                    height = this.element.height();
                    this.active.nextAll( ".ui-menu-item" ).each(function() {
                        item = $( this );
        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 11995..12006

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

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

            _create: function() {
        
                var n, i, handle, axis, hname,
                    that = this,
                    o = this.options;
        Severity: Major
        Found in cabot/static/theme/js/jquery-ui.js - About 4 hrs to fix

          Function brushstart has 106 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function brushstart() {
                var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), dragRestore = d3_event_dragSuppress(), center, origin = d3.mouse(target), offset;
                var w = d3.select(d3_window).on("keydown.brush", keydown).on("keyup.brush", keyup);
                if (d3.event.changedTouches) {
                  w.on("touchmove.brush", brushmove).on("touchend.brush", brushend);
          Severity: Major
          Found in cabot/static/arachnys/js/d3.js - About 4 hrs to fix

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

                __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
            Severity: Major
            Found in cabot/static/arachnys/js/morris.js and 1 other location - About 4 hrs to fix
            cabot/static/theme/js/chosen.jquery.js on lines 13..13

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

            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

                __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
            Severity: Major
            Found in cabot/static/theme/js/chosen.jquery.js and 1 other location - About 4 hrs to fix
            cabot/static/arachnys/js/morris.js on lines 5..5

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

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

              _registerMouseEvents: function() {
            
                var element = d3.select(this.element);
            
                var drag = {
            Severity: Major
            Found in cabot/static/arachnys/js/rickshaw.js - About 4 hrs to fix

              Function Local has 103 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Rickshaw.Fixtures.Time.Local = function() {
              
                var self = this;
              
                this.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
              Severity: Major
              Found in cabot/static/arachnys/js/rickshaw.js - About 4 hrs to fix

                Identical blocks of code found in 2 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/0001_initial.py on lines 292..300

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

                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

                        '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/0001_initial.py and 1 other location - About 4 hrs to fix
                cabot/cabotapp/migrations/0002_auto__add_field_statuscheck_verify_ssl_certificate.py on lines 115..123

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

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

                  d3.geom.quadtree = function(points, x1, y1, x2, y2) {
                    var x = d3_geom_pointX, y = d3_geom_pointY, compat;
                    if (compat = arguments.length) {
                      x = d3_geom_quadtreeCompatX;
                      y = d3_geom_quadtreeCompatY;
                Severity: Major
                Found in cabot/static/arachnys/js/d3.js - About 4 hrs to fix
                  Severity
                  Category
                  Status
                  Source
                  Language