drhenner/ror_ecommerce

View on GitHub

Showing 346 of 346 total issues

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

        switch (this.options.captionAnimation) {
          case 'none':
            this.$caption.show();
            break;
          case 'fade':
Severity: Major
Found in app/assets/javascripts/admin/jquery.orbit-1.4.0.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/admin/jquery.orbit-1.4.0.js on lines 349..359

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

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

        switch (this.options.captionAnimation) {
          case 'none':
            this.$caption.hide();
            break;
          case 'fade':
Severity: Major
Found in app/assets/javascripts/admin/jquery.orbit-1.4.0.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/admin/jquery.orbit-1.4.0.js on lines 336..346

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

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

          objPos(tip, (target.offset().top + (target.outerHeight() / 2) - nubHeight), 'auto', 'auto', (target.offset().left - tip.outerWidth() - 10), width)
            .removeClass('tip-override');
Severity: Major
Found in app/assets/javascripts/admin/jquery.tooltips.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/admin/jquery.tooltips.js on lines 141..142

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

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 normalizeRules has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    normalizeRules: function(rules, element) {
        // handle dependency check
        $.each(rules, function(prop, val) {
            // ignore rule when param is explicitly false, eg. required:false
            if (val === false) {
Severity: Major
Found in app/assets/javascripts/jqwizard/jquery.validate.js - About 2 hrs to fix

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

        toggle: function() {
          var self = this;
          var topbar = $('.top-bar, [data-topbar]'),
              section = topbar.find('section, .section');
    
    
    Severity: Minor
    Found in app/assets/javascripts/foundation/foundation.topbar.js - About 2 hrs to fix

      Function set_active_from_hash has 50 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          set_active_from_hash: function() {
            var self = Foundation.libs.section,
                hash = window.location.hash.substring(1),
                sections = $(self.settings.section_selector);
      
      
      Severity: Minor
      Found in app/assets/javascripts/foundation/foundation.section.js - About 2 hrs 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 app/assets/javascripts/foundation_init/foundation.js and 1 other location - About 2 hrs to fix
        app/assets/javascripts/foundation_init/foundation.js on lines 428..438

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

        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, bool) {
                if (typeof Zepto === 'function') {
                  return el.width();
                }
        
        
        Severity: Major
        Found in app/assets/javascripts/foundation_init/foundation.js and 1 other location - About 2 hrs to fix
        app/assets/javascripts/foundation_init/foundation.js on lines 416..426

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

        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

                      this.delay(function () {
                        $timer.animate({
                          width: $timer.parent().width()
                        }, this.settings.timer, 'linear');
                      }.bind(this), this.settings.tipAnimationFadeSpeed);
        Severity: Major
        Found in app/assets/javascripts/foundation/foundation.joyride.js and 1 other location - About 1 hr to fix
        app/assets/javascripts/foundation/foundation.joyride.js on lines 285..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 74.

        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

                      this.delay(function () {
                        $timer.animate({
                          width: $timer.parent().width()
                        }, this.settings.timer, 'linear');
                      }.bind(this), this.settings.tipAnimationFadeSpeed);
        Severity: Major
        Found in app/assets/javascripts/foundation/foundation.joyride.js and 1 other location - About 1 hr to fix
        app/assets/javascripts/foundation/foundation.joyride.js on lines 307..311

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

        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 un_expose has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            un_expose : function () {
              var exposeId,
                  el,
                  expose ,
                  origCSS,
        Severity: Minor
        Found in app/assets/javascripts/foundation/foundation.joyride.js - About 1 hr to fix

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

                exposeCover.css({
                  top: el.offset().top,
                  left: el.offset().left,
                  width: this.outerWidth(el, true),
                  height: this.outerHeight(el, true)
          Severity: Major
          Found in app/assets/javascripts/foundation/foundation.joyride.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/foundation/foundation.joyride.js on lines 597..602

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

          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

                expose.css({
                  top: el.offset().top,
                  left: el.offset().left,
                  width: this.outerWidth(el, true),
                  height: this.outerHeight(el, true)
          Severity: Major
          Found in app/assets/javascripts/foundation/foundation.joyride.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/foundation/foundation.joyride.js on lines 623..628

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

          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 set_up_html has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              Chosen.prototype.set_up_html = function() {
                var container_div, dd_top, dd_width, sf_width;
                this.container_id = this.form_field.id.length ? this.form_field.id.replace(/(:|\.)/g, '_') : this.generate_field_id();
                this.container_id += "_chzn";
                this.f_width = this.form_field_jq.outerWidth() + 60;
          Severity: Minor
          Found in app/assets/javascripts/chosen/chosen.jquery.js - About 1 hr to fix

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

                  function init() {
                    id = ''; nameSpace = '';
                    if (options.id) {
                      id = 'id="'+options.id+'"';
                    } else if ($$.attr("id")) {
            Severity: Minor
            Found in app/assets/javascripts/markitup/jquery.markitup.js - About 1 hr to fix

              Function remote has 44 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      remote: function(value, element, param) {
                          if ( this.optional(element) )
                              return "dependency-mismatch";
                          
                          var previous = this.previousValue(element);
              Severity: Minor
              Found in app/assets/javascripts/jqwizard/jquery.validate.js - About 1 hr to fix

                Function dropMenus has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      function dropMenus(markupSet) {
                        var ul = $('<ul></ul>'), i = 0;
                        $('li:hover > ul', ul).css('display', 'block');
                        $.each(markupSet, function() {
                          var button = this, t = '', title, li, j;
                Severity: Minor
                Found in app/assets/javascripts/markitup/jquery.markitup.js - About 1 hr to fix

                  Function keyPressed has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        function keyPressed(e) {
                          shiftKey = e.shiftKey;
                          altKey = e.altKey;
                          ctrlKey = (!(e.altKey && e.ctrlKey)) ? (e.ctrlKey || e.metaKey) : false;
                  
                  
                  Severity: Minor
                  Found in app/assets/javascripts/markitup/jquery.markitup.js - About 1 hr to fix

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

                            if (slides_container.height() != next.height() && settings.variable_height) {
                              slides_container.animate({'height': next.height()}, 250, 'linear', unlock);
                            } else {
                              unlock();
                            }
                    Severity: Major
                    Found in app/assets/javascripts/foundation/foundation.orbit.js and 1 other location - About 1 hr to fix
                    app/assets/javascripts/foundation/foundation.orbit.js on lines 130..134

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

                    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

                          if (next.height() > slides_container.height() && settings.variable_height) {
                            slides_container.animate({'height': next.height()}, 250, 'linear', start_animation);
                          } else {
                            start_animation();
                          }
                    Severity: Major
                    Found in app/assets/javascripts/foundation/foundation.orbit.js and 1 other location - About 1 hr to fix
                    app/assets/javascripts/foundation/foundation.orbit.js on lines 116..120

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

                    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

                    Severity
                    Category
                    Status
                    Source
                    Language