opsforgeio/cabot

View on GitHub

Showing 1,637 of 1,637 total issues

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

  $(window).on('load', function () {
    $('[data-spy="scroll"]').each(function () {
      var $spy = $(this)
      $spy.scrollspy($spy.data())
    })
Severity: Major
Found in cabot/static/theme/js/bootstrap.js and 1 other location - About 1 hr to fix
cabot/static/bootstrap/js/bootstrap.js on lines 425..430

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

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

                if(event.pageY - this.offset.click.top > this.containment[3]) {
                    pageY = this.containment[3] + this.offset.click.top;
                }
Severity: Major
Found in cabot/static/theme/js/jquery-ui.js and 3 other locations - About 1 hr to fix
cabot/static/theme/js/jquery-ui.js on lines 4583..4585
cabot/static/theme/js/jquery-ui.js on lines 4586..4588
cabot/static/theme/js/jquery-ui.js on lines 4589..4591

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

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

            if (options.get('chartRangeMinX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMinX') < this.minx)) {
                this.minx = options.get('chartRangeMinX');
            }
Severity: Major
Found in cabot/static/theme/js/jquery.sparkline.min.js and 5 other locations - About 1 hr to fix
cabot/static/theme/js/jquery.sparkline.min.js on lines 1489..1491
cabot/static/theme/js/jquery.sparkline.min.js on lines 1492..1494
cabot/static/theme/js/jquery.sparkline.min.js on lines 1498..1500
cabot/static/theme/js/jquery.sparkline.min.js on lines 2071..2073
cabot/static/theme/js/jquery.sparkline.min.js on lines 2074..2076

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

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

                if(event.pageY - this.offset.click.top < this.containment[1]) {
                    pageY = this.containment[1] + this.offset.click.top;
                }
Severity: Major
Found in cabot/static/theme/js/jquery-ui.js and 3 other locations - About 1 hr to fix
cabot/static/theme/js/jquery-ui.js on lines 4583..4585
cabot/static/theme/js/jquery-ui.js on lines 4589..4591
cabot/static/theme/js/jquery-ui.js on lines 4592..4594

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

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

                if(event.pageX - this.offset.click.left > this.containment[2]) {
                    pageX = this.containment[2] + this.offset.click.left;
                }
Severity: Major
Found in cabot/static/theme/js/jquery-ui.js and 3 other locations - About 1 hr to fix
cabot/static/theme/js/jquery-ui.js on lines 4583..4585
cabot/static/theme/js/jquery-ui.js on lines 4586..4588
cabot/static/theme/js/jquery-ui.js on lines 4592..4594

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

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(bs) {
                    ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
                }
Severity: Major
Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 1 hr to fix
cabot/static/theme/js/jquery-ui.js on lines 1848..1850

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

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 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 _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 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 _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 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 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 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 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

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

                            woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width );
                    Severity: Major
                    Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 1 hr to fix
                    cabot/static/theme/js/jquery-ui.js on lines 3042..3042

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

                    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

                            H = (C == 0 ? null :
                                 M == r ? (g - b) / C :
                                 M == g ? (b - r) / C + 2 :
                                          (r - g) / C + 4);
                    Severity: Major
                    Found in cabot/static/arachnys/js/raphael.js and 1 other location - About 1 hr to fix
                    cabot/static/arachnys/js/raphael.js on lines 730..734

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

                    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

                            hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );
                    Severity: Major
                    Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 1 hr to fix
                    cabot/static/theme/js/jquery-ui.js on lines 3041..3041

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

                    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

                            H = (C == 0 ? null :
                                 V == r ? (g - b) / C :
                                 V == g ? (b - r) / C + 2 :
                                          (r - g) / C + 4
                                );
                    Severity: Major
                    Found in cabot/static/arachnys/js/raphael.js and 1 other location - About 1 hr to fix
                    cabot/static/arachnys/js/raphael.js on lines 750..753

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

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