Showing 203 of 346 total issues
Function Zepto
has a Cognitive Complexity of 301 (exceeds 5 allowed). Consider refactoring. Open
Open
var Zepto = (function() {
var undefined, key, $, classList, emptyArray = [], slice = emptyArray.slice, filter = emptyArray.filter,
document = window.document,
elementDisplay = {}, classCache = {},
getComputedStyle = document.defaultView.getComputedStyle,
- Read upRead up
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
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
Function Zepto
has 647 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Zepto = (function() {
var undefined, key, $, classList, emptyArray = [], slice = emptyArray.slice, filter = emptyArray.filter,
document = window.document,
elementDisplay = {}, classCache = {},
getComputedStyle = document.defaultView.getComputedStyle,
Function markItUp
has 466 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.markItUp = function(settings, extraSettings) {
var options, ctrlKey, shiftKey, altKey;
ctrlKey = shiftKey = altKey = false;
options = { id: '',
File jquery.validate.js
has 905 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* jQuery validation plug-in 1.7
*
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/
* http://docs.jquery.com/Plugins/Validation
File chosen.jquery.js
has 881 lines of code (exceeds 250 allowed). Consider refactoring. Open
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
File jquery.datePicker-2.1.2.js
has 739 lines of code (exceeds 250 allowed). Consider refactoring. Open
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.
*
File foundation.joyride.js
has 657 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*jslint unparam: true, browser: true, indent: 2 */
(function ($, window, document, undefined) {
'use strict';
Function ajaxSubmit
has 244 lines of code (exceeds 25 allowed). Consider refactoring. Open
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;
Function Orbit
has 228 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Orbit = function(el, settings) {
// Don't reinitialize plugin
if (el.hasClass(settings.slides_container_class)) {
return this;
}
File jquery.orbit-1.4.0.js
has 508 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* jQuery Orbit Plugin 1.4.0
* www.ZURB.com/playground
* Copyright 2010, ZURB
* Free to use under the MIT license.
File jquery.markitup.js
has 489 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// ----------------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// v 1.1.x
// Dual licensed under the MIT and GPL licenses.
// ----------------------------------------------------------------------------
Class Order
has 51 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Order < ApplicationRecord
include AASM
extend FriendlyId
friendly_id :number
include Presentation::OrderPresenter
Function selectList
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.selectList = function(select, options) {
var
$list,
Function fileUpload
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fileUpload() {
var form = $form[0];
if ($(':input[name=submit]', form).length) {
alert('Error: Form elements must not be named "submit".');
File jquery.form.js
has 424 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery Form Plugin
* version: 2.43 (12-MAR-2010)
* @requires jQuery v1.3.2 or later
*
Function events
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
events: function () {
var self = this;
$(this.scope)
.on('click.fndtn.forms', 'form.custom span.custom.checkbox', function (e) {
File foundation.forms.js
has 401 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
(function ($, window, document, undefined) {
'use strict';
Foundation.libs.forms = {
name : 'forms',
Function reveal
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
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?
File foundation.clearing.js
has 394 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*jslint unparam: true, browser: true, indent: 2 */
;(function ($, window, document, undefined) {
'use strict';