fiedl/wingolfsplattform

View on GitHub

Showing 180 of 222 total issues

Method import has a Cognitive Complexity of 26 (exceeds 5 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 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 events has 87 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 3 hrs to fix

    Function events has 87 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.dropdown.js - About 3 hrs to fix

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

        def import
          log.head "Wingolfsplattform User Import"
          
          log.section "Import Parameters"
          log.info "Import file:   #{@filename}"
      Severity: Minor
      Found in lib/importers/user_importer.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 check_validation_and_apply_styles has 85 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          check_validation_and_apply_styles : function (el_patterns) {
            var i = el_patterns.length,
                validations = [],
                form = this.S(el_patterns[0][0]).closest('[data-' + this.attr_name(true) + ']'),
                settings = form.data(this.attr_name(true) + '-init') || {};
      Severity: Major
      Found in public/commander/foundation-5/js/foundation/foundation.abide.js - About 3 hrs to fix

        Function check_validation_and_apply_styles has 85 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            check_validation_and_apply_styles : function (el_patterns) {
              var i = el_patterns.length,
                  validations = [],
                  form = this.S(el_patterns[0][0]).closest('[data-' + this.attr_name(true) + ']'),
                  settings = form.data(this.attr_name(true) + '-init') || {};
        Severity: Major
        Found in public/commander/foundation-5/js/foundation.min.js - About 3 hrs to fix

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

              open : function (target, ajax_settings) {
                var self = this,
                    modal;
          
                if (target) {
          Severity: Major
          Found in public/commander/foundation-5/js/foundation.min.js - About 3 hrs to fix

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

                open : function (target, ajax_settings) {
                  var self = this,
                      modal;
            
                  if (target) {
            Severity: Major
            Found in public/commander/foundation-5/js/foundation/foundation.reveal.js - About 3 hrs to fix

              Method import_secondary_corporations_from has a Cognitive Complexity of 23 (exceeds 5 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 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 rights_for_local_admins has 81 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def rights_for_local_admins
                  can :index, PublicActivity::Activity
                  can :index, Issue
              
                  if not read_only_mode?
              Severity: Major
              Found in app/models/ability.rb - About 3 hrs to fix

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

                    events : function () {
                      var self = this,
                          S = self.S,
                          move_class = '',
                          right_postfix = '',
                Severity: Major
                Found in public/commander/foundation-5/js/foundation/foundation.offcanvas.js - About 3 hrs to fix

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

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

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

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

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

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

                        Function toggle_active_tab has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            toggle_active_tab : function (tab, location_hash) {
                              var self = this,
                                  S = self.S,
                                  tabs = tab.closest('[' + this.attr_name() + ']'),
                                  tab_link = tab.find('a'),
                        Severity: Major
                        Found in public/commander/foundation-5/js/foundation/foundation.tab.js - About 3 hrs to fix

                          Function toggle_active_tab has 77 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              toggle_active_tab : function (tab, location_hash) {
                                var self = this,
                                    S = self.S,
                                    tabs = tab.closest('[' + this.attr_name() + ']'),
                                    tab_link = tab.find('a'),
                          Severity: Major
                          Found in public/commander/foundation-5/js/foundation.min.js - About 3 hrs to fix

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

                                show : function (init, is_prev) {
                                  var $timer = null;
                            
                                  // are we paused?
                                  if (this.settings.$li === undefined || ($.inArray(this.settings.$li.index(), this.settings.pause_after) === -1)) {
                            Severity: Major
                            Found in public/commander/foundation-5/js/foundation/foundation.joyride.js - About 2 hrs to fix

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

                                  show : function (init, is_prev) {
                                    var $timer = null;
                              
                                    // are we paused?
                                    if (this.settings.$li === undefined || ($.inArray(this.settings.$li.index(), this.settings.pause_after) === -1)) {
                              Severity: Major
                              Found in public/commander/foundation-5/js/foundation.min.js - About 2 hrs to fix

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

                                    self.init = function () {
                                      self.build_markup();
                                      if (settings.timer) {
                                        timer = self.create_timer();
                                        Foundation.utils.image_loaded(this.slides().children('img'), timer.start);
                                Severity: Major
                                Found in public/commander/foundation-5/js/foundation/foundation.orbit.js - About 2 hrs to fix

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

                                      self.init = function () {
                                        self.build_markup();
                                        if (settings.timer) {
                                          timer = self.create_timer();
                                          Foundation.utils.image_loaded(this.slides().children('img'), timer.start);
                                  Severity: Major
                                  Found in public/commander/foundation-5/js/foundation.min.js - About 2 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language