Showing 1,331 of 3,238 total issues
Function jsDump
has 148 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
QUnit.jsDump = (function() {
function quote( str ) {
return '"' + str.toString().replace(/"/g, '\\"') + '"';
};
function literal( o ) {
Function test
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
test: function(testName, expected, callback, async) {
var name = '<span class="test-name">' + testName + '</span>', testEnvironment, testEnvironmentArg;
if ( arguments.length === 2 ) {
callback = expected;
Function xdsoftScroller
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.xdsoftScroller = function (percent) {
return this.each(function () {
var timeboxparent = $(this),
pointerEventToXY = function (e) {
var out = {x: 0, y: 0},
Function xdsoftScroller
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.xdsoftScroller = function (percent) {
return this.each(function () {
var timeboxparent = $(this),
pointerEventToXY = function (e) {
var out = {x: 0, y: 0},
Function callbacks
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
callbacks = (function() {
// for string, boolean, number and null
function useStrictEquality( b, a ) {
Function transform
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function transform(slider) {
var isValueSet, areAttrsSet, isChanged, isClick, prevValue, rawValue, prevX;
var min, max, step, range, value = slider.value;
Function parseDate
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseDate: function (vDate, vFormat) {
var self = this, vFormatParts, vDateParts, i, vDateFlag = false, vTimeFlag = false, vDatePart, iDatePart,
vSettings = self.dateSettings, vMonth, vMeriIndex, vMeriOffset, len, mer,
out = {date: null, year: null, month: null, day: null, hour: 0, min: 0, sec: 0};
if (!vDate) {
Function parseDate
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseDate: function(date, format, language, assumeNearby){
if (!date)
return undefined;
if (date instanceof Date)
return date;
Function parseDate
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseDate: function(date, format, language, assumeNearby){
if (!date)
return undefined;
if (date instanceof Date)
return date;
Function Callbacks
has 128 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" ?
File tooltip.js
has 380 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* ========================================================================
* Bootstrap: tooltip.js v3.3.7
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
Function parseFormat
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseFormat: function (vChar, vDate) {
var self = this, vSettings = self.dateSettings, fmt, backslash = /\\?(.?)/gi, doFormat = function (t, s) {
return fmt[t] ? fmt[t]() : s;
};
fmt = {
Function parseFormat
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseFormat: function (vChar, vDate) {
var self = this, vSettings = self.dateSettings, fmt, backspace = /\\?(.?)/gi, doFormat = function (t, s) {
return fmt[t] ? fmt[t]() : s;
};
fmt = {
Function equiv
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
QUnit.equiv = (function() {
var innerEquiv; // the real equiv function
var callers = []; // stack to decide between skip/abort functions
var parents = []; // stack to avoiding loops from circular referencing
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;
File tests.js
has 372 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*global module:false, test:false, equal:false, ok:false, asyncTest:false,start:false, expect: false */
/* SINGLE BLOCK BASICS */
module('single block', {
setup: function() {
Function configFromISO
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
Open
export function configFromISO(config) {
var i, l,
string = config._i,
match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
allowTime, dateFormat, timeFormat, tzFormat;
- 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 defaultPrefilter
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function defaultPrefilter( elem, props, opts ) {
var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
isBox = "width" in props || "height" in props,
anim = this,
orig = {},
Function defaultPrefilter
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function defaultPrefilter( elem, props, opts ) {
var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
isBox = "width" in props || "height" in props,
anim = this,
orig = {},
Function Callbacks
has 121 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" ?