Showing 5,781 of 10,536 total issues
Avoid deeply nested control flow statements. Open
Open
if (calendar[row][col].isSame(this.endDate)) { cname += ' end-date '; }
Avoid deeply nested control flow statements. Open
Open
for (var key in styleCache) {
if (hasOwnProperty.call(styleCache, key)) {
var positions = styleCache[key].positions;
Avoid deeply nested control flow statements. Open
Open
if (calendar[row][col].isSame(this.startDate)) { cname += ' start-date '; }
Avoid deeply nested control flow statements. Open
Open
if (angular.isDefined(provider)) {
provider[args[1]].apply(provider, args[2]);
}
Avoid deeply nested control flow statements. Open
Open
if (f) {
if (f.number && val != null) {
val = +val; // convert to number
if (isNaN(val))
val = null;
Function applyAttr
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
jvm.VMLCircleElement.prototype.applyAttr = function(attr, value){
switch (attr) {
case 'r':
this.node.style.width = value*2+'px';
this.node.style.height = value*2+'px';
- 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 (typeof bbox == 'undefined') {
bbox = itemBbox;
} else {
newBbox = {
x: Math.min(bbox.x, itemBbox.x),
Avoid deeply nested control flow statements. Open
Open
if (results_group != null) {
results_group.group_match = true;
}
Avoid deeply nested control flow statements. Open
Open
if (searchText.length) {
startpos = option.search_text.search(zregex);
text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
}
Avoid deeply nested control flow statements. Open
Open
if (u) {
var l = a && (a.shiftKey || a.ctrlKey || a.metaKey) ? !0 : !1;
u = !0;
"multi-extended" === b.options.selectionMode &&
(u = !b.isObjInSelList(h) || !l || D || (a && a.shiftKey));
Avoid deeply nested control flow statements. Open
Open
for (f = 0; f < e.length; f++) ob(e[f], c, g, d);
Avoid deeply nested control flow statements. Open
Open
if (0 <= b.indexOf(k)) {
h = !0;
break;
}
Avoid deeply nested control flow statements. Open
Open
if (e) {
a.scrollTo(e);
a.itemSelection(g, e);
k.$apply();
var E = q(function() {
Avoid deeply nested control flow statements. Open
Open
if (xa) {
angular.element(this);
b.preventDefault();
za();
a.dropMark();
Avoid deeply nested control flow statements. Open
Open
} else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
option.search_match = true;
}
Avoid deeply nested control flow statements. Open
Open
for (r = 0; r < u.length; r++) B(u[r], a);
Avoid deeply nested control flow statements. Open
Open
else for (f = e.length - 1; 0 <= f; f--) ob(e[f], c, g, d);
Function getTicks
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
getTicks: function(){
var m = 5,
extent = [this.clearMinValue, this.clearMaxValue],
span = extent[1] - extent[0],
step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)),
- 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 (a.sourceCtrl.isObjInSelList(k)) {
f = !0;
break;
}
Avoid deeply nested control flow statements. Open
Open
else for (r = u.length - 1; 0 <= r; r--) B(u[r], a);