opsforgeio/cabot

View on GitHub

Showing 1,637 of 1,637 total issues

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

                } else {
                    o._.arrows.startPath && markerCounter[o._.arrows.startPath]--;
                    o._.arrows.startMarker && markerCounter[o._.arrows.startMarker]--;
                }
Severity: Major
Found in cabot/static/arachnys/js/raphael.js and 1 other location - About 2 hrs to fix
cabot/static/arachnys/js/raphael.js on lines 3939..3942

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

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

    zoom.y = function(z) {
      if (!arguments.length) return y1;
      y1 = z;
      y0 = z.copy();
      view = {
Severity: Major
Found in cabot/static/arachnys/js/d3.js and 1 other location - About 2 hrs to fix
cabot/static/arachnys/js/d3.js on lines 1295..1305

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

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

            isOval = ovalTypes[o.type] && (a.cx != params.cx || a.cy != params.cy || a.r != params.r || a.rx != params.rx || a.ry != params.ry),
Severity: Major
Found in cabot/static/arachnys/js/raphael.js and 1 other location - About 2 hrs to fix
cabot/static/arachnys/js/raphael.js on lines 4996..4996

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

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

    zoom.x = function(z) {
      if (!arguments.length) return x1;
      x1 = z;
      x0 = z.copy();
      view = {
Severity: Major
Found in cabot/static/arachnys/js/d3.js and 1 other location - About 2 hrs to fix
cabot/static/arachnys/js/d3.js on lines 1306..1316

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

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 (isEnd) {
                    o._.arrows.endPath && markerCounter[o._.arrows.endPath]--;
                    o._.arrows.endMarker && markerCounter[o._.arrows.endMarker]--;
                } else {
Severity: Major
Found in cabot/static/arachnys/js/raphael.js and 1 other location - About 2 hrs to fix
cabot/static/arachnys/js/raphael.js on lines 3942..3945

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

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

            newpath = pathTypes[o.type] && (params.x != a.x || params.y != a.y || params.width != a.width || params.height != a.height || params.cx != a.cx || params.cy != a.cy || params.rx != a.rx || params.ry != a.ry || params.r != a.r),
Severity: Major
Found in cabot/static/arachnys/js/raphael.js and 1 other location - About 2 hrs to fix
cabot/static/arachnys/js/raphael.js on lines 4997..4997

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

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 Local has a Cognitive Complexity of 16 (exceeds 5 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: Minor
Found in cabot/static/arachnys/js/rickshaw.js - About 2 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function keydown has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            keydown: function( event ) {
                /*jshint maxcomplexity:15*/
                if ( this.element.prop( "readOnly" ) ) {
                    suppressKeyPress = true;
                    suppressInput = true;
Severity: Major
Found in cabot/static/theme/js/jquery.ui.autocomplete.js - About 2 hrs to fix

    Function keydown has 52 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                keydown: function( event ) {
                    /*jshint maxcomplexity:15*/
                    if ( this.element.prop( "readOnly" ) ) {
                        suppressKeyPress = true;
                        suppressInput = true;
    Severity: Major
    Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

      Function _processTabs has 52 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _processTabs: function() {
              var that = this;
      
              this.tablist = this._getList()
                  .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
      Severity: Major
      Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

        Function _refreshValue has 52 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _refreshValue: function() {
                var lastValPercent, valPercent, value, valueMin, valueMax,
                    oRange = this.options.range,
                    o = this.options,
                    that = this,
        Severity: Major
        Found in cabot/static/theme/js/jquery-ui.js - About 2 hrs to fix

          Function fnUpdate has 52 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              this.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction )
              {
                var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
                var i, iLen, sDisplay;
                var iRow = (typeof mRow === 'object') ?
          Severity: Major
          Found in cabot/static/theme/js/jquery.dataTables.min.js - About 2 hrs to fix

            Function d3_geom_clipLine has 52 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function d3_geom_clipLine(x0, y0, x1, y1) {
                return function(line) {
                  var a = line.a, b = line.b, ax = a.x, ay = a.y, bx = b.x, by = b.y, t0 = 0, t1 = 1, dx = bx - ax, dy = by - ay, r;
                  r = x0 - ax;
                  if (!dx && r > 0) return;
            Severity: Major
            Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

              Function event has 52 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  brush.event = function(g) {
                    g.each(function() {
                      var event_ = event.of(this, arguments), extent1 = {
                        x: xExtent,
                        y: yExtent,
              Severity: Major
              Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

                Function d3_geom_voronoiAddBeach has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function d3_geom_voronoiAddBeach(site) {
                    var x = site.x, directrix = site.y, lArc, rArc, dxl, dxr, node = d3_geom_voronoiBeaches._;
                    while (node) {
                      dxl = d3_geom_voronoiLeftBreakPoint(node, directrix) - x;
                      if (dxl > ε) node = node.L; else {
                Severity: Major
                Found in cabot/static/arachnys/js/d3.js - About 2 hrs to fix

                  Function drawXAxis has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      Line.prototype.drawXAxis = function() {
                        var drawLabel, l, labels, prevAngleMargin, prevLabelMargin, row, ypos, _i, _len, _results,
                          _this = this;
                        ypos = this.bottom + this.options.padding / 2;
                        prevLabelMargin = null;
                  Severity: Major
                  Found in cabot/static/arachnys/js/morris.js - About 2 hrs to fix

                    Function Time has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Rickshaw.Graph.Axis.Time = function(args) {
                    
                      var self = this;
                    
                      this.graph = args.graph;
                    Severity: Major
                    Found in cabot/static/arachnys/js/rickshaw.js - About 2 hrs to fix

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

                                          if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }
                      Severity: Major
                      Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 2 hrs to fix
                      cabot/static/theme/js/jquery-ui.js on lines 4282..4282

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

                      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(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }
                      Severity: Major
                      Found in cabot/static/theme/js/jquery-ui.js and 1 other location - About 2 hrs to fix
                      cabot/static/theme/js/jquery-ui.js on lines 4283..4283

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

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

                          function _fnSetObjectDataFn( mSource )
                          {
                            if ( mSource === null )
                            {
                              /* Nothing to do when the data source is null */
                      Severity: Major
                      Found in cabot/static/theme/js/jquery.dataTables.min.js - About 2 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language