fiedl/wingolfsplattform

View on GitHub
public/commander/foundation-5/js/foundation/foundation.orbit.js

Summary

Maintainability
F
1 mo
Test Coverage

Function Orbit has 257 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  var Orbit = function (el, settings) {
    // Don't reinitialize plugin
    if (el.hasClass(settings.slides_container_class)) {
      return this;
    }
Severity: Major
Found in public/commander/foundation-5/js/foundation/foundation.orbit.js - About 1 day to fix

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

    ;(function ($, window, document, undefined) {
      'use strict';
    
      var noop = function () {};
    
    
    Severity: Minor
    Found in public/commander/foundation-5/js/foundation/foundation.orbit.js - About 5 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 _goto has 50 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            self._goto = function (next_idx, start_timer) {
              // if (locked) {return false;}
              if (next_idx === idx) {return false;}
              if (typeof timer === 'object') {timer.restart();}
              var slides = self.slides();
        Severity: Minor
        Found in public/commander/foundation-5/js/foundation/foundation.orbit.js - About 2 hrs to fix

          Function Timer has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            var Timer = function (el, settings, callback) {
              var self = this,
                  duration = settings.timer_speed,
                  progress = el.find('.' + settings.timer_progress_class),
                  start,
          Severity: Minor
          Found in public/commander/foundation-5/js/foundation/foundation.orbit.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

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              ;(function ($, window, document, undefined) {
                'use strict';
              
                var noop = function () {};
              
              
              public/commander/foundation-5/js/foundation.min.js on lines 3092..3567

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 4800.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              There are no issues that match your filters.

              Category
              Status