fiedl/wingolfsplattform

View on GitHub

Showing 180 of 222 total issues

Function hide has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    hide : function (el, css) {
      // is modal
      if (css) {
        var settings = el.data(this.attr_name(true) + '-init'),
            context = this;
Severity: Minor
Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

    Function events has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        events : function (instance) {
          var self = this;
          var S = this.S;
          self.create(this.S(instance));
    
    
    Severity: Minor
    Found in public/commander/foundation-5/js/foundation/foundation.accordion.js - About 1 hr to fix

      Function events has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          events : function (scope) {
            var self = this,
                S = self.S,
                $scroll_container = $('.scroll-container');
      
      
      Severity: Minor
      Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

        Function events has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            events : function (scope) {
              var self = this,
                  S = self.S,
                  $scroll_container = $('.scroll-container');
        
        
        Severity: Minor
        Found in public/commander/foundation-5/js/foundation/foundation.clearing.js - About 1 hr to fix

          Method create_template_profile_fields_where_non_existant has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

            def create_template_profile_fields_where_non_existant
              
              if self.profile_fields.where(label: :personal_title).count == 0
                self.profile_fields.create(label: :personal_title, type: "ProfileFieldTypes::General")
              end
          Severity: Minor
          Found in lib/importers/models/user.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 set_ui has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              set_ui : function ($handle, value) {
                var settings = $.data($handle[0], 'settings'),
                    handle_l = $.data($handle[0], 'handle_l'),
                    bar_l = $.data($handle[0], 'bar_l'),
                    norm_pct = this.normalized_percentage(value, settings.start, settings.end),
          Severity: Minor
          Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

            Function equalize has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                equalize : function (equalizer) {
                  var isStacked = false,
                      group = equalizer.data('equalizer'),
                      settings = equalizer.data(this.attr_name(true)+'-init') || this.settings,
                      vals,
            Severity: Minor
            Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

              Function set_ui has 39 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  set_ui : function ($handle, value) {
                    var settings = $.data($handle[0], 'settings'),
                        handle_l = $.data($handle[0], 'handle_l'),
                        bar_l = $.data($handle[0], 'bar_l'),
                        norm_pct = this.normalized_percentage(value, settings.start, settings.end),
              Severity: Minor
              Found in public/commander/foundation-5/js/foundation/foundation.slider.js - About 1 hr to fix

                Function equalize has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    equalize : function (equalizer) {
                      var isStacked = false,
                          group = equalizer.data('equalizer'),
                          settings = equalizer.data(this.attr_name(true)+'-init') || this.settings,
                          vals,
                Severity: Minor
                Found in public/commander/foundation-5/js/foundation/foundation.equalizer.js - About 1 hr to fix

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

                      start : function () {
                        var self = this,
                            $this = $('[' + this.attr_name() + ']', this.scope),
                            integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
                            int_settings_count = integer_settings.length;
                  Severity: Minor
                  Found in public/commander/foundation-5/js/foundation/foundation.joyride.js - About 1 hr to fix

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

                        start : function () {
                          var self = this,
                              $this = $('[' + this.attr_name() + ']', this.scope),
                              integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
                              int_settings_count = integer_settings.length;
                    Severity: Minor
                    Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

                      Function events has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          events : function () {
                            var self = this,
                                S = self.S,
                                settings = self.settings;
                      
                      
                      Severity: Minor
                      Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

                        Function events has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            events : function () {
                              var self = this,
                                  S = self.S,
                                  settings = self.settings;
                        
                        
                        Severity: Minor
                        Found in public/commander/foundation-5/js/foundation/foundation.magellan.js - About 1 hr to fix

                          Method rights_for_signed_in_users has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            def rights_for_signed_in_users
                              #
                              # Inherited from your_platform:
                              # - terms of use
                              # - users
                          Severity: Minor
                          Found in app/models/ability.rb - About 1 hr to fix

                            Method check_corporation_memberships_consistency_for has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              def check_corporation_memberships_consistency_for(netenv_user)
                                
                                # Aktivmeldungsdatum?
                                if not netenv_user.aktivmeldungsdatum
                                  warning = { message: 'Kein Aktivmeldungsdatum angegeben.',
                            Severity: Minor
                            Found in lib/importers/user_importer.rb - About 1 hr to fix

                              Function events has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  events : function () {
                                    var self = this,
                                        S = this.S;
                              
                                    var usual_tab_behavior =  function (e, target) {
                              Severity: Minor
                              Found in public/commander/foundation-5/js/foundation/foundation.tab.js - About 1 hr to fix

                                Function events has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    events : function () {
                                      var self = this,
                                          S = this.S;
                                
                                      var usual_tab_behavior =  function (e, target) {
                                Severity: Minor
                                Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

                                  Function _base has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                        _base : function (t) {
                                          var o_p = this.offsetParent(),
                                              o = o_p.offset(),
                                              p = t.offset();
                                  
                                  
                                  Severity: Minor
                                  Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

                                    Function _base has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                          _base : function (t) {
                                            var o_p = this.offsetParent(),
                                                o = o_p.offset(),
                                                p = t.offset();
                                    
                                    
                                    Severity: Minor
                                    Found in public/commander/foundation-5/js/foundation/foundation.dropdown.js - About 1 hr to fix

                                      Method import has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        def import
                                          log.head "External Corporations Import"
                                          
                                          log.section "Import Parameters"
                                          log.info "Import file:   #{@filename}"
                                      Severity: Minor
                                      Found in lib/importers/external_corporations_importer.rb - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language