hummingbird-me/hummingbird

View on GitHub

Showing 419 of 859 total issues

Method filter_old has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

  def filter_old
    hide_cover_image
    @filter_years = %w(Upcoming 2010s 2000s 1990s 1980s 1970s Older)

    if params[:g]
Severity: Minor
Found in app/controllers/anime_controller.rb - About 3 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 _keydown has 81 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _keydown: function( event ) {
        /*jshint maxcomplexity:20*/
        var match, prev, character, skip, regex,
            preventDefault = true;

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

    Function formatDate has 79 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        formatDate: function (format, date, settings) {
            if (!date) {
                return "";
            }
    
    
    Severity: Major
    Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 3 hrs to fix

      File user.rb has 297 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      class User < ActiveRecord::Base
        # Friendly ID.
        def to_param
          name
        end
      Severity: Minor
      Found in app/models/user.rb - About 3 hrs to fix

        Function _clear has 77 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _clear: function(event, noPropagation) {
        
                this.reverting = false;
                // We delay all events that have to be triggered to after the point where the placeholder has been removed and
                // everything else normalized again
        Severity: Major
        Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 3 hrs to fix

          Function addTimeToArrayFromToken has 76 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function addTimeToArrayFromToken(token, input, config) {
                  var a, b,
                      datePartArray = config._a;
          
                  switch (token) {
          Severity: Major
          Found in app/assets/javascripts/old/moment.js - About 3 hrs to fix

            File jquery.icheck.js has 293 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*!
             * iCheck v0.9.1, http://git.io/uhUPMA
             * =================================
             * Powerful jQuery plugin for checkboxes and radio buttons customization
             *
            Severity: Minor
            Found in app/assets/javascripts/old/jquery.icheck.js - About 3 hrs to fix

              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

                                  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
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language