hummingbird-me/hummingbird

View on GitHub

Showing 859 of 859 total issues

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

    _setOption: function(key, value) {
      var menu = this.menu;

      switch(key) {
        case 'header':
Severity: Minor
Found in app/assets/javascripts/old/multiselect.js - About 1 hr to fix

    Function on has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function on(input, state, keep) {
        var node = input[0],
          parent = input.parent(),
          checked = state == _checked,
          indeterminate = state == _indeterminate,
    Severity: Minor
    Found in app/assets/javascripts/old/jquery.icheck.js - About 1 hr to fix

      Function sync has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        Backbone.sync = function(method, model, options) {
          var type = methodMap[method];
      
          // Default options, unless specified.
          _.defaults(options || (options = {}), {
      Severity: Minor
      Found in app/assets/javascripts/old/backbone-1.0.0.js - About 1 hr to fix

        Function createFunctionContext has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          createFunctionContext: function(asObject) {
            var locals = this.stackVars.concat(this.registers.list);
        
            if(locals.length > 0) {
              this.source[1] = this.source[1] + ", " + locals.join(", ");
        Severity: Minor
        Found in app/assets/javascripts/old/handlebars-1.0.0.js - About 1 hr to fix

          Method create has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def create
              params.permit(:token, :plan_id, :gift, :gift_to, :gift_message)
          
              if params[:token].blank?
                return render(text: "Didn't get credit card details from Stripe", status: 400)
          Severity: Minor
          Found in app/controllers/pro_memberships_controller.rb - About 1 hr to fix

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

                    if ( options.my[ 0 ] === "right" ) {
                        position.left -= elemWidth;
                    } else if ( options.my[ 0 ] === "center" ) {
                        position.left -= elemWidth / 2;
                    }
            Severity: Major
            Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 3 other locations - About 1 hr to fix
            app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1152..1156
            app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1158..1162
            app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1186..1190

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

            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 ( options.my[ 1 ] === "bottom" ) {
                        position.top -= elemHeight;
                    } else if ( options.my[ 1 ] === "center" ) {
                        position.top -= elemHeight / 2;
                    }
            Severity: Major
            Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 3 other locations - About 1 hr to fix
            app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1152..1156
            app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1158..1162
            app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1180..1184

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

            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 ( options.at[ 1 ] === "bottom" ) {
                    basePosition.top += targetHeight;
                } else if ( options.at[ 1 ] === "center" ) {
                    basePosition.top += targetHeight / 2;
                }
            Severity: Major
            Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 3 other locations - About 1 hr to fix
            app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1152..1156
            app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1180..1184
            app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1186..1190

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

            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 ( options.at[ 0 ] === "right" ) {
                    basePosition.left += targetWidth;
                } else if ( options.at[ 0 ] === "center" ) {
                    basePosition.left += targetWidth / 2;
                }
            Severity: Major
            Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 3 other locations - About 1 hr to fix
            app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1158..1162
            app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1180..1184
            app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1186..1190

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

            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 (nativeReduce && obj.reduce === nativeReduce) {
                  if (context) iterator = _.bind(iterator, context);
                  return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
                }
            Severity: Major
            Found in app/assets/javascripts/old/underscore-1.4.4.js and 1 other location - About 1 hr to fix
            app/assets/javascripts/old/underscore-1.4.4.js on lines 133..136

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

            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 (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
                  if (context) iterator = _.bind(iterator, context);
                  return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
                }
            Severity: Major
            Found in app/assets/javascripts/old/underscore-1.4.4.js and 1 other location - About 1 hr to fix
            app/assets/javascripts/old/underscore-1.4.4.js on lines 112..115

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

            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 self.persisted?
                  if self.rating_changed?
                    okey = (self.rating_was || "nil").to_s
                    nkey = (self.rating || "nil").to_s
                    Anime.where(id: self.anime.id).update_all(
            Severity: Major
            Found in app/models/library_entry.rb and 1 other location - About 1 hr to fix
            app/models/manga_library_entry.rb on lines 64..76

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

            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 self.persisted?
                  if self.rating_changed?
                    okey = (self.rating_was || "nil").to_s
                    nkey = (self.rating || "nil").to_s
                    Manga.where(id: self.manga.id).update_all(
            Severity: Major
            Found in app/models/manga_library_entry.rb and 1 other location - About 1 hr to fix
            app/models/library_entry.rb on lines 95..107

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

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

                _mouseDown: function(event) {
                    // don't let more than one widget handle mouseStart
                    if( mouseHandled ) { return; }
            
                    // we may have missed mouseup (out of window)
            Severity: Minor
            Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

              Function drag has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  drag: function(draggable, event) {
              
                      //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
                      if(draggable.options.refreshPositions) {
                          $.ui.ddmanager.prepareOffsets(draggable, event);
              Severity: Minor
              Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                Function _respectSize has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _respectSize: function( data ) {
                
                        var o = this._vBoundaries,
                            a = this.axis,
                            ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
                Severity: Minor
                Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                  Function _createPlaceholder has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _createPlaceholder: function(that) {
                          that = that || this;
                          var className,
                              o = that.options;
                  
                  
                  Severity: Minor
                  Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                    Function _possibleChars has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _possibleChars: function (format) {
                            var iFormat,
                                chars = "",
                                literal = false,
                                // Check whether a format character is doubled
                    Severity: Minor
                    Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                      Method create_or_update_from_hash has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def self.create_or_update_from_hash hash
                          # First the creation logic
                          # TODO: stop hard-coding the ID column
                          manga = Manga.find_by(mal_id: hash[:external_id])
                          if manga.nil? && Manga.where(romaji_title: hash[:romaji_title]).count > 1
                      Severity: Minor
                      Found in app/models/manga.rb - About 1 hr to fix

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

                          displayVolumeCount: (function() {
                            var e;
                            e = void 0;
                            e = this.get("volumeCount");
                            if (e) {
                        Severity: Major
                        Found in frontend/app/models/manga.js and 1 other location - About 1 hr to fix
                        frontend/app/models/manga.js on lines 35..44

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

                        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