drhenner/ror_ecommerce

View on GitHub

Showing 203 of 346 total issues

Function Zepto has a Cognitive Complexity of 301 (exceeds 5 allowed). Consider refactoring.
Open

var Zepto = (function() {
  var undefined, key, $, classList, emptyArray = [], slice = emptyArray.slice, filter = emptyArray.filter,
    document = window.document,
    elementDisplay = {}, classCache = {},
    getComputedStyle = document.defaultView.getComputedStyle,
Severity: Minor
Found in app/assets/javascripts/zepto.js - About 6 days to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

File zepto.js has 1530 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* Zepto v1.0-1-ga3cab6c - polyfill zepto detect event ajax form fx - zeptojs.com/license */


;(function(undefined){
  if (String.prototype.trim === undefined) // fix for iOS 3.2
Severity: Major
Found in app/assets/javascripts/zepto.js - About 4 days to fix

    Function Zepto has 647 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var Zepto = (function() {
      var undefined, key, $, classList, emptyArray = [], slice = emptyArray.slice, filter = emptyArray.filter,
        document = window.document,
        elementDisplay = {}, classCache = {},
        getComputedStyle = document.defaultView.getComputedStyle,
    Severity: Major
    Found in app/assets/javascripts/zepto.js - About 3 days to fix

      Function markItUp has 466 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        $.fn.markItUp = function(settings, extraSettings) {
          var options, ctrlKey, shiftKey, altKey;
          ctrlKey = shiftKey = altKey = false;
      
          options = { id:           '',
      Severity: Major
      Found in app/assets/javascripts/markitup/jquery.markitup.js - About 2 days to fix

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

        /*
         * jQuery validation plug-in 1.7
         *
         * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
         * http://docs.jquery.com/Plugins/Validation
        Severity: Major
        Found in app/assets/javascripts/jqwizard/jquery.validate.js - About 2 days to fix

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

          // Chosen, a Select Box Enhancer for jQuery and Protoype
          // by Patrick Filler for Harvest, http://getharvest.com
          //
          // Version 0.9.5
          // Full source at https://github.com/harvesthq/chosen
          Severity: Major
          Found in app/assets/javascripts/chosen/chosen.jquery.js - About 2 days to fix

            File jquery.datePicker-2.1.2.js has 739 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /**
             * Copyright (c) 2008 Kelvin Luck (http://www.kelvinluck.com/)
             * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
             * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
             *
            Severity: Major
            Found in app/assets/javascripts/jquery.datePicker-2.1.2.js - About 1 day to fix

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

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

                Function ajaxSubmit has 244 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                $.fn.ajaxSubmit = function(options) {
                    // fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
                    if (!this.length) {
                        log('ajaxSubmit: skipping submit process - no element selected');
                        return this;
                Severity: Major
                Found in app/assets/javascripts/jqwizard/jquery.form.js - About 1 day to fix

                  Function Orbit has 228 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 app/assets/javascripts/foundation/foundation.orbit.js - About 1 day to fix

                    File jquery.orbit-1.4.0.js has 508 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /*
                     * jQuery Orbit Plugin 1.4.0
                     * www.ZURB.com/playground
                     * Copyright 2010, ZURB
                     * Free to use under the MIT license.
                    Severity: Major
                    Found in app/assets/javascripts/admin/jquery.orbit-1.4.0.js - About 1 day to fix

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

                      // ----------------------------------------------------------------------------
                      // markItUp! Universal MarkUp Engine, JQuery plugin
                      // v 1.1.x
                      // Dual licensed under the MIT and GPL licenses.
                      // ----------------------------------------------------------------------------
                      Severity: Minor
                      Found in app/assets/javascripts/markitup/jquery.markitup.js - About 7 hrs to fix

                        Class Order has 51 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                        class Order < ApplicationRecord
                          include AASM
                          extend FriendlyId
                          friendly_id :number
                          include Presentation::OrderPresenter
                        Severity: Major
                        Found in app/models/order.rb - About 7 hrs to fix

                          Function selectList has 173 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          $.selectList = function(select, options) {
                              var
                          
                                  $list,
                          
                          
                          Severity: Major
                          Found in app/assets/javascripts/jquery.selectlist.js - About 6 hrs to fix

                            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

                                      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
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language