Showing 429 of 903 total issues
Avoid deeply nested control flow statements. Open
Open
if ( !selector ) {
push.apply( results, seed );
return results;
}
Avoid deeply nested control flow statements. Open
Open
for ( conv2 in converters ) {
// If conv2 outputs current
tmp = conv2.split( " " );
if ( tmp[ 1 ] === current ) {
Avoid deeply nested control flow statements. Open
Open
if ( matches[ sel ] === undefined ) {
matches[ sel ] = handleObj.needsContext ?
jQuery( sel, this ).index( cur ) > -1 :
jQuery.find( sel, this, null, [ cur ] ).length;
}
Avoid deeply nested control flow statements. Open
Open
if ( (elem = matcherOut[i]) ) {
// Restore matcherIn since elem is not yet a final match
temp.push( (matcherIn[i] = elem) );
}
Avoid deeply nested control flow statements. Open
Open
if ( Expr.relative[ tokens[j].type ] ) {
break;
}
Method SetContrast
has a Cognitive Complexity of 23 (exceeds 20 allowed). Consider refactoring. Open
Open
public void SetContrast(double contrast)
{
Bitmap bmap = new Bitmap(_currentBitmap.Width, _currentBitmap.Height);
if (contrast < -100) contrast = -100;
if (contrast > 100) contrast = 100;
- 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
Avoid deeply nested control flow statements. Open
Open
if ( conv && s.throws ) {
response = conv( response );
} else {
try {
response = conv( response );
Method InsertShape
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public void InsertShape(string shapeType, int xPosition, int yPosition, int width, int height, string colorName)
Consider simplifying this complex logical expression. Open
Open
if ( matcher[ expando ] ) {
// Find the next relative operator (if any) for proper handling
j = ++i;
for ( ; j < len; j++ ) {
if ( Expr.relative[ tokens[j].type ] ) {
Consider simplifying this complex logical expression. Open
Open
if ( s.crossDomain == null ) {
parts = rurl.exec( s.url.toLowerCase() );
s.crossDomain = !!( parts &&
( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
Consider simplifying this complex logical expression. Open
Open
if ( delegateCount && cur.nodeType &&
( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {
for ( ; cur !== this; cur = cur.parentNode || this ) {
Consider simplifying this complex logical expression. Open
Open
if ( support.matchesSelector && documentIsHTML &&
( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
try {
Consider simplifying this complex logical expression. Open
Open
if ( matcher[ expando ] ) {
// Find the next relative operator (if any) for proper handling
j = ++i;
for ( ; j < len; j++ ) {
if ( Expr.relative[ tokens[j].type ] ) {
Consider simplifying this complex logical expression. Open
Open
if ( matcher[ expando ] ) {
// Find the next relative operator (if any) for proper handling
j = ++i;
for ( ; j < len; j++ ) {
if ( Expr.relative[ tokens[j].type ] ) {
Consider simplifying this complex logical expression. Open
Open
if ( delegateCount && cur.nodeType &&
( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {
for ( ; cur !== this; cur = cur.parentNode || this ) {
Function condense
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function condense( unmatched, map, filter, context, xml ) {
Function Tween
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function Tween( elem, options, prop, end, easing ) {
Function superMatcher
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
superMatcher = function( seed, context, xml, results, outermost ) {
Function on
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
Function augmentWidthOrHeight
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {