hummingbird-me/hummingbird

View on GitHub

Showing 859 of 859 total issues

Function onTouchStart has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

FastClick.prototype.onTouchStart = function(event) {
    'use strict';
    var targetElement, touch, selection;

    // Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
Severity: Minor
Found in public/2013/assets/js/fastclick.js - About 1 hr to fix

    Function _createRange has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _createRange: function() {
            var options = this.options,
                classes = "";
    
            if ( options.range ) {
    Severity: Minor
    Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

      Function _updateDatepicker has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _updateDatepicker: function(inst) {
              this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
              instActive = inst; // for delegate hover events
              inst.dpDiv.empty().append(this._generateHTML(inst));
              this._attachHandlers(inst);
      Severity: Minor
      Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

        Function _setOption has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _setOption: function( key, value ) {
                if ( key === "culture" || key === "numberFormat" ) {
                    var prevValue = this._parse( this.element.val() );
                    this.options[ key ] = value;
                    this.element.val( this._format( prevValue ) );
        Severity: Minor
        Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

          Function _refresh has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _refresh: function() {
                  this._setupDisabled( this.options.disabled );
                  this._setupEvents( this.options.event );
                  this._setupHeightStyle( this.options.heightStyle );
          
          
          Severity: Minor
          Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

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

                _destroy: function() {
                    // Destroy (sub)menus
                    this.element
                        .removeAttr( "aria-activedescendant" )
                        .find( ".ui-menu" ).addBack()
            Severity: Minor
            Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

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

                  _refreshValue: function() {
                      var value = this.options.value,
                          percentage = this._percentage();
              
                      this.valueDiv
              Severity: Minor
              Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                Function _initialActive has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _initialActive: function() {
                        var active = this.options.active,
                            collapsible = this.options.collapsible,
                            locationHash = location.hash.substring( 1 );
                
                
                Severity: Minor
                Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                  Function _drop has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _drop: function(event,custom) {
                  
                          var draggable = custom || $.ui.ddmanager.current,
                              childrenIntersection = false;
                  
                  
                  Severity: Minor
                  Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                    Function updateSectionContents has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      updateSectionContents: function () {
                        var agg, filter, sortAsc, sortProperty;
                        agg = {};
                        filter = this.get('filter').toLowerCase();
                        sortProperty = this.get('sortBy');
                    Severity: Minor
                    Found in frontend/app/controllers/user/library.js - About 1 hr to fix

                      Function updateSectionContents has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        updateSectionContents: function () {
                          var agg, filter, sortAsc, sortProperty;
                          agg = {};
                          filter = this.get('filter').toLowerCase();
                          sortProperty = this.get('sortBy');
                      Severity: Minor
                      Found in frontend/app/controllers/user/manga-library.js - About 1 hr to fix

                        Method find_for_facebook_oauth has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          def self.find_for_facebook_oauth(auth, signed_in_resource=nil)
                            # Try to find a user already associated with the Facebook ID.
                            user = User.where(facebook_id: auth.uid).first
                            return user if user
                        
                        
                        Severity: Minor
                        Found in app/models/user.rb - About 1 hr to fix

                          Method follow has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            def follow
                              authenticate_user!
                              user = User.find(params[:user_id])
                          
                              if user != current_user
                          Severity: Minor
                          Found in app/controllers/users_controller.rb - About 1 hr to fix

                            Method import! has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              def import!
                                en, jp = fetch_series(all: true), fetch_series(lang: 'ja') || {}
                                raise MissingDataError.new if en.nil? || en[:episode].blank?
                            
                                # Save the jp anime title.
                            Severity: Minor
                            Found in lib/the_tvdb_import.rb - About 1 hr to fix

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

                                  if (hours > 0) {
                                    if (str.length > 0) {
                                      str += ", ";
                                    }
                                    str += hours + " " + (hours === 1 ? "hour" : "hours");
                              Severity: Major
                              Found in frontend/app/controllers/user/index.js and 3 other locations - About 1 hr to fix
                              frontend/app/controllers/user/index.js on lines 134..139
                              frontend/app/controllers/user/index.js on lines 140..145
                              frontend/app/controllers/user/index.js on lines 152..157

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

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

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

                                  if (months > 0) {
                                    if (str.length > 0) {
                                      str += ", ";
                                    }
                                    str += months + " " + (months === 1 ? "month" : "months");
                              Severity: Major
                              Found in frontend/app/controllers/user/index.js and 3 other locations - About 1 hr to fix
                              frontend/app/controllers/user/index.js on lines 140..145
                              frontend/app/controllers/user/index.js on lines 146..151
                              frontend/app/controllers/user/index.js on lines 152..157

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

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

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

                                  if (days > 0) {
                                    if (str.length > 0) {
                                      str += ", ";
                                    }
                                    str += days + " " + (days === 1 ? "day" : "days");
                              Severity: Major
                              Found in frontend/app/controllers/user/index.js and 3 other locations - About 1 hr to fix
                              frontend/app/controllers/user/index.js on lines 134..139
                              frontend/app/controllers/user/index.js on lines 146..151
                              frontend/app/controllers/user/index.js on lines 152..157

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

                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                              Refactorings

                              Further Reading

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

                                  if (minutes > 0) {
                                    if (str.length > 0) {
                                      str += " and ";
                                    }
                                    str += minutes + " " + (minutes === 1 ? "minute" : "minutes");
                              Severity: Major
                              Found in frontend/app/controllers/user/index.js and 3 other locations - About 1 hr to fix
                              frontend/app/controllers/user/index.js on lines 134..139
                              frontend/app/controllers/user/index.js on lines 140..145
                              frontend/app/controllers/user/index.js on lines 146..151

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

                              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(bs) {
                                                  ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
                                              }
                              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 2354..2356

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

                              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

                                  _getDragHorizontalDirection: function() {
                                      var delta = this.positionAbs.left - this.lastPositionAbs.left;
                                      return delta !== 0 && (delta > 0 ? "right" : "left");
                                  },
                              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 4569..4572

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

                              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