drhenner/ror_ecommerce

View on GitHub

Showing 346 of 346 total issues

Function _renderCalendar has 94 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            _renderCalendar : function()
            {
                // set the title...
                $('h2', this.context).html(Date.monthNames[this.displayedMonth] + ' ' + this.displayedYear);
                
Severity: Major
Found in app/assets/javascripts/jquery.datePicker-2.1.2.js - About 3 hrs to fix

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

              return this.delay(function () {
                return el
                  .css(css)
                  .animate(end_css, this.settings.animationSpeed, 'linear', function () {
                    this.locked = false;
    Severity: Major
    Found in app/assets/javascripts/foundation/foundation.reveal.js and 1 other location - About 3 hrs to fix
    app/assets/javascripts/foundation/foundation.reveal.js on lines 232..240

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

    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

              return this.delay(function () {
                return el
                  .css(css)
                  .animate(end_css, this.settings.animationSpeed, 'linear', function () {
                    this.locked = false;
    Severity: Major
    Found in app/assets/javascripts/foundation/foundation.reveal.js and 1 other location - About 3 hrs to fix
    app/assets/javascripts/foundation/foundation.reveal.js on lines 246..254

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

    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

              return this.delay(function () {
                return el
                  .animate(end_css, this.settings.animationSpeed, 'linear', function () {
                    this.locked = false;
                    el.css(css).trigger('closed');
    Severity: Major
    Found in app/assets/javascripts/foundation/foundation.reveal.js and 1 other location - About 3 hrs to fix
    app/assets/javascripts/foundation/foundation.reveal.js on lines 277..284

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

    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 (this.displayedYear == sd.getFullYear() && this.displayedMonth == sd.getMonth()) {
                                $('dp-calendar td.other-month', this.context).each(
                                    function()
                                    {
                                        var $this = $(this);
    Severity: Major
    Found in app/assets/javascripts/jquery.datePicker-2.1.2.js and 1 other location - About 3 hrs to fix
    app/assets/javascripts/jquery.datePicker-2.1.2.js on lines 976..986

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

    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 (this.displayedYear == ed.getFullYear() && this.displayedMonth == ed.getMonth()) {
                                $('.dp-calendar td.other-month', this.context).each(
                                    function()
                                    {
                                        var $this = $(this);
    Severity: Major
    Found in app/assets/javascripts/jquery.datePicker-2.1.2.js and 1 other location - About 3 hrs to fix
    app/assets/javascripts/jquery.datePicker-2.1.2.js on lines 933..943

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

    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

              return this.delay(function () {
                return el
                  .animate(end_css, this.settings.animationSpeed, 'linear', function () {
                    this.locked = false;
                    el.css(css).trigger('closed');
    Severity: Major
    Found in app/assets/javascripts/foundation/foundation.reveal.js and 1 other location - About 3 hrs to fix
    app/assets/javascripts/foundation/foundation.reveal.js on lines 290..297

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

    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

          function bindLoad () {
            this.one('load', loaded);
    
            if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
              var src = this.attr( 'src' ),
    Severity: Major
    Found in app/assets/javascripts/foundation/foundation.clearing.js and 1 other location - About 3 hrs to fix
    app/assets/javascripts/foundation/foundation.interchange.js on lines 162..172

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

    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

          function bindLoad () {
            this.one('load', loaded);
    
            if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
              var src = this.attr( 'src' ),
    Severity: Major
    Found in app/assets/javascripts/foundation/foundation.interchange.js and 1 other location - About 3 hrs to fix
    app/assets/javascripts/foundation/foundation.clearing.js on lines 346..356

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

    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

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

    /*jslint unparam: true, browser: true, indent: 2 */
    
    ;
    (function($, window, document) {
      'use strict';
    Severity: Minor
    Found in app/assets/javascripts/foundation/foundation.section.js - About 3 hrs to fix

      Class Product has 29 methods (exceeds 20 allowed). Consider refactoring.
      Open

      class Product < ApplicationRecord
        extend FriendlyId
        friendly_id :permalink, use: :finders
        include Presentation::ProductPresenter
        include ProductFilters
      Severity: Minor
      Found in app/models/product.rb - About 3 hrs to fix

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

              if (arguments.length > 0 && arguments[0] instanceof $) {
                el = arguments[0];
              } else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){
                el = this.settings.$target;
              }  else {
        Severity: Major
        Found in app/assets/javascripts/foundation/foundation.joyride.js and 1 other location - About 3 hrs to fix
        app/assets/javascripts/foundation/foundation.joyride.js on lines 580..586

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

        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 (arguments.length > 0 && arguments[0] instanceof $) {
                el = arguments[0];
              } else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){
                el = this.settings.$target;
              }  else {
        Severity: Major
        Found in app/assets/javascripts/foundation/foundation.joyride.js and 1 other location - About 3 hrs to fix
        app/assets/javascripts/foundation/foundation.joyride.js on lines 646..652

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

        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

        Consider simplifying this complex logical expression.
        Open

            if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
                (t == 'checkbox' || t == 'radio') && !el.checked ||
                (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
                tag == 'select' && el.selectedIndex == -1))
                    return null;
        Severity: Critical
        Found in app/assets/javascripts/jqwizard/jquery.form.js - About 3 hrs to fix

          Class Variant has 27 methods (exceeds 20 allowed). Consider refactoring.
          Open

          class Variant < ApplicationRecord
          
            has_many :variant_suppliers
            has_many :suppliers,         through: :variant_suppliers
          
          
          Severity: Minor
          Found in app/models/variant.rb - About 3 hrs to fix

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

            class User < ApplicationRecord
              include AASM
              include TransactionAccountable
              include UserCim
              include Presentation::UserPresenter
            Severity: Minor
            Found in app/models/user.rb - About 3 hrs to fix

              Function renderCalendar has 79 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      renderCalendar  :   function(s)
                      {
                          var dc = function(a)
                          {
                              return document.createElement(a);
              Severity: Major
              Found in app/assets/javascripts/jquery.datePicker-2.1.2.js - About 3 hrs to fix

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

                /*jslint unparam: true, browser: true, indent: 2 */
                
                ;(function ($, window, document, undefined) {
                  'use strict';
                
                
                Severity: Minor
                Found in app/assets/javascripts/foundation/foundation.topbar.js - About 3 hrs to fix

                  Function markup has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        function markup(button) {
                          var len, j, n, i;
                          hash = clicked = button;
                          get();
                          $.extend(hash, {  line:"",
                  Severity: Major
                  Found in app/assets/javascripts/markitup/jquery.markitup.js - About 2 hrs to fix

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

                                  } else if ($associatedElement.attr('type') === 'radio') {
                                    e.preventDefault();
                                    $customRadio = $(this).find('span.custom.radio');
                                    //the radio might be outside after the label or inside of another element
                                    if ($customRadio.length === 0) {
                    Severity: Major
                    Found in app/assets/javascripts/foundation/foundation.forms.js and 1 other location - About 2 hrs to fix
                    app/assets/javascripts/foundation/foundation.forms.js on lines 81..97

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

                    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