opsforgeio/cabot

View on GitHub

Showing 1,637 of 1,637 total issues

Function path has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  d3.geo.path = function() {
    var pointRadius = 4.5, projection, context, projectStream, contextStream, cacheStream;
    function path(object) {
      if (object) {
        if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments));
Severity: Minor
Found in cabot/static/arachnys/js/d3.js - About 1 hr to fix

    Function addAnchor has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      this.addAnchor = function(line) {
        var anchor = document.createElement('a');
        anchor.innerHTML = '✔';
        anchor.classList.add('action');
        line.element.insertBefore(anchor, line.element.firstChild);
    Severity: Minor
    Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

      Function select has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function select( selector, context, results, seed ) {
        var i, tokens, token, type, find,
          match = tokenize( selector );
      
        if ( !seed ) {
      Severity: Minor
      Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 1 hr to fix

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

                this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.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 2567..2567

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

        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 (dx < 0) {
                if (r < t0) return;
                if (r < t1) t1 = r;
              } else if (dx > 0) {
                if (r > t1) return;
        Severity: Major
        Found in cabot/static/arachnys/js/d3.js and 3 other locations - About 1 hr to fix
        cabot/static/arachnys/js/d3.js on lines 3539..3545
        cabot/static/arachnys/js/d3.js on lines 3549..3555
        cabot/static/arachnys/js/d3.js on lines 3559..3565

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

        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

                getRegion: function (el, x, y) {
                    var shapeid = this.target.getShapeAt(el, x, y);
                    return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;
                },
        Severity: Major
        Found in cabot/static/theme/js/jquery.sparkline.min.js and 1 other location - About 1 hr to fix
        cabot/static/theme/js/jquery.sparkline.min.js on lines 2157..2160

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

        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 (dy < 0) {
                if (r > t1) return;
                if (r > t0) t0 = r;
              } else if (dy > 0) {
                if (r < t0) return;
        Severity: Major
        Found in cabot/static/arachnys/js/d3.js and 3 other locations - About 1 hr to fix
        cabot/static/arachnys/js/d3.js on lines 3529..3535
        cabot/static/arachnys/js/d3.js on lines 3539..3545
        cabot/static/arachnys/js/d3.js on lines 3549..3555

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

        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 (dx < 0) {
                if (r > t1) return;
                if (r > t0) t0 = r;
              } else if (dx > 0) {
                if (r < t0) return;
        Severity: Major
        Found in cabot/static/arachnys/js/d3.js and 3 other locations - About 1 hr to fix
        cabot/static/arachnys/js/d3.js on lines 3529..3535
        cabot/static/arachnys/js/d3.js on lines 3549..3555
        cabot/static/arachnys/js/d3.js on lines 3559..3565

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

        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 (dy < 0) {
                if (r < t0) return;
                if (r < t1) t1 = r;
              } else if (dy > 0) {
                if (r > t1) return;
        Severity: Major
        Found in cabot/static/arachnys/js/d3.js and 3 other locations - About 1 hr to fix
        cabot/static/arachnys/js/d3.js on lines 3529..3535
        cabot/static/arachnys/js/d3.js on lines 3539..3545
        cabot/static/arachnys/js/d3.js on lines 3559..3565

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

        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

                event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
        Severity: Major
        Found in cabot/static/bootstrap/js/jquery-1.10.2.js and 1 other location - About 1 hr to fix
        cabot/static/bootstrap/js/jquery-1.10.2.js on lines 5242..5242

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

        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

                event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
        Severity: Major
        Found in cabot/static/bootstrap/js/jquery-1.10.2.js and 1 other location - About 1 hr to fix
        cabot/static/bootstrap/js/jquery-1.10.2.js on lines 5241..5241

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

        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

                this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.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 2566..2566

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

        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

                getRegion: function (el, x, y) {
                    var shapeid = this.target.getShapeAt(el, x, y);
                    return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;
                },
        Severity: Major
        Found in cabot/static/theme/js/jquery.sparkline.min.js and 1 other location - About 1 hr to fix
        cabot/static/theme/js/jquery.sparkline.min.js on lines 2280..2283

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

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

            _mouseStart: function(event) {
        
                var o = this.options;
        
                //Create and append the visible helper
        Severity: Minor
        Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

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

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

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

                _setContainment: function() {
            
                    var over, c, ce,
                        o = this.options;
            
            
            Severity: Minor
            Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

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

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

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

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

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

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

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

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