opsforgeio/cabot

View on GitHub

Showing 1,637 of 1,637 total issues

Function d3_geo_pointInPolygon has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function d3_geo_pointInPolygon(point, polygon) {
    var meridian = point[0], parallel = point[1], meridianNormal = [ Math.sin(meridian), -Math.cos(meridian), 0 ], polarAngle = 0, winding = 0;
    d3_geo_areaRingSum.reset();
    for (var i = 0, n = polygon.length; i < n; ++i) {
      var ring = polygon[i], m = ring.length;
Severity: Minor
Found in cabot/static/arachnys/js/d3.js - About 1 hr to fix

    Function brushmove has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          function brushmove() {
            var point = d3.mouse(target), moved = false;
            if (offset) {
              point[0] += offset[0];
              point[1] += offset[1];
    Severity: Minor
    Found in cabot/static/arachnys/js/d3.js - About 1 hr to fix

      Function initialize has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        this.initialize = function(args) {
      
          if (!args.element) throw "Rickshaw.Graph needs a reference to an element";
          if (args.element.nodeType !== 1) throw "Rickshaw.Graph element was defined but not an HTML element";
      
      
      Severity: Minor
      Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

        Function _groups has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          _groups: function() {
        
            var graph = this.graph;
        
            var renderGroups = {};
        Severity: Minor
        Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

          Function setup has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              setup: function() {
          
                if ( rformElems.test( this.nodeName ) ) {
                  // IE doesn't fire change on a check/radio until blur; trigger it on click
                  // after a propertychange. Eat the blur-change in special.change.handle.
          Severity: Minor
          Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 1 hr to fix

            Function validateSeries has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              this.validateSeries = function(series) {
            
                if (!Array.isArray(series) && !(series instanceof Rickshaw.Series)) {
                  var seriesSignature = Object.prototype.toString.apply(series);
                  throw "series is not an array: " + seriesSignature;
            Severity: Minor
            Found in cabot/static/arachnys/js/rickshaw.js - About 1 hr to fix

              Function propFilter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function propFilter( props, specialEasing ) {
                var index, name, easing, value, hooks;
              
                // camelCase, specialEasing and expand cssHook pass
                for ( index in props ) {
              Severity: Minor
              Found in cabot/static/bootstrap/js/jquery-1.10.2.js - About 1 hr to fix

                Function activate has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  Tab.prototype.activate = function (element, container, callback) {
                    var $active    = container.find('> .active')
                    var transition = callback
                      && $.support.transition
                      && $active.hasClass('fade')
                Severity: Minor
                Found in cabot/static/bootstrap/js/bootstrap.js - About 1 hr to fix

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

                    this.unit = function(unitName) {
                      return this.units.filter( function(unit) { return unitName == unit.name } ).shift();
                    };
                  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 952..954

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

                  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

                                  return "m" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)];
                  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 2140..2140

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

                  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

                      graticule.step = function(_) {
                        if (!arguments.length) return graticule.minorStep();
                        return graticule.majorStep(_).minorStep(_);
                      };
                  Severity: Major
                  Found in cabot/static/arachnys/js/d3.js and 1 other location - About 1 hr to fix
                  cabot/static/arachnys/js/d3.js on lines 4432..4435

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

                  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 ( jQuery.isFunction( html ) ) {
                        return this.each(function(i) {
                          jQuery(this).wrapInner( html.call(this, i) );
                        });
                      }
                  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 6730..6734

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

                  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

                                  "matrix(" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join() + ")" :
                  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 2206..2206

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

                  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 ( jQuery.isFunction( html ) ) {
                        return this.each(function(i) {
                          jQuery(this).wrapAll( html.call(this, i) );
                        });
                      }
                  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 6759..6763

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

                  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.containers[i].containerCache.over) {
                                      this.containers[i]._trigger("out", event, this._uiHash(this));
                                      this.containers[i].containerCache.over = 0;
                                  }
                  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 4339..4342

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

                  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

                    this.unit = function(unitName) {
                      return this.units.filter( function(unit) { return unitName == unit.name } ).shift();
                    };
                  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 1067..1069

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

                  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

                      graticule.extent = function(_) {
                        if (!arguments.length) return graticule.minorExtent();
                        return graticule.majorExtent(_).minorExtent(_);
                      };
                  Severity: Major
                  Found in cabot/static/arachnys/js/d3.js and 1 other location - About 1 hr to fix
                  cabot/static/arachnys/js/d3.js on lines 4452..4455

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

                  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.containers[innermostIndex].containerCache.over) {
                                  this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
                                  this.containers[innermostIndex].containerCache.over = 1;
                              }
                  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 4324..4327

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

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

                          renderRegion: function (valuenum, highlight) {
                              var values = this.values,
                                  options = this.options,
                                  target = this.target,
                                  canvasHeight, height, halfHeight,
                  Severity: Minor
                  Found in cabot/static/theme/js/jquery.sparkline.min.js - About 1 hr to fix

                    Function set has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                set: function( elem, value ) {
                                    var parsed, curElem,
                                        backgroundColor = "";
                    
                                    if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
                    Severity: Minor
                    Found in cabot/static/theme/js/jquery-ui.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language