hummingbird-me/hummingbird

View on GitHub

Showing 419 of 859 total issues

Function easyPieChart has 145 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  $.easyPieChart = function(el, options) {
    var addScaleLine, animateLine, drawLine, easeInOutQuad, rAF, renderBackground, renderScale, renderTrack,
      _this = this;

    this.el = el;
Severity: Major
Found in app/assets/javascripts/old/jquery.easy-pie-chart.js - About 5 hrs to fix

    Function model has 143 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      model: function() {
        // Screenshot base asset directory
        var sb = "/assets/app-screens/";
    
        // The apps page only lists actively supported, community made apps.
    Severity: Major
    Found in frontend/app/routes/apps/index.js - About 5 hrs to fix

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

          _create: function() {
              this.element.closest( "form" )
                  .unbind( "reset" + this.eventNamespace )
                  .bind( "reset" + this.eventNamespace, formResetHandler );
      
      
      Severity: Major
      Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 5 hrs to fix

        Function _bindEvents has 132 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _bindEvents: function() {
              var self = this;
              var button = this.button;
        
              function clickHandler() {
        Severity: Major
        Found in app/assets/javascripts/old/multiselect.js - About 5 hrs to fix

          File fastclick.js has 382 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
           *
           * @version 0.6.11
           * @codingstandard ftlabs-jsv2
          Severity: Minor
          Found in public/2013/assets/js/fastclick.js - About 5 hrs to fix

            File fastclick.js has 382 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /**
             * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
             *
             * @version 0.6.11
             * @codingstandard ftlabs-jsv2
            Severity: Minor
            Found in public/2014/assets/js/fastclick.js - About 5 hrs to fix

              Function scan has 112 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                Hogan.scan = function scan(text, delimiters) {
                  var len = text.length,
                      IN_TEXT = 0,
                      IN_TAG_TYPE = 1,
                      IN_TAG = 2,
              Severity: Major
              Found in app/assets/javascripts/old/hogan-2.0.0.js - About 4 hrs to fix

                Method metadata has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                Open

                  def metadata
                    meta = {
                      external_id: @mal_id,
                      title: {
                        canonical: @main_noko.css('h1').children[0].text.strip,
                Severity: Minor
                Found in lib/mal_import.rb - About 4 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 _create has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _create: function() {
                
                        var n, i, handle, axis, hname,
                            that = this,
                            o = this.options;
                Severity: Major
                Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 4 hrs to fix

                  Method perform has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def perform(user_id)
                      return
                      user = User.find(user_id)
                  
                      # Get a user's list and favorite genres.
                  Severity: Minor
                  Found in app/workers/recommending_worker.rb - About 4 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 anonymous has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
                  
                  var $0 = $$.length - 1;
                  switch (yystate) {
                  case 1: return $$[$0-1]; 
                  Severity: Major
                  Found in app/assets/javascripts/old/handlebars-1.0.0.js - About 4 hrs to fix

                    Method search has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def search
                        respond_to do |format|
                          format.json do
                            query = params.require(:query)
                    
                    
                    Severity: Minor
                    Found in app/controllers/search_controller.rb - About 4 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 parse has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    parse: function parse(input) {
                        var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
                        this.lexer.setInput(input);
                        this.lexer.yy = this.yy;
                        this.yy.lexer = this.lexer;
                    Severity: Major
                    Found in app/assets/javascripts/old/handlebars-1.0.0.js - About 4 hrs to fix

                      Method apply! has a Cognitive Complexity of 26 (exceeds 5 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: Minor
                      Found in lib/my_anime_list_import.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

                      Method perform has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def perform(user_id)
                          return
                          user = User.find(user_id)
                      
                          # Get a user's list and favorite genres.
                      Severity: Major
                      Found in app/workers/recommending_worker.rb - About 3 hrs to fix

                        Class User has 29 methods (exceeds 20 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 _refresh has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              _refresh: function() {
                                  var maxHeight,
                                      options = this.options,
                                      heightStyle = options.heightStyle,
                                      parent = this.element.parent(),
                          Severity: Major
                          Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 3 hrs to fix

                            Method create_or_update_from_hash has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                            Open

                              def self.create_or_update_from_hash(hash)
                                # First the creation logic
                                # TODO: stop hard-coding the ID column
                                anime = Anime.find_by(mal_id: hash[:external_id])
                                if anime.nil? && Anime.where(title: hash[:title][:canonical]).count > 1
                            Severity: Minor
                            Found in app/models/anime.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 lifeSpentOnAnimeFmt has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                            Open

                              lifeSpentOnAnimeFmt: function () {
                                var days, hours, minutes, months, str, years;
                                minutes = this.get('userInfo.lifeSpentOnAnime');
                            
                                if (minutes === 0) { return "0 minutes"; }
                            Severity: Minor
                            Found in frontend/app/controllers/user/index.js - 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 _doKeyDown has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                _doKeyDown: function(event) {
                                    var onSelect, dateStr, sel,
                                        inst = $.datepicker._getInst(event.target),
                                        handled = true,
                                        isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
                            Severity: Major
                            Found in app/assets/javascripts/old/jquery-ui-custom-1.10.3.js - About 3 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language