hummingbird-me/hummingbird

View on GitHub

Showing 419 of 859 total issues

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

    _on: function( suppressDisabledCheck, element, handlers ) {
        var delegateElement,
            instance = this;

        // no suppressDisabledCheck flag, shuffle arguments
Severity: Minor
Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

    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

              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

                          Function name has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              $.fn[ name ] = function( options ) {
                                  var isMethodCall = typeof options === "string",
                                      args = slice.call( arguments, 1 ),
                                      returnValue = this;
                          
                          
                          Severity: Minor
                          Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                            Function getPath has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                , getPath: function ( elem ) {
                            
                                  if ( 'undefined' === typeof elem ) {
                                    elem = this.$element;
                                  }
                            Severity: Minor
                            Found in app/assets/javascripts/old/garlic.js - About 1 hr to fix

                              Function load has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  load: function( index, event ) {
                                      index = this._getIndex( index );
                                      var that = this,
                                          tab = this.tabs.eq( index ),
                                          anchor = tab.find( ".ui-tabs-anchor" ),
                              Severity: Minor
                              Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 1 hr to fix

                                Method similar has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  def similar(limit = 20, options = {})
                                    # FIXME
                                    return [] if Rails.env.development?
                                
                                    exclude = options[:exclude] ? options[:exclude] : []
                                Severity: Minor
                                Found in app/models/anime.rb - About 1 hr 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

                                Method upcoming has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  def upcoming
                                    hide_cover_image
                                
                                    season_months = {
                                      'winter' => [12, 1, 2],
                                Severity: Minor
                                Found in app/controllers/anime_controller.rb - About 1 hr 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

                                Method index has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  def index
                                    respond_to do |format|
                                      format.json do
                                        manga = Manga
                                        manga = Manga.where(slug: params[:ids]) if params[:ids]
                                Severity: Minor
                                Found in app/controllers/manga_controller.rb - About 1 hr 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

                                Method index has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  def index
                                    respond_to do |format|
                                      format.html do
                                        hide_cover_image
                                        @filter_years = %w(Upcoming 2010s 2000s 1990s 1980s 1970s Older)
                                Severity: Minor
                                Found in app/controllers/anime_controller.rb - About 1 hr 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 parse has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        JSON.parse = function (text, reviver) {
                                
                                // The parse method takes a text and an optional reviver function, and returns
                                // a JavaScript value if the text is a valid JSON text.
                                
                                
                                Severity: Minor
                                Found in app/assets/javascripts/old/json2.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language