Showing 179 of 254 total issues
Function rule
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
rule: function( options, type, callback ) {
var rules = CSSCompressor._rules;
// Passing no arguments returns the entire list
if ( options === undefined ) {
Function domManip
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
domManip: function( args, table, callback ) {
var results, first, fragment, parent,
value = args[0],
scripts = [];
Function closest
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
closest: function( selectors, context ) {
var ret = [], i, l, cur = this[0];
if ( jQuery.isArray( selectors ) ) {
var match, selector,
Function CHILD
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
CHILD: function( elem, match ) {
var type = match[1],
node = elem;
switch ( type ) {
Function onreadystatechange
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
var onreadystatechange = xhr.onreadystatechange = function( isTimeout ) {
// The request was aborted
if ( !xhr || xhr.readyState === 0 || isTimeout === "abort" ) {
// Opera doesn't call onreadystatechange before this point
// so we simulate the call
Function extend
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
CSSCompressor.extend = function(){
var args = Slice.call( arguments ), i = -1, l = args.length, deep = false, target = this, name, copy;
// Check for deep copy
if ( CSSCompressor.isBoolean( args[ 0 ] ) ) {
- 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 name
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) {
var type, i = 0, match, namespaces, preType,
selector = origSelector || this.selector,
context = origSelector ? this : jQuery( this.context );
Function handle
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
handle: function( event ) {
var all, handlers, namespaces, namespace_re, events,
namespace_sort = [],
args = jQuery.makeArray( arguments );
Function step
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
step: function( gotoEnd ) {
var t = jQuery.now(), done = true;
if ( gotoEnd || t >= this.options.duration + this.startTime ) {
this.now = this.end;
Function extend
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.extend = jQuery.fn.extend = function() {
var options, name, src, copy, copyIsArray, clone,
target = arguments[0] || {},
i = 1,
length = arguments.length,
Function load
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
load: function( url, params, callback ) {
if ( typeof url !== "string" && _load ) {
return _load.apply( this, arguments );
// Don't do a request if no elements are being requested
Function callback
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
callback: function( branch, compressor ) {
if ( ! branch.rules || ! branch.rules.length ) {
return;
}
Function data
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
data: function( key, value ) {
var data = null;
if ( typeof key === "undefined" ) {
if ( this.length ) {
Function callback
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
callback: function( branch, compressor ) {
if ( ! branch.selector || ! branch.parts || ! branch.parts.length ) {
return;
}
Function objectsMatch
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
objectsMatch: function( a, b ) {
var isArray = CSSCompressor.isArray,
isObject = CSSCompressor.isObject,
i;
Function callback
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
callback: function( value, position, compressor ) {
var m = rfunction.exec( value ),
iter = new StringIterator( ( m || [] )[ 2 ] || '' ),
string = '',
parts = [];
Function callback
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
callback: function( branch, compressor ) {
if ( ! branch.selector || ! branch.parts || ! branch.parts.length ) {
return;
}
Function eachArgs
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
eachArgs: function( items, fn ) {
var i = -1, l = items.length;
if ( CSSCompressor.isArray( items ) ) {
for ( ; ++i < l; ) {
- 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 each
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
each: function( items, fn ) {
var i = -1, l = items.length;
if ( CSSCompressor.isArray( items ) ) {
for ( ; ++i < l; ) {
- 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 callback
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
callback: function( branch, compressor ) {
if ( ! branch.rules || ! branch.rules.length ) {
return;
}
- 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"