opsforgeio/cabot

View on GitHub

Showing 1,637 of 1,637 total issues

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

  hide: function() {
    this.visible = false;
    this.element.classList.add('inactive');

    if (typeof this.onHide == 'function') {
Severity: Major
Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 1 hr to fix
cabot/static/arachnys/js/rickshaw.js on lines 2156..2163

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

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

                co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.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 4524..4524

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

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

  show: function() {
    this.visible = true;
    this.element.classList.remove('inactive');

    if (typeof this.onShow == 'function') {
Severity: Major
Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 1 hr to fix
cabot/static/arachnys/js/rickshaw.js on lines 2147..2154

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

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

        scanValues: function () {
            var values = this.values,
                valcount = values.length,
                xvalues = this.xvalues,
                yvalues = this.yvalues,
Severity: Minor
Found in cabot/static/theme/js/jquery.sparkline.min.js - About 1 hr to fix

    Function bridge has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    $.widget.bridge = function( name, object ) {
        var fullName = object.prototype.widgetFullName || name;
        $.fn[ name ] = function( options ) {
            var isMethodCall = typeof options === "string",
                args = slice.call( arguments, 1 ),
    Severity: Minor
    Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

      Function _optionDatepicker has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _optionDatepicker: function(target, name, value) {
              var settings, date, minDate, maxDate,
                  inst = this._getInst(target);
      
              if (arguments.length === 2 && typeof name === "string") {
      Severity: Minor
      Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix

        Function getLengthFactory has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            getLengthFactory = function (istotal, subpath) {
                return function (path, length, onlystart) {
                    path = path2curve(path);
                    var x, y, p, l, sp = "", subpaths = {}, point,
                        len = 0;
        Severity: Minor
        Found in cabot/static/arachnys/js/raphael.js - About 1 hr to fix

          Function text has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              R._engine.text = function (vml, x, y, text) {
                  var el = createNode("shape"),
                      path = createNode("path"),
                      o = createNode("textpath");
                  x = x || 0;
          Severity: Minor
          Found in cabot/static/arachnys/js/raphael.js - About 1 hr to fix

            Function setCoords has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    setCoords = function (p, sx, sy, dx, dy, deg) {
                        var _ = p._,
                            m = p.matrix,
                            fillpos = _.fillpos,
                            o = p.node,
            Severity: Minor
            Found in cabot/static/arachnys/js/raphael.js - About 1 hr to fix

              Function pack has 39 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                d3.layout.pack = function() {
                  var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ], radius;
                  function pack(d, i) {
                    var nodes = hierarchy.call(this, d, i), root = nodes[0], w = size[0], h = size[1], r = radius == null ? Math.sqrt : typeof radius === "function" ? radius : function() {
                      return radius;
              Severity: Minor
              Found in cabot/static/arachnys/js/d3.js - About 1 hr to fix

                Function linePoint has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      function linePoint(x, y) {
                        x = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, x));
                        y = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, y));
                        var v = pointVisible(x, y);
                        if (polygon) ring.push([ x, y ]);
                Severity: Minor
                Found in cabot/static/arachnys/js/d3.js - About 1 hr to fix

                  Function paths has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        return this.paths = (function() {
                          var _i, _ref, _ref1, _results;
                          _results = [];
                          for (i = _i = 0, _ref = this.options.ykeys.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
                            smooth = this.options.smooth === true || (_ref1 = this.options.ykeys[i], __indexOf.call(this.options.smooth, _ref1) >= 0);
                  Severity: Minor
                  Found in cabot/static/arachnys/js/morris.js - About 1 hr to fix

                    Function extent has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        brush.extent = function(z) {
                          var x0, x1, y0, y1, t;
                          if (!arguments.length) {
                            if (x) {
                              if (xExtentDomain) {
                    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

                                while ( nTd )
                                {
                                  sNodeName = nTd.nodeName.toLowerCase();
                                  if ( sNodeName == 'td' || sNodeName == 'th' )
                                  {
                      Severity: Major
                      Found in cabot/static/theme/js/jquery.dataTables.min.js and 1 other location - About 1 hr to fix
                      cabot/static/theme/js/jquery.dataTables.min.js on lines 584..592

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

                      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

                              while ( nTd )
                              {
                                sNodeName = nTd.nodeName.toUpperCase();
                                if ( sNodeName == "TD" || sNodeName == "TH" )
                                {
                      Severity: Major
                      Found in cabot/static/theme/js/jquery.dataTables.min.js and 1 other location - About 1 hr to fix
                      cabot/static/theme/js/jquery.dataTables.min.js on lines 4666..4674

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

                      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

                            var nodes = vis.selectAll("path")
                              .data(series.stack.filter( function(d) { return d.y !== null } ))
                              .enter().append("svg:circle")
                                .attr("cx", function(d) { return graph.x(d.x) })
                      Severity: Major
                      Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 1 hr to fix
                      cabot/static/arachnys/js/rickshaw.js on lines 3217..3220

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

                      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

                                      case 36: if (event.ctrlKey || event.metaKey) {
                                                  $.datepicker._gotoToday(event.target);
                                              }
                                              handled = event.ctrlKey || event.metaKey;
                                              break; // current on ctrl or command +home
                      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 8185..8189

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

                      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

                                      case 35: if (event.ctrlKey || event.metaKey) {
                                                  $.datepicker._clearDate(event.target);
                                              }
                                              handled = event.ctrlKey || event.metaKey;
                                              break; // clear on ctrl or command +end
                      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 8190..8194

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

                      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

                            var nodes = vis.selectAll("path")
                              .data(series.stack.filter( function(d) { return d.y !== null } ))
                              .enter().append("svg:rect")
                              .attr("x", function(d) { return graph.x(d.x) + barXOffset })
                      Severity: Major
                      Found in cabot/static/arachnys/js/rickshaw.js and 1 other location - About 1 hr to fix
                      cabot/static/arachnys/js/rickshaw.js on lines 3399..3402

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

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

                          _on: function( suppressDisabledCheck, element, handlers ) {
                              var delegateElement,
                                  instance = this;
                      
                              // no suppressDisabledCheck flag, shuffle arguments
                      Severity: Minor
                      Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language