Showing 179 of 254 total issues
File jquery.js
has 4932 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery JavaScript Library v1.4.4
* http://jquery.com/
*
* Copyright 2010, John Resig
Function jQuery
has 548 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var jQuery = (function() {
// Define a local copy of jQuery
var jQuery = function( selector, context ) {
// The jQuery object is actually just the init constructor 'enhanced'
Function ajax
has 193 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ajax: function( origSettings ) {
var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings),
jsonp, status, data, type = s.type.toUpperCase(), noContent = rnoContent.test(type);
s.url = s.url.replace( rhash, "" );
Function callback
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
callback: function( branch, compressor ) {
if ( ! branch.rules || ! branch.rules.length ) {
return;
}
Consider simplifying this complex logical expression. Open
Open
if ( event.pageX == null && event.clientX != null ) {
var doc = document.documentElement,
body = document.body;
event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
Function Sizzle
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Sizzle = function( selector, context, results, seed ) {
results = results || [];
context = context || document;
var origContext = context;
Function objectsMatch
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
Open
objectsMatch: function( a, b ) {
var isArray = CSSCompressor.isArray,
isObject = CSSCompressor.isObject,
i;
- 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 render
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function render( css, branches, indent ) {
if ( indent === undefined ) {
indent = '';
}
Function render
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function render( css, branches, indent ) {
if ( indent === undefined ) {
indent = '';
}
Function render
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function render( css, branches, indent ) {
if ( indent === undefined ) {
indent = '';
}
Function remove
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
remove: function( elem, types, handler, pos ) {
// don't do events on text and comment nodes
if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
return;
}
Function add
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
add: function( elem, types, handler, data ) {
if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
return;
}
Function exports
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function( content ) {
var html = '', m, i,
seek = null,
comexit = false,
props = {
Function callback
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
callback: function( branch, compressor ) {
if ( ! branch.rules || ! branch.rules.length ) {
return;
}
File home.js
has 292 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* WARNING! This control file is a giant mess. Read at your own risk.
* TODO: Organize this file
*/
function prettySettingsJSON( settings ) {
Consider simplifying this complex logical expression. Open
Open
if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.fn.offset = function( options ) {
var elem = this[0], box;
if ( options ) {
Function Cli
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Cli( ARGS ) {
var args = argv.clear()
.info( "Usage: cssc [options] file.css" )
.version( 'v' + CSSCompressor.version )
.option( ARGVOptions )
Function animate
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
animate: function( prop, speed, easing, callback ) {
var optall = jQuery.speed(speed, easing, callback);
if ( jQuery.isEmptyObject( prop ) ) {
return this.each( optall.complete );
Function trigger
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
trigger: function( event, data, elem /*, bubbling */ ) {
// Event object or event type
var type = event.type || event,
bubbling = arguments[3];
Function callback
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
callback: function( branch, compressor ) {
if ( ! branch.selector || ! branch.parts || ! branch.parts.length ) {
return;
}