Showing 5,566 of 7,504 total issues
Function set
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
set : function(n, v, e, p, d, s) {
Function getStyle
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
getStyle: function(element, style) {
element = $(element);
style = style == 'float' ? 'cssFloat' : style.camelize();
var value = element.style[style];
if (!value) {
- 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
} else if (combinator == 'adjacent') {
for (var i = 0, node; node = nodes[i]; i++)
if (Selector.handlers.previousElementSibling(targetNode) == node)
return [targetNode];
} else nodes = h[combinator](nodes);
Avoid deeply nested control flow statements. Open
if ( li != hovering )
li.className = li.className ? li.className.replace( rselected, '' ) : '';
Avoid deeply nested control flow statements. Open
if(element.tagName == 'IMG' && element.width) {
element.width++; element.width--;
} else try {
var n = document.createTextNode(' ');
element.appendChild(n);
Function set
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
set : function(name, value, expires, path, domain, secure) {
var d = new Date();
if ( typeof(expires) == 'object' && expires.toGMTString ) {
expires = expires.toGMTString();
- 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
if ( ed.plugins.wordpress )
h = ed.plugins.wordpress._setEmbed(h);
Avoid deeply nested control flow statements. Open
if (v !== undefined) {
value[k] = v;
} else {
delete value[k];
}
Avoid deeply nested control flow statements. Open
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
Avoid deeply nested control flow statements. Open
if ( key.indexOf('wp-autosave-') != -1 )
sessionStorage.removeItem(key);
Avoid deeply nested control flow statements. Open
while (t.parentNode != null) {
if (t.id==this.divName) {
return true;
}
t = t.parentNode;
Function PopupWindow_hidePopup
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function PopupWindow_hidePopup() {
if (this.divName != null) {
if (this.use_gebi) {
document.getElementById(this.divName).style.visibility = "hidden";
}
- 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
if (t.id==this.divName) {
return true;
}
Function resultsController
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
var resultsController = function ($scope, $location, dataService, $stateParams, $state, $timeout) {
Function schedule
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function schedule() {
var now = new Date();
var date = now.getDate();
var month = now.getMonth();
var month = month + 1;
- 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
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
Function passwordStrength
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function passwordStrength(password,username) {
var shortPass = 1, badPass = 2, goodPass = 3, strongPass = 4, symbolSize = 0, natLog, score;
//password < 4
if (password.length < 4 ) { return shortPass };
- 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 code
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function code( s, discard, alpha, beta, w1, w2 ) {
Avoid deeply nested control flow statements. Open
for (var i = 0, node; node = nodes[i]; i++)
if (Element.descendantOf(targetNode, node)) return [targetNode];
Function set
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
set : function(name, value, expires, path, domain, secure) {