hummingbird-me/hummingbird

View on GitHub

Showing 859 of 859 total issues

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 app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 1 hr to fix
app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 3524..3524

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

        woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width );
Severity: Major
Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 1 hr to fix
app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 3525..3525

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

        isBefore: function (input, units) {
            units = typeof units !== 'undefined' ? units : 'millisecond';
            return +this.clone().startOf(units) < +moment(input).startOf(units);
        },
Severity: Major
Found in app/assets/javascripts/old/moment.js and 2 other locations - About 1 hr to fix
app/assets/javascripts/old/moment.js on lines 1231..1234
app/assets/javascripts/old/moment.js on lines 1241..1244

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

        isSame: function (input, units) {
            units = typeof units !== 'undefined' ? units : 'millisecond';
            return +this.clone().startOf(units) === +moment(input).startOf(units);
        },
Severity: Major
Found in app/assets/javascripts/old/moment.js and 2 other locations - About 1 hr to fix
app/assets/javascripts/old/moment.js on lines 1231..1234
app/assets/javascripts/old/moment.js on lines 1236..1239

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

  , show: function () {
      var $tip
        , pos
        , actualWidth
        , actualHeight
Severity: Minor
Found in app/assets/javascripts/old/bootstrap-tooltip.js - About 1 hr to fix

    Function _create has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _create: function() {
          var el = this.element.hide();
          var o = this.options;
    
          this.speed = $.fx.speeds._default; // default speed for effects
    Severity: Minor
    Found in app/assets/javascripts/old/multiselect.js - About 1 hr to fix

      Function suggester has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function suggester(context) {
        context.textcomplete([
          { // emoji
            emojis: PreloadStore.get("emoji"),
            match: /(^|\s):(\w*)$/,
      Severity: Minor
      Found in frontend/app/utils/suggester.js - About 1 hr to fix

        Function _mouseDrag has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _mouseDrag: function(event) {
        
                //Increase performance, avoid regex
                var data,
                    el = this.helper, props = {},
        Severity: Minor
        Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

          Function _createWrapper has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _createWrapper: function() {
                  this.uiDialog = $("<div>")
                      .addClass( "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " +
                          this.options.dialogClass )
                      .hide()
          Severity: Minor
          Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

            Function loadPosts has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              loadPosts: function() {
                var self = this;
            
                ajax({
                  url: this.get('apiCall'),
            Severity: Minor
            Found in frontend/app/components/community-widget.js - About 1 hr to fix

              Method upcoming has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def upcoming
                  hide_cover_image
              
                  season_months = {
                    'winter' => [12, 1, 2],
              Severity: Minor
              Found in app/controllers/anime_controller.rb - About 1 hr to fix

                Consider simplifying this complex logical expression.
                Open

                        if ( ( ( $target[0].id !== $.datepicker._mainDivId &&
                                $target.parents("#" + $.datepicker._mainDivId).length === 0 &&
                                !$target.hasClass($.datepicker.markerClassName) &&
                                !$target.closest("." + $.datepicker._triggerClass).length &&
                                $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
                Severity: Critical
                Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                          if(!(/^(document|window|parent)$/).test(o.containment)) {
                              ce = $(o.containment)[0];
                              co = $(o.containment).offset();
                              over = ($(ce).css("overflow") !== "hidden");
                  
                  
                  Severity: Critical
                  Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                            if (this.floating && horizontalDirection) {
                                return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf));
                            } else {
                                return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf));
                            }
                    Severity: Critical
                    Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

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

                              if ( this.options.values && this.options.values.length ) {
                                  uiHash.value = this.values( index );
                                  uiHash.values = this.values();
                              }
                      Severity: Major
                      Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 1 hr to fix
                      app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 10688..10691

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

                      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

                              if ( this.options.values && this.options.values.length ) {
                                  uiHash.value = this.values( index );
                                  uiHash.values = this.values();
                              }
                      Severity: Major
                      Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 1 hr to fix
                      app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 10634..10637

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

                      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.options.axis || this.options.axis !== "y") {
                                  this.helper[0].style.left = this.position.left+"px";
                              }
                      Severity: Major
                      Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 1 hr to fix
                      app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1665..1667

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

                      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 ( oRange === "min" && this.orientation === "horizontal" ) {
                                      this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
                                  }
                      Severity: Major
                      Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 1 hr to fix
                      app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 10927..10929

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

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

                      export default DS.Model.extend({
                        role: DS.attr('string'),
                        language: DS.attr('string'),
                        character: DS.belongsTo('character'),
                        person: DS.belongsTo('person')
                      Severity: Major
                      Found in frontend/app/models/casting.js and 2 other locations - About 1 hr to fix
                      frontend/app/models/pro-membership-plan.js on lines 3..8
                      frontend/app/models/user-info.js on lines 3..9

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

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

                      export default DS.Model.extend({
                        name: DS.attr('string'),
                        amount: DS.attr('number'),
                        duration: DS.attr('number'),
                        recurring: DS.attr('boolean')
                      Severity: Major
                      Found in frontend/app/models/pro-membership-plan.js and 2 other locations - About 1 hr to fix
                      frontend/app/models/casting.js on lines 3..8
                      frontend/app/models/user-info.js on lines 3..9

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

                      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

                      Severity
                      Category
                      Status
                      Source
                      Language