drhenner/ror_ecommerce

View on GitHub

Showing 346 of 346 total issues

Function fileUpload has 156 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function fileUpload() {
        var form = $form[0];

        if ($(':input[name=submit]', form).length) {
            alert('Error: Form elements must not be named "submit".');
Severity: Major
Found in app/assets/javascripts/jqwizard/jquery.form.js - About 6 hrs to fix

    File jquery.form.js has 424 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * jQuery Form Plugin
     * version: 2.43 (12-MAR-2010)
     * @requires jQuery v1.3.2 or later
     *
    Severity: Minor
    Found in app/assets/javascripts/jqwizard/jquery.form.js - About 6 hrs to fix

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

          events: function () {
            var self = this;
      
            $(this.scope)
              .on('click.fndtn.forms', 'form.custom span.custom.checkbox', function (e) {
      Severity: Major
      Found in app/assets/javascripts/foundation/foundation.forms.js - About 5 hrs to fix

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

        (function ($, window, document, undefined) {
          'use strict';
        
          Foundation.libs.forms = {
            name : 'forms',
        Severity: Minor
        Found in app/assets/javascripts/foundation/foundation.forms.js - About 5 hrs to fix

          Function reveal has 139 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            $.fn.reveal = function (options) {
              var defaults = {
                animation: 'fadeAndPop',                // fade, fadeAndPop, none
                animationSpeed: 300,                    // how fast animtions are
                closeOnBackgroundClick: true,           // if you click background will modal close?
          Severity: Major
          Found in app/assets/javascripts/admin/jquery.reveal.js - About 5 hrs to fix

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

                init : function (scope, method, options) {
                  this.scope = scope || this.scope;
                  Foundation.inherit(this, 'data_options');
            
                  if (typeof method === 'object') {
            Severity: Major
            Found in app/assets/javascripts/foundation/foundation.alerts.js and 1 other location - About 5 hrs to fix
            app/assets/javascripts/foundation/foundation.dropdown.js on lines 18..36

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

            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

                init : function (scope, method, options) {
                  this.scope = scope || this.scope;
                  Foundation.inherit(this, 'throttle scrollLeft data_options');
            
                  if (typeof method === 'object') {
            Severity: Major
            Found in app/assets/javascripts/foundation/foundation.dropdown.js and 1 other location - About 5 hrs to fix
            app/assets/javascripts/foundation/foundation.alerts.js on lines 17..32

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

            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.clearing.js has 394 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.clearing.js - About 5 hrs to fix

              File jquery.form.wizard.js has 392 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*
               * jQuery wizard plug-in 3.0.5
               *
               *
               * Copyright (c) 2011 Jan Sundman (jan.sundman[at]aland.net)
              Severity: Minor
              Found in app/assets/javascripts/jqwizard/jquery.form.wizard.js - About 5 hrs to fix

                Function display has 123 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                            display : function(eleAlignTo)
                            {
                                if ($(this.ele).is('.dp-disabled')) return;
                                
                                eleAlignTo = eleAlignTo || this.ele;
                Severity: Major
                Found in app/assets/javascripts/jquery.datePicker-2.1.2.js - About 4 hrs to fix

                  File jquery-migrate-1.1.1.js has 371 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /*!
                   * jQuery Migrate - v1.1.1 - 2013-02-16
                   * https://github.com/jquery/jquery-migrate
                   * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
                   */
                  Severity: Minor
                  Found in app/assets/javascripts/jquery/jquery-migrate-1.1.1.js - About 4 hrs to fix

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

                    ;(function ($, window, document, undefined) {
                      'use strict';
                    
                      var noop = function() {};
                    
                    
                    Severity: Minor
                    Found in app/assets/javascripts/foundation/foundation.orbit.js - About 4 hrs to fix

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

                          events : function () {
                            var self = this;
                            $(this.scope)
                              .off('.fndtn.topbar')
                              .on('click.fndtn.topbar', '.top-bar .toggle-topbar, [data-topbar] .toggle-topbar', function (e) {
                      Severity: Major
                      Found in app/assets/javascripts/foundation/foundation.topbar.js - About 4 hrs to fix

                        Function _init has 111 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                _init: function() {
                        
                                    var wizard = this;
                                    var formOptionsSuccess = this.options.formOptions.success;
                                    var formOptionsComplete = this.options.formOptions.complete;
                        Severity: Major
                        Found in app/assets/javascripts/jqwizard/jquery.form.wizard.js - About 4 hrs to fix

                          Function resize has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              resize: function(sections, ensure_has_active_region) {
                          
                                var self = Foundation.libs.section,
                                    section_container = $(self.settings.section_selector),
                                    is_small_window = self.small(section_container),
                          Severity: Major
                          Found in app/assets/javascripts/foundation/foundation.section.js - About 4 hrs to fix

                            Function shift has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                shift: function (direction) {
                                  var slideDirection = direction;
                            
                                  //remember previous activeSlide
                                  this.prevActiveSlide = this.activeSlide;
                            Severity: Major
                            Found in app/assets/javascripts/admin/jquery.orbit-1.4.0.js - About 4 hrs to fix

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

                                        if (e.which === 38) {
                                          var current = dropdown.find('li.selected'),
                                              prev = current.prev(':not(.disabled)');
                              
                                          if (prev.length > 0) {
                              Severity: Major
                              Found in app/assets/javascripts/foundation/foundation.forms.js and 1 other location - About 4 hrs to fix
                              app/assets/javascripts/foundation/foundation.forms.js on lines 212..221

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

                              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

                                        } else if (e.which === 40) {
                                          var current = dropdown.find('li.selected'),
                                              next = current.next(':not(.disabled)');
                              
                                          if (next.length > 0) {
                              Severity: Major
                              Found in app/assets/javascripts/foundation/foundation.forms.js and 1 other location - About 4 hrs to fix
                              app/assets/javascripts/foundation/foundation.forms.js on lines 203..221

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

                              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.js has 337 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /*
                               * Foundation Responsive Library
                               * http://foundation.zurb.com
                               * Copyright 2013, ZURB
                               * Free to use under the MIT license.
                              Severity: Minor
                              Found in app/assets/javascripts/foundation_init/foundation.js - About 4 hrs to fix

                                File order.rb has 324 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                class Order < ApplicationRecord
                                  include AASM
                                  extend FriendlyId
                                  friendly_id :number
                                  include Presentation::OrderPresenter
                                Severity: Minor
                                Found in app/models/order.rb - About 3 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language