Showing 371 of 658 total issues
File jquery-ui-1.10.0.custom.js
has 11613 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*! jQuery UI - v1.10.0 - 2013-01-17
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.slider.js, jquery.ui.sortable.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
* Copyright (c) 2013 jQuery Foundation and other contributors Licensed MIT */
File jquery-1.9.0.js
has 6540 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery JavaScript Library v1.9.0
* http://jquery.com/
*
* Includes Sizzle.js
File jquery-ui-timepicker-addon.js
has 1470 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* jQuery timepicker addon
* By: Trent Richardson [http://trentrichardson.com]
* Version 1.2
* Last Modified: 02/02/2013
Function ajax
has 237 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ajax: function( url, options ) {
// If url is an object, simulate pre-1.5 signature
if ( typeof url === "object" ) {
options = url;
Function setDocument
has 232 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setDocument = Sizzle.setDocument = function( node ) {
var doc = node ? node.ownerDocument || node : preferredDoc;
// If no document and documentElement is available, return
if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
Function mask
has 231 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
mask: function(mask, settings) {
var input,
defs,
tests,
partialPosition,
Function _create
has 191 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
// Some browsers only repeat keydown events, not keypress events,
// so we use the suppressKeyPress flag to determine if we've already
// handled the keydown event. #7269
// Unfortunately the code for & in keypress is the same as the up arrow,
Function _generateHTML
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_generateHTML: function(inst) {
var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
Function selectToUISlider
has 162 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.fn.selectToUISlider = function(settings){
var selects = jQuery(this);
//accessible slider options
var options = jQuery.extend({
Function size
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.effects.effect.size = function( o, done ) {
// Create element
var original, baseline, factor,
el = $( this ),
Function parseTime
has 154 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.datepicker.parseTime = function(timeFormat, timeString, options) {
var o = extendRemove(extendRemove({}, $.timepicker._defaults), options || {});
// Strict parse requires the timeString to match the timeFormat exactly
var strictParse = function(f, s, o){
Function parseDate
has 148 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseDate: function (format, value, settings) {
if (format == null || value == null) {
throw "Invalid arguments";
}
Function position
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.position = function( options ) {
if ( !options || !options.of ) {
return _position.apply( this, arguments );
}
Function _injectTimePicker
has 146 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_injectTimePicker: function() {
var $dp = this.inst.dpDiv,
o = this.inst.settings,
tp_inst = this,
litem = '',
Function _create
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_create: function() {
this.element.closest( "form" )
.unbind( "reset" + this.eventNamespace )
.bind( "reset" + this.eventNamespace, formResetHandler );
Method build_and_set
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
Open
def build_and_set(context, r)
# text_validation_type text_validation_min text_validation_max
min = r[:text_validation_min].to_s.blank? ? nil : r[:text_validation_min].to_s
max = r[:text_validation_max].to_s.blank? ? nil : r[:text_validation_max].to_s
type = r[:text_validation_type].to_s.blank? ? nil : r[:text_validation_type].to_s
- 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
Function Callbacks
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.Callbacks = function( options ) {
// Convert options from String-formatted to Object-formatted if needed
// (we check in cache first)
options = typeof options === "string" ?
Consider simplifying this complex logical expression. Open
Open
if ( event.pageX == null && original.clientX != null ) {
eventDoc = event.target.ownerDocument || document;
doc = eventDoc.documentElement;
body = eventDoc.body;
Function support
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.support = (function() {
var support, all, a, select, opt, input, fragment, eventName, isSupported, i,
div = document.createElement("div");
Function strictParse
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var strictParse = function(f, s, o){
// pattern for standard and localized AM/PM markers
var getPatternAmpm = function(amNames, pmNames) {
var markers = [];