fiedl/wingolfsplattform

View on GitHub

Showing 180 of 222 total issues

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.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.min.js - About 1 hr to fix

      Method create_from_dame has 29 lines of code (exceeds 25 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

        Function offsets has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            offsets : function (expedition, window_offset) {
              var self = this,
                  settings = expedition.data(self.attr_name(true) + '-init'),
                  viewport_offset = window_offset;
        
        
        Severity: Minor
        Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

          Function offsets has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              offsets : function (expedition, window_offset) {
                var self = this,
                    settings = expedition.data(self.attr_name(true) + '-init'),
                    viewport_offset = window_offset;
          
          
          Severity: Minor
          Found in public/commander/foundation-5/js/foundation/foundation.magellan.js - About 1 hr to fix

            Function handle_location_hash_change has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Function handle_location_hash_change has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

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

                Method leibfamilie has a Cognitive Complexity of 10 (exceeds 5 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

                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 import_death_from has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                Open

                  def import_death_from( netenv_user )
                    if netenv_user.verstorben?
                      
                      date_of_death = netenv_user.netenv_org_membership_end_date
                      date_of_death ||= self.memberships.order(:valid_from).last.valid_from + 1.day
                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 adapt_bv_to_primary_address has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def adapt_bv_to_primary_address
                    self.groups.reload
                    new_bv = correct_bv
                
                    # Wenn der Philister einen Wunsch-BV hat, wird die automatische Zuordnung
                Severity: Minor
                Found in app/models/user.rb - About 1 hr to fix

                  Function matchMedia has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    window.matchMedia || (window.matchMedia = function() {
                        "use strict";
                  
                        // For browsers that support matchMedium api such as IE 9 and webkit
                        var styleMedia = (window.styleMedia || window.media);
                  Severity: Minor
                  Found in public/commander/foundation-5/js/foundation/foundation.js - About 1 hr to fix

                    Function matchMedia has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      window.matchMedia || (window.matchMedia = function() {
                          "use strict";
                    
                          // For browsers that support matchMedium api such as IE 9 and webkit
                          var styleMedia = (window.styleMedia || window.media);
                    Severity: Minor
                    Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

                      Method import_secondary_corporations_from has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def import_secondary_corporations_from( netenv_user )
                      
                          last_date_of_joining = netenv_user.aktivmeldungsdatum
                          
                          netenv_user.secondary_corporations.each do |corporation|
                      Severity: Minor
                      Found in lib/importers/models/user.rb - About 1 hr to fix

                        Function css has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            css : function (dropdown, target) {
                              var left_offset = Math.max((target.width() - dropdown.width()) / 2, 8),
                                  settings = target.data(this.attr_name(true) + '-init') || this.settings,
                                  parentOverflow = dropdown.parent().css('overflow-y') || dropdown.parent().css('overflow');
                        
                        
                        Severity: Minor
                        Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

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

                              init : function (scope, libraries, method, options, response) {
                                var args = [scope, method, options, response],
                                    responses = [];
                          
                                // check RTL
                          Severity: Minor
                          Found in public/commander/foundation-5/js/foundation.min.js - About 1 hr to fix

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

                                init : function (scope, libraries, method, options, response) {
                                  var args = [scope, method, options, response],
                                      responses = [];
                            
                                  // check RTL
                            Severity: Minor
                            Found in public/commander/foundation-5/js/foundation/foundation.js - About 1 hr to fix

                              Function assemble has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

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

                                Function css has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    css : function (dropdown, target) {
                                      var left_offset = Math.max((target.width() - dropdown.width()) / 2, 8),
                                          settings = target.data(this.attr_name(true) + '-init') || this.settings,
                                          parentOverflow = dropdown.parent().css('overflow-y') || dropdown.parent().css('overflow');
                                
                                
                                Severity: Minor
                                Found in public/commander/foundation-5/js/foundation/foundation.dropdown.js - About 1 hr to fix

                                  Method fill_in_template_profile_information has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    def fill_in_template_profile_information
                                      self.profile_fields.create(label: :personal_title, type: "ProfileFields::General")
                                      self.profile_fields.create(label: :academic_degree, type: "ProfileFields::AcademicDegree")
                                      self.profile_fields.create(label: :cognomen, type: "ProfileFields::General")
                                      self.profile_fields.create(label: :klammerung, type: "ProfileFields::Klammerung")
                                  Severity: Minor
                                  Found in app/models/user.rb - About 1 hr to fix

                                    Function assemble has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        assemble : function (topbar) {
                                          var self = this,
                                              settings = topbar.data(this.attr_name(true) + '-init'),
                                              section = self.S('section, .top-bar-section', topbar);
                                    
                                    
                                    Severity: Minor
                                    Found in public/commander/foundation-5/js/foundation/foundation.topbar.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language