fiedl/wingolfsplattform

View on GitHub

Showing 180 of 222 total issues

Function resize has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    resize : function () {
      var self = this;
      self.S('[' + this.attr_name() + ']').each(function () {
        var topbar = self.S(this),
            settings = topbar.data(self.attr_name(true) + '-init');
Severity: Minor
Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

    Function adjust_pip has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        adjust_pip : function (dropdown, target, settings, position) {
          var sheet = Foundation.stylesheet,
              pip_offset_base = 8;
    
          if (dropdown.hasClass(settings.mega_class)) {
    Severity: Minor
    Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

      Method leibfamilie has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def leibfamilie
          familie = []
          familie << {description: "", user: self}
          if leibbursch
            relationship = Relationship.where(user1: leibbursch, name: "Leibbursch", user2: self).first
      Severity: Minor
      Found in app/models/concerns/user_leibverhaeltnisse.rb - About 1 hr to fix

        Function resize has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            resize : function () {
              var self = this;
              self.S('[' + this.attr_name() + ']').each(function () {
                var topbar = self.S(this),
                    settings = topbar.data(self.attr_name(true) + '-init');
        Severity: Minor
        Found in public/commander/foundation-5/js/foundation/foundation.topbar.js - About 1 hr to fix

          Function adjust_pip has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              adjust_pip : function (dropdown, target, settings, position) {
                var sheet = Foundation.stylesheet,
                    pip_offset_base = 8;
          
                if (dropdown.hasClass(settings.mega_class)) {
          Severity: Minor
          Found in public/commander/foundation-5/js/foundation/foundation.dropdown.js - About 1 hr to fix

            Method import_primary_corporation_from has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def import_primary_corporation_from( netenv_user )
                corporation = netenv_user.primary_corporation
                
                if netenv_user.ehrenphilister?(corporation)
                  
            Severity: Minor
            Found in lib/importers/models/user.rb - About 1 hr to fix

              Method import_stifter_status_from has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                def import_stifter_status_from( netenv_user )
                  netenv_user.corporations.each do |corporation|
                    date = netenv_user.beitrittsdatum(corporation)
                    date ||= self.membership_in(corporation).valid_from
                    if netenv_user.stifter?(corporation)
              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

              Method last_known_status_group_in has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                def last_known_status_group_in( corporation )
                  status_name = last_known_status_in( corporation )
                  
                  group_name = "Hospitanten" if status_name == "Hospitant"
                  group_name = "Kraßfuxen" if status_name == "Fux" || status_name == "Kraßfux"
              Severity: Minor
              Found in lib/importers/models/netenv_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

              Method create_from_dame has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                def create_from_dame
                  raise 'Kein Auftrag zur Datenverarbeitung erteilt.' unless params[:privacy].present?
              
                  if params[:dame_type] == "Philister-Gattin"
                    damen_group = corporation.sub_group("Philister-Gattinnen") || raise("Für die Verbindung #{corporation.name} ist keine Gruppe 'Philister-Gattinnen' vorhanden.")
              Severity: Minor
              Found in app/controllers/aktivmeldungen_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 init has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  init : function (section, method, options) {
                    Foundation.inherit(this, 'add_custom_rule register_media throttle');
                    var self = this;
              
                    self.register_media('topbar', 'foundation-mq-topbar');
              Severity: Minor
              Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

                Function build_markup has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    self.build_markup = function () {
                      slides_container.wrap('<div class="' + settings.container_class + '"></div>');
                      container = slides_container.parent();
                      slides_container.addClass(settings.slides_container_class);
                
                
                Severity: Minor
                Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

                  Function init has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      init : function (section, method, options) {
                        Foundation.inherit(this, 'add_custom_rule register_media throttle');
                        var self = this;
                  
                        self.register_media('topbar', 'foundation-mq-topbar');
                  Severity: Minor
                  Found in public/commander/foundation-5/js/foundation/foundation.topbar.js - About 1 hr to fix

                    Function build_markup has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        self.build_markup = function () {
                          slides_container.wrap('<div class="' + settings.container_class + '"></div>');
                          container = slides_container.parent();
                          slides_container.addClass(settings.slides_container_class);
                    
                    
                    Severity: Minor
                    Found in public/commander/foundation-5/js/foundation/foundation.orbit.js - About 1 hr to fix

                      Function shift has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          shift : function (current, target, callback) {
                            var clearing = target.parent(),
                                old_index = this.settings.prev_index || target.index(),
                                direction = this.direction(clearing, current, target),
                                dir = this.rtl ? 'right' : 'left',
                      Severity: Minor
                      Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

                        Function shift has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            shift : function (current, target, callback) {
                              var clearing = target.parent(),
                                  old_index = this.settings.prev_index || target.index(),
                                  direction = this.direction(clearing, current, target),
                                  dir = this.rtl ? 'right' : 'left',
                        Severity: Minor
                        Found in public/commander/foundation-5/js/foundation/foundation.clearing.js - About 1 hr to fix

                          Function interpret_keyup_action has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                    interpret_keyup_action = function (e) {
                                      // Light modification of Heydon Pickering's Practical ARIA Examples: http://heydonworks.com/practical_aria_examples/js/a11y.js
                          
                                      // define current, previous and next (possible) tabs
                          
                          
                          Severity: Minor
                          Found in public/commander/foundation-5/js/foundation/foundation.tab.js - About 1 hr to fix

                            Function interpret_keyup_action has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                      interpret_keyup_action = function (e) {
                                        // Light modification of Heydon Pickering's Practical ARIA Examples: http://heydonworks.com/practical_aria_examples/js/a11y.js
                            
                                        // define current, previous and next (possible) tabs
                            
                            
                            Severity: Minor
                            Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

                              Function valid_radio has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  valid_radio : function (el, required) {
                                    var name = el.getAttribute('name'),
                                        group = this.S(el).closest('[data-' + this.attr_name(true) + ']').find("[name='" + name + "']"),
                                        count = group.length,
                                        valid = false,
                              Severity: Minor
                              Found in public/commander/foundation-5/js/foundation/foundation.abide.js - About 1 hr to fix

                                Method fill_info has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  def fill_info
                                    super
                                    self.anzahl_aktivmeldungen = number_of_new_members
                                    self.anzahl_aller_aktiven = corporation.aktivitas.memberships.at_time(end_of_term).count
                                    self.anzahl_burschungen = anzahl_neue BURSCHEN_GROUP_NAMES
                                Severity: Minor
                                Found in app/models/term_reports/for_corporation.rb - About 1 hr to fix

                                  Function pos_phone has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      pos_phone : function (init) {
                                        var tip_height = this.settings.$next_tip.outerHeight(),
                                            tip_offset = this.settings.$next_tip.offset(),
                                            target_height = this.settings.$target.outerHeight(),
                                            $nub = $('.joyride-nub', this.settings.$next_tip),
                                  Severity: Minor
                                  Found in public/commander/foundation-5/js/foundation/foundation.joyride.js - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language