Showing 2,136 of 2,138 total issues
Avoid deeply nested control flow statements. Open
Open
if( !renderer.isPositioned ) {
renderer.updatePos();
}
Avoid deeply nested control flow statements. Open
Open
if (img.imgType === 'linear-gradient' ) {
bgAreaSize = me.getBgAreaSize( img.bgOrigin );
bgSize = ( img.bgSize || PIE.BgSize.DEFAULT ).pixels(
me.targetElement, bgAreaSize.w, bgAreaSize.h, bgAreaSize.w, bgAreaSize.h
),
Avoid deeply nested control flow statements. Open
Open
else if( tokens[1].isLengthOrPercent() ) {
vals[3] = PIE.getLength( tokens[1].tokenValue );
}
Avoid deeply nested control flow statements. Open
Open
if( styles[ side ] === 'dashed' || styles[ side ] === 'dotted' ) {
segments.push( {
path: curve( cornerBefore, beforeX, beforeY, baseAngle + 45, 0, 1 ) +
curve( cornerBefore, 0, 0, baseAngle, 1, 0 ),
fill: colors[ side ]
Avoid deeply nested control flow statements. Open
Open
for( i = 0; i < len; i++ ) {
renderers[i].updatePos();
}
Avoid deeply nested control flow statements. Open
Open
for( j = 4; j--; ) {
corner = corners[j];
isBottom = corner.charAt( 0 ) === 'b';
isRight = corner.charAt( 1 ) === 'r';
shape = getShadowShape( i, corner, xOff, yOff, color, blur, path );
Avoid deeply nested control flow statements. Open
Open
if( token.tokenType & PIE.Tokenizer.Type.OPERATOR && token.tokenValue === '/' ) {
y = collectLengths();
}
Avoid deeply nested control flow statements. Open
Open
if( tokens[0].tokenValue === 'center' ) {
vals[1] = length_fifty;
} else {
vals[0] = tokens[0].tokenValue;
}
Function setMatcher
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
Avoid deeply nested control flow statements. Open
Open
if( tokens[1].tokenValue === 'center' ) {
vals[3] = length_fifty;
} else {
vals[2] = tokens[1].tokenValue;
}
Avoid deeply nested control flow statements. Open
Open
while( (token = tokenizer.next()) ) {
tokType = token.tokenType;
tokVal = token.tokenValue;
// If we reached the end of the function and had at least 2 stops, flush the info
Function focus
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
focus: function(event, element) {
if (event)
event.stop();
// Multi selection with shift
- 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
else if( tokens[0].isLengthOrPercent() ) {
vals[1] = PIE.getLength( tokens[0].tokenValue );
}
Avoid deeply nested control flow statements. Open
Open
if (! selected.empty())
this.selectedList = this.selectedList.findAll(function(entry) {return !selected.include(entry.value)});
Avoid deeply nested control flow statements. Open
Open
if( (token = tokenizer.next()) ) {
if( ( token.tokenType & IDENT ) && this.repeatIdents[token.tokenValue] ) {
p.repeat.v = token.tokenValue;
} else {
tokenizer.prev();
Function updateContent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
updateContent: function(responseText) {
var receiver = this.container[this.success() ? 'success' : 'failure'],
options = this.options;
if (!options.evalScripts) responseText = responseText.stripScripts();
- 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( el.tagName === 'IMG' ) {
childRenderers.push( new PIE.ImgRenderer( el, boundsInfo, styleInfos, rootRenderer ) );
}
Avoid deeply nested control flow statements. Open
Open
if (Element.getStyle(element, 'position') == 'absolute') break;
Avoid deeply nested control flow statements. Open
Open
if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
if ( useCache ) {
(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
}
Function setMatcher
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {