Showing 6,062 of 6,062 total issues
Avoid deeply nested control flow statements. Open
Open
if ( deleteExpando ) {
delete elem[ internalKey ];
} else if ( typeof elem.removeAttribute !== strundefined ) {
elem.removeAttribute( internalKey );
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if ( typeof xhr.responseText === "string" ) {
responses.text = xhr.responseText;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
contains( context, elem ) && elem.id === m ) {
results.push( elem );
return results;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if ( Expr.relative[ tokens[j].type ] ) {
break;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
for ( match in context ) {
// Properties of context are called as methods if possible
if ( jQuery.isFunction( this[ match ] ) ) {
this[ match ]( context[ match ] );
- Create a ticketCreate a ticket
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) );
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if ( matches[ sel ] ) {
matches.push( handleObj );
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (lookAhead("'")) {
output += "'";
} else {
literal = true;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if ( typeof elem.getElementsByTagName !== "undefined" ) {
// handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
// Splice the scripts into ret after their former ancestor and advance our index beyond them
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (val > 0) {
stackTotals[i] += val;
}
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (stackMin < 0 && stackMax > 0) {
if (val < 0) {
stackRangesNeg[i] += Math.abs(val);
} else {
stackRanges[i] += val;
- Create a ticketCreate a ticket
Function drawLine
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
drawLine: function (x1, y1, x2, y2, lineColor, lineWidth) {
- Create a ticketCreate a ticket
Function invokePartial
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
__exports__.program = program;function invokePartial(partial, name, context, helpers, partials, data) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
switch (col) {
case 0: calender += " ui-datepicker-group-first";
cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break;
case numMonths[1]-1: calender += " ui-datepicker-group-last";
cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break;
- Create a ticketCreate a ticket
Function drawCircle
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
drawCircle: function (x, y, radius, lineColor, fillColor, lineWidth) {
- Create a ticketCreate a ticket
Function drawRect
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
drawRect: function (x, y, width, height, lineColor, fillColor) {
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (this.terminals_[p] && p > 2) {
expected.push("'" + this.terminals_[p] + "'");
}
- Create a ticketCreate a ticket
Method get_repos
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def get_repos(platform, version, arch)
repositories = {}
db = "repos-#{platform}-#{version}-#{arch}".tr(".", "_")
repos_db = begin
- Read upRead up
- Create a ticketCreate a ticket
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
Method upgrade
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def upgrade(ta, td, a, d)
unless a["networks"]["nova_floating"].key? "add_ovs_bridge"
a["networks"]["nova_floating"]["add_ovs_bridge"] = ta["networks"]["nova_floating"]["add_ovs_bridge"]
end
unless a["networks"]["nova_floating"].key? "bridge_name"
- Read upRead up
- Create a ticketCreate a ticket
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
Method allocate_ip_by_type
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def allocate_ip_by_type(bc_instance, network, range, object, type, suggestion = nil)
- Create a ticketCreate a ticket