fiedl/wingolfsplattform

View on GitHub

Showing 180 of 222 total issues

Class User has 25 methods (exceeds 20 allowed). Consider refactoring.
Open

class User
  
  # Allgemeine Attribute
  # =======================================================================
    
Severity: Minor
Found in lib/importers/models/user.rb - About 2 hrs to fix

    File foundation.tooltip.js has 278 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    ;(function ($, window, document, undefined) {
      'use strict';
    
      Foundation.libs.tooltip = {
        name : 'tooltip',
    Severity: Minor
    Found in public/commander/foundation-5/js/foundation/foundation.tooltip.js - About 2 hrs to fix

      Method import_exit_events_from has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

        def import_exit_events_from( netenv_user )
          netenv_user.former_corporations.each do |corporation|
            
            reason = netenv_user.reason_for_exit(corporation)  || "ausgetreten"
            date = netenv_user.date_of_exit(corporation) 
      Severity: Minor
      Found in lib/importers/models/user.rb - About 2 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 pos_default has 60 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          pos_default : function (init) {
            var $nub = this.settings.$next_tip.find('.joyride-nub'),
                nub_width = Math.ceil($nub.outerWidth() / 2),
                nub_height = Math.ceil($nub.outerHeight() / 2),
                toggle = init || false;
      Severity: Major
      Found in public/commander/foundation-5/js/foundation.min.js - About 2 hrs to fix

        Function pos_default has 60 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            pos_default : function (init) {
              var $nub = this.settings.$next_tip.find('.joyride-nub'),
                  nub_width = Math.ceil($nub.outerWidth() / 2),
                  nub_height = Math.ceil($nub.outerHeight() / 2),
                  toggle = init || false;
        Severity: Major
        Found in public/commander/foundation-5/js/foundation/foundation.joyride.js - About 2 hrs to fix

          File foundation.interchange.js has 265 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          ;(function ($, window, document, undefined) {
            'use strict';
          
            Foundation.libs.interchange = {
              name : 'interchange',
          Severity: Minor
          Found in public/commander/foundation-5/js/foundation/foundation.interchange.js - About 2 hrs to fix

            Function open has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                open : function ($image, current, target) {
                  var self = this,
                      body = $(document.body),
                      root = target.closest('.clearing-assembled'),
                      container = self.S('div', root).first(),
            Severity: Major
            Found in public/commander/foundation-5/js/foundation/foundation.clearing.js - About 2 hrs to fix

              Function open has 58 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  open : function ($image, current, target) {
                    var self = this,
                        body = $(document.body),
                        root = target.closest('.clearing-assembled'),
                        container = self.S('div', root).first(),
              Severity: Major
              Found in public/commander/foundation-5/js/foundation.min.js - About 2 hrs to fix

                Method adapt_bv_to_primary_address has a Cognitive Complexity of 17 (exceeds 5 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 2 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 toggle has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    toggle : function (toggleEl) {
                      var self = this,
                          topbar;
                
                      if (toggleEl) {
                Severity: Major
                Found in public/commander/foundation-5/js/foundation/foundation.topbar.js - About 2 hrs to fix

                  Function toggle has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      toggle : function (toggleEl) {
                        var self = this,
                            topbar;
                  
                        if (toggleEl) {
                  Severity: Major
                  Found in public/commander/foundation-5/js/foundation.min.js - About 2 hrs to fix

                    Function expose has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        expose : function () {
                          var expose,
                              exposeCover,
                              el,
                              origCSS,
                    Severity: Major
                    Found in public/commander/foundation-5/js/foundation/foundation.joyride.js - About 2 hrs to fix

                      Function expose has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          expose : function () {
                            var expose,
                                exposeCover,
                                el,
                                origCSS,
                      Severity: Major
                      Found in public/commander/foundation-5/js/foundation.min.js - About 2 hrs to fix

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

                            events : function (scope) {
                              var self = this,
                                  S = self.S;
                        
                              S(this.scope)
                        Severity: Major
                        Found in public/commander/foundation-5/js/foundation.min.js - About 2 hrs to fix

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

                              events : function (scope) {
                                var self = this,
                                    S = self.S;
                          
                                S(this.scope)
                          Severity: Major
                          Found in public/commander/foundation-5/js/foundation/foundation.reveal.js - About 2 hrs to fix

                            Function show has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                show : function (el, css) {
                                  // is modal
                                  if (css) {
                                    var settings = el.data(this.attr_name(true) + '-init') || this.settings,
                                        root_element = settings.root_element,
                            Severity: Major
                            Found in public/commander/foundation-5/js/foundation.min.js - About 2 hrs to fix

                              Function show has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  show : function (el, css) {
                                    // is modal
                                    if (css) {
                                      var settings = el.data(this.attr_name(true) + '-init') || this.settings,
                                          root_element = settings.root_element,
                              Severity: Major
                              Found in public/commander/foundation-5/js/foundation/foundation.reveal.js - About 2 hrs to fix

                                Function reposition has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    reposition : function (target, tip, classes) {
                                      var width, nub, nubHeight, nubWidth, column, objPos;
                                
                                      tip.css('visibility', 'hidden').show();
                                
                                
                                Severity: Major
                                Found in public/commander/foundation-5/js/foundation.min.js - About 2 hrs to fix

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

                                      events : function (scope) {
                                        var self = this,
                                            form = self.S(scope).attr('novalidate', 'novalidate'),
                                            settings = form.data(this.attr_name(true) + '-init') || {};
                                  
                                  
                                  Severity: Major
                                  Found in public/commander/foundation-5/js/foundation.min.js - About 2 hrs to fix

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

                                        events : function () {
                                          var self = this;
                                    
                                          $(this.scope)
                                            .off('.joyride')
                                    Severity: Major
                                    Found in public/commander/foundation-5/js/foundation.min.js - About 2 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language