hummingbird-me/hummingbird

View on GitHub

Showing 859 of 859 total issues

Function _mouseStart has 75 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _mouseStart: function(event, overrideHandle, noActivation) {

        var i, body,
            o = this.options;

Severity: Major
Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 3 hrs to fix

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

        _mouseDrag: function(event) {
            var i, item, itemElement, intersection,
                o = this.options,
                scrolled = false;
    
    
    Severity: Major
    Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 3 hrs to fix

      File foundation.js has 291 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*
       * Foundation Responsive Library
       * http://foundation.zurb.com
       * Copyright 2013, ZURB
       * Free to use under the MIT license.
      Severity: Minor
      Found in public/2013/assets/js/foundation/foundation.js - About 3 hrs to fix

        File foundation.js has 291 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         * Foundation Responsive Library
         * http://foundation.zurb.com
         * Copyright 2013, ZURB
         * Free to use under the MIT license.
        Severity: Minor
        Found in public/2014/assets/js/foundation/foundation.js - About 3 hrs to fix

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

              _mouseDrag: function(event) {
          
                  this.dragged = true;
          
                  if (this.options.disabled) {
          Severity: Major
          Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 2 hrs to fix

            Function Datepicker has 74 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function Datepicker() {
                this._curInst = null; // The current instance in use
                this._keyEvent = false; // If the last event was a key event
                this._disabledInputs = []; // List of date picker inputs that have been disabled
                this._datepickerShowing = false; // True if the popup picker is showing , false if not
            Severity: Major
            Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 2 hrs to fix

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

                  _create: function() {
                      this.activeMenu = this.element;
                      // flag used to prevent firing of the click handler
                      // as the event bubbles up through nested menus
                      this.mouseHandled = false;
              Severity: Major
              Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 2 hrs to fix

                Function onTouchEnd has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                Open

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

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function onTouchEnd has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                Open

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

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function widget has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                $.widget = function( name, base, prototype ) {
                    var fullName, existingConstructor, constructor, basePrototype,
                        // proxiedPrototype allows the provided prototype to remain unmodified
                        // so that it can be used as a mixin for multiple widgets (#8876)
                        proxiedPrototype = {},
                Severity: Major
                Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 2 hrs to fix

                  Function AwesomeRating has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  $.fn.AwesomeRating = function(options) {
                    return this.each(function() {
                      var i, icon, rating, widget, _i, _len, _ref, _results;
                      widget = this;
                      rating = $(widget).attr("data-rating");
                  Severity: Major
                  Found in app/assets/javascripts/old/awesome_rating.js - About 2 hrs to fix

                    Function anonymous has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
                    
                    var YYSTATE=YY_START
                    switch($avoiding_name_collisions) {
                    case 0: yy_.yytext = "\\"; return 14; 
                    Severity: Major
                    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

                              $.extend(this.offset, {
                                  click: { //Where the click happened, relative to the element
                                      left: event.pageX - this.offset.left,
                                      top: event.pageY - this.offset.top
                                  },
                      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 1597..1604

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

                      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

                              $.extend(this.offset, {
                                  click: { //Where the click happened, relative to the element
                                      left: event.pageX - this.offset.left,
                                      top: event.pageY - this.offset.top
                                  },
                      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 4165..4172

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

                      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 (that._helper && !o.animate && (/relative/).test(ce.css("position"))) {
                                  $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
                              }
                      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 3564..3566

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

                      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 (that._helper && !o.animate && (/static/).test(ce.css("position"))) {
                                  $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
                              }
                      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 3560..3562

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

                      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

                      Method filter_new has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def filter_new
                          @filter_years = %w(Upcoming 2010s 2000s 1990s 1980s 1970s Older)
                      
                          respond_to do |format|
                            format.html do
                      Severity: Major
                      Found in app/controllers/anime_controller.rb - About 2 hrs to fix

                        Function str has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function str(key, holder) {
                        
                        // Produce a string from holder[key].
                        
                                var i,          // The loop counter.
                        Severity: Major
                        Found in app/assets/javascripts/old/json2.js - About 2 hrs to fix

                          Function _contactContainers has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              _contactContainers: function(event) {
                                  var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating,
                                      innermostContainer = null,
                                      innermostIndex = null;
                          
                          
                          Severity: Major
                          Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 2 hrs to fix

                            Function FastClick has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function FastClick(layer) {
                                'use strict';
                                var oldOnClick, self = this;
                            
                            
                            
                            Severity: Minor
                            Found in public/2013/assets/js/fastclick.js - About 2 hrs to fix

                            Cognitive Complexity

                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                            A method's cognitive complexity is based on a few simple rules:

                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                            • Code is considered more complex for each "break in the linear flow of the code"
                            • Code is considered more complex when "flow breaking structures are nested"

                            Further reading

                            Severity
                            Category
                            Status
                            Source
                            Language