hummingbird-me/hummingbird

View on GitHub

Showing 859 of 859 total issues

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

    _refreshValue: function() {
        var lastValPercent, valPercent, value, valueMin, valueMax,
            oRange = this.options.range,
            o = this.options,
            that = this,
Severity: Major
Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 2 hrs to fix

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

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

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

                          if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }
      Severity: Major
      Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 2 hrs to fix
      app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 4763..4763

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

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

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

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

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

      Refactorings

      Further Reading

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

                          if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }
      Severity: Major
      Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js and 1 other location - About 2 hrs to fix
      app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 4764..4764

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 76.

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

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

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

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

      Refactorings

      Further Reading

      Function onTouchEnd has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      FastClick.prototype.onTouchEnd = function(event) {
          'use strict';
          var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
      
          if (!this.trackingClick) {
      Severity: Major
      Found in public/2013/assets/js/fastclick.js - About 2 hrs to fix

        Function onTouchEnd has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        FastClick.prototype.onTouchEnd = function(event) {
            'use strict';
            var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
        
            if (!this.trackingClick) {
        Severity: Major
        Found in public/2014/assets/js/fastclick.js - About 2 hrs to fix

          Method apply! has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def apply!
              table = (list == "manga") ? Manga : Anime
              media_list = table.where(mal_id: data.map {|x| x[:mal_id] }).index_by(&:mal_id)
              failures = []
              count = 0
          Severity: Major
          Found in lib/my_anime_list_import.rb - About 2 hrs to fix

            Function _touchMove has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            Flipsnap.prototype._touchMove = function(event) {
              var self = this;
            
              if (!self.scrolling || gestureStart) {
                return;
            Severity: Minor
            Found in public/2013/assets/js/flipsnap.js - About 2 hrs to fix

              Function _touchMove has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Flipsnap.prototype._touchMove = function(event) {
                var self = this;
              
                if (!self.scrolling || gestureStart) {
                  return;
              Severity: Minor
              Found in public/2014/assets/js/flipsnap.js - About 2 hrs to fix

                Function next has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                next:function () {
                        if (this.done) {
                            return this.EOF;
                        }
                        if (!this._input) this.done = true;
                Severity: Minor
                Found in app/assets/javascripts/old/handlebars-1.0.0.js - About 2 hrs to fix

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

                    roundedBayesianRating: function() {
                      if (this.get('model.bayesianRating') && this.get('model.bayesianRating') > 0) {
                        return this.get('model.bayesianRating').toFixed(2);
                      } else {
                        return null;
                  Severity: Major
                  Found in frontend/app/controllers/anime/index.js and 1 other location - About 2 hrs to fix
                  frontend/app/controllers/manga/index.js on lines 15..21

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

                  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

                    roundedBayesianRating: function() {
                      if (this.get('model.bayesianRating') && this.get('model.bayesianRating') > 0) {
                        return this.get('model.bayesianRating').toFixed(2);
                      } else {
                        return null;
                  Severity: Major
                  Found in frontend/app/controllers/manga/index.js and 1 other location - About 2 hrs to fix
                  frontend/app/controllers/anime/index.js on lines 22..28

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

                  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

                    persistSort: function () {
                      localStorage.setItem('librarySortBy', JSON.stringify(this.get('sortBy')));
                      return localStorage.setItem('librarySortAsc', JSON.stringify(this.get('sortAsc')));
                    }.observes('sortBy', 'sortAsc'),
                  Severity: Major
                  Found in frontend/app/controllers/user/library.js and 1 other location - About 2 hrs to fix
                  frontend/app/controllers/user/manga-library.js on lines 96..99

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

                  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

                    persistSort: function () {
                      localStorage.setItem('mangaLibrarySortBy', JSON.stringify(this.get('sortBy')));
                      return localStorage.setItem('mangaLibrarySortAsc', JSON.stringify(this.get('sortAsc')));
                    }.observes('sortBy', 'sortAsc'),
                  Severity: Major
                  Found in frontend/app/controllers/user/manga-library.js and 1 other location - About 2 hrs to fix
                  frontend/app/controllers/user/library.js on lines 98..101

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

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

                  Flipsnap.prototype.init = function(element, opts) {
                    var self = this;
                  
                    // set element
                    self.element = element;
                  Severity: Minor
                  Found in public/2014/assets/js/flipsnap.js - About 1 hr to fix

                    Function init has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Flipsnap.prototype.init = function(element, opts) {
                      var self = this;
                    
                      // set element
                      self.element = element;
                    Severity: Minor
                    Found in public/2013/assets/js/flipsnap.js - About 1 hr to fix

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

                          _setOption: function( key, value ) {
                              /*jshint maxcomplexity:15*/
                              var isDraggable, isResizable,
                                  uiDialog = this.uiDialog;
                      
                      
                      Severity: Minor
                      Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

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

                            _setOption: function( key, value ) {
                                var i,
                                    valsLength = 0;
                        
                                if ( key === "range" && this.options.range === true ) {
                        Severity: Minor
                        Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

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

                                      scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
                          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 1902..1902
                          app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 1930..1930
                          app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 5020..5020

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

                          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

                                      scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent;
                          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 1930..1930
                          app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 5020..5020
                          app/assets/javascripts/old/jquery-ui-custom-1.10.3.js on lines 5046..5046

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

                          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