Showing 2,136 of 2,138 total issues
Avoid deeply nested control flow statements. Open
if (!tick.label || tick.label.length == 0 ||
(this.plotOffset.top + this.tVert(tick.v, axis) < 0) ||
(this.plotOffset.top + this.tVert(tick.v, axis) > this.canvasHeight)) continue;
Avoid deeply nested control flow statements. Open
if(!tick.label || tick.label.length == 0 ||
(this.plotOffset.left + this.tHoz(tick.v, axis) < 0) ||
(this.plotOffset.left + this.tHoz(tick.v, axis) > this.canvasWidth)) continue;
Avoid deeply nested control flow statements. Open
for(j = 1; j < data[h].length; j++){
y = data[h][j];
if(y < yaxis.datamin) yaxis.datamin = y;
else if(y > yaxis.datamax) yaxis.datamax = y;
}
Avoid deeply nested control flow statements. Open
if(x < xaxis.datamin) xaxis.datamin = x;
else if(x > xaxis.datamax) xaxis.datamax = x;
Function plotCandlesShadows
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
plotCandlesShadows: function(series, offset){
var data = series.data;
if(data.length < 1 || series.candles.barcharts) return;
var xa = series.xaxis,
- 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(p.charAt(0) == 'n') pos += 'top:' + (m + plotOffset.top) + 'px;';
else if(p.charAt(0) == 's') pos += 'bottom:' + (m + plotOffset.bottom) + 'px;';
Avoid deeply nested control flow statements. Open
if(b.stacked && b.horizontal){
for (j = 0; j < s.data.length; j++) {
if (b.show && b.stacked) {
var x = s.data[j][0]+'';
stackedSums[x] = (stackedSums[x] || 0) + s.data[j][1];
Avoid deeply nested control flow statements. Open
if(options.legend.backgroundOpacity != 0.0){
/**
* Put in the transparent background separately to avoid blended labels and
* label boxes.
*/
Avoid deeply nested control flow statements. 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);
}
Method perform
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def perform
if import.import_type == Import::Import::IMPORT_TYPE_ACTIVITY
import_activity(data_json,import)
else
import.total_imports = data_json.size
- 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 show
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
show: function(point, element) {
if(!this.drops.length) return;
var drop, affected = [];
this.drops.each( function(drop) {
- 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 initialize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
initialize: function(tab_list_container,options){
if(!$(tab_list_container))
throw "Control.Tabs could not find the element: " + tab_list_container;
this.activeContainer = false;
this.activeLink = false;
- 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 ((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
if (results_group != null) {
results_group.group_match = true;
}
Avoid deeply nested control flow statements. Open
if (!(res.current = 1 + tok.indexOf("c"))) {
res.current = (1 + res.blockwide) >> 1;
}
Function _tree
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
_tree: function(element, options, parent) {
var children = Sortable.findElements(element, options) || [];
for (var i = 0; i < children.length; ++i) {
var match = children[i].id.match(options.format);
- 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
Method initialize
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(offering, protocol, host_with_port, current_user, additional_external_report_id, anonymize_students = false)
Function create
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
create: function(element) {
element = $(element);
var options = Object.extend({
element: element,
tag: 'li', // assumes li children, override with tag: 'tagname'
- 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 (! selected.empty())
this.selectedList = this.selectedList.findAll(function(entry) {return !selected.include(entry.value)});
Function loop
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
loop: function(timePos) {
if (timePos >= this.startOn) {
if (timePos >= this.finishOn) {
this.render(1.0);
this.cancel();
- 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"