capistrano/capistrano

View on GitHub

Showing 115 of 115 total issues

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

      if (target.prev().length > 0) {
        visible_image
          .find('.clearing-main-prev')
          .removeClass('disabled');
      } else {
Severity: Major
Found in docs/assets/js/foundation/foundation.clearing.js and 1 other location - About 1 hr to fix
docs/assets/js/foundation/foundation.clearing.js on lines 281..289

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 64.

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

Function swipe_events has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    swipe_events : function () {
      var self = this;

      $(this.scope)
        .on('touchstart.fndtn.clearing', '.visible-img', function(e) {
Severity: Minor
Found in docs/assets/js/foundation/foundation.clearing.js - About 1 hr to fix

    Function start has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        start : function () {
          var self = this,
              $this = $(this.scope).find('[data-joyride]'),
              integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
              int_settings_count = integer_settings.length;
    Severity: Minor
    Found in docs/assets/js/foundation/foundation.joyride.js - About 1 hr to fix

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

          show : function (el, css) {
            // is modal
            if (css) {
              if (/pop/i.test(this.settings.animation)) {
                css.top = $(window).scrollTop() - el.data('offset') + 'px';
      Severity: Minor
      Found in docs/assets/js/foundation/foundation.reveal.js - About 1 hr to fix

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

            css : function (dropdown, target) {
              var offset_parent = dropdown.offsetParent();
              // temporary workaround until 4.2
              if (offset_parent.length > 0 && /body/i.test(dropdown.offsetParent()[0].nodeName)) {
                var position = target.offset();
        Severity: Minor
        Found in docs/assets/js/foundation/foundation.dropdown.js - About 1 hr to fix

          Function setPlaceholder has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function setPlaceholder() {
                  var $replacement,
                      input = this,
                      $input = $(input),
                      $origInput = $input,
          Severity: Minor
          Found in docs/assets/js/foundation/foundation.placeholder.js - About 1 hr to fix

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

                events : function () {
                  var self = this;
            
                  $(this.scope)
                    .on('click.fndtn.dropdown', '[data-dropdown]', function (e) {
            Severity: Minor
            Found in docs/assets/js/foundation/foundation.dropdown.js - About 1 hr to fix

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

                    lib.outerHeight = function (el, bool) {
                      if (typeof Zepto === 'function') {
                        return el.height();
                      }
              
              
              Severity: Major
              Found in docs/assets/js/foundation/foundation.js and 1 other location - About 1 hr to fix
              docs/assets/js/foundation/foundation.js on lines 405..415

              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 61.

              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

              Identical blocks of code found in 3 locations. Consider refactoring.
              Open

                    if (typeof method === 'object') {
                      $.extend(true, this.settings, method);
                    } else if (typeof options !== 'undefined') {
                      $.extend(true, this.settings, options);
                    }
              Severity: Major
              Found in docs/assets/js/foundation/foundation.topbar.js and 2 other locations - About 1 hr to fix
              docs/assets/js/foundation/foundation.reveal.js on lines 42..46
              docs/assets/js/foundation/foundation.tooltips.js on lines 30..34

              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 61.

              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

              Identical blocks of code found in 3 locations. Consider refactoring.
              Open

                    if (typeof method === 'object') {
                      $.extend(true, this.settings, method);
                    } else if (typeof options !== 'undefined') {
                      $.extend(true, this.settings, options);
                    }
              Severity: Major
              Found in docs/assets/js/foundation/foundation.reveal.js and 2 other locations - About 1 hr to fix
              docs/assets/js/foundation/foundation.tooltips.js on lines 30..34
              docs/assets/js/foundation/foundation.topbar.js on lines 25..29

              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 61.

              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

              Identical blocks of code found in 3 locations. Consider refactoring.
              Open

                    if (typeof method === 'object') {
                      $.extend(true, this.settings, method);
                    } else if (typeof options !== 'undefined') {
                      $.extend(true, this.settings, options);
                    }
              Severity: Major
              Found in docs/assets/js/foundation/foundation.tooltips.js and 2 other locations - About 1 hr to fix
              docs/assets/js/foundation/foundation.reveal.js on lines 42..46
              docs/assets/js/foundation/foundation.topbar.js on lines 25..29

              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 61.

              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

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

                    lib.outerWidth = function (el) {
                      if (typeof Zepto === 'function') {
                        return el.width();
                      }
              
              
              Severity: Major
              Found in docs/assets/js/foundation/foundation.js and 1 other location - About 1 hr to fix
              docs/assets/js/foundation/foundation.js on lines 393..403

              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 61.

              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

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

                  refresh_custom_select: function ($select, force_refresh) {
                    var self = this;
                    var maxWidth = 0,
                        $customSelect = $select.next(),
                        $options = $select.find('option'),
              Severity: Minor
              Found in docs/assets/js/foundation/foundation.forms.js - About 1 hr to fix

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

                    hide : function (el, css) {
                      // is modal
                      if (css) {
                        if (/pop/i.test(this.settings.animation)) {
                          var end_css = {
                Severity: Minor
                Found in docs/assets/js/foundation/foundation.reveal.js - About 1 hr to fix

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

                      events : function () {
                        var self = this;
                  
                        $(this.scope)
                          .on('click.fndtn.clearing', 'ul[data-clearing] li',
                  Severity: Minor
                  Found in docs/assets/js/foundation/foundation.clearing.js - About 1 hr to fix

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

                                if (Foundation.rtl) {
                                  leftOffset = this.settings.$target.offset().width - this.settings.$next_tip.width() + leftOffset;
                                }
                    Severity: Major
                    Found in docs/assets/js/foundation/foundation.joyride.js and 1 other location - About 1 hr to fix
                    docs/assets/js/foundation/foundation.joyride.js on lines 445..447

                    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 60.

                    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

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

                                if (Foundation.rtl) {
                                  leftOffset = this.settings.$target.offset().width - this.settings.$next_tip.width() + leftOffset;
                                }
                    Severity: Major
                    Found in docs/assets/js/foundation/foundation.joyride.js and 1 other location - About 1 hr to fix
                    docs/assets/js/foundation/foundation.joyride.js on lines 434..436

                    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 60.

                    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

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

                        var config = $.cookie = function (key, value, options) {
                    
                            // Write
                    
                            if (arguments.length > 1 && !$.isFunction(value)) {
                    Severity: Minor
                    Found in docs/assets/js/jquery.cookie.js - About 1 hr to fix

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

                          init : function (section, method, options) {
                            Foundation.inherit(this, 'data_options');
                            var self = this;
                      
                            if (typeof method === 'object') {
                      Severity: Minor
                      Found in docs/assets/js/foundation/foundation.topbar.js - About 1 hr to fix

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

                            events : function () {
                              var self = this;
                        
                              $(this.scope)
                                .on('click.fndtn.section', '[data-section] .title, [data-section] [data-section-title]', function (e) {
                        Severity: Minor
                        Found in docs/assets/js/foundation/foundation.section.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language