Showing 2,136 of 2,138 total issues
Avoid deeply nested control flow statements. Open
if (angle < 1e-6) {
angle = 0;
}
Function drawSeriesPie
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
drawSeriesPie: function(series) {
if (this.options.pie.drawn) return;
var ctx = this.ctx,
options = this.options,
- 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 getTokenBounds
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
getTokenBounds: function() {
if (null != this.tokenBounds) return this.tokenBounds;
var value = this.element.value;
if (value.strip().empty()) return [-1, 0];
var diff = arguments.callee.getFirstDifferencePos(value, this.oldElementValue);
- 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 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
Function drawHit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
drawHit: function(n){
var octx = this.octx,
s = n.series,
tHoz = this.tHoz.bind(this),
tVert = this.tVert.bind(this);
- 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
for (j = 0; j < s.data.length; j++) {
if (s.bars.show && s.bars.stacked) {
var x = s.data[j][0]+'';
stackedSums[x] = (stackedSums[x] || 0) + s.data[j][1];
lastSerie = s;
Function transform
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
contextPrototype.transform = function(m11, m12, m21, m22, dx, dy) {
Function RGBtoHSB
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Rico.Color.RGBtoHSB = function(red, green, blue) {
var hue, saturation, brightness;
var max = Math.max(red, green, blue), min = Math.min(red, green, blue);
var delta = max - min;
brightness = max / 255;
- 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 setTransform
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
contextPrototype.setTransform = function(m11, m12, m21, m22, dx, dy) {
Avoid deeply nested control flow statements. Open
if (!b.horizontal && (b.barWidth + axis.datamax > newmax))
newmax = axis.max + (b.centered ? b.barWidth/2 : b.barWidth);
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;
Function createRadialGradient
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
contextPrototype.createRadialGradient = function(aX0, aY0, aR0,
aX1, aY1, aR1) {
Avoid deeply nested control flow statements. Open
if (angle < 0) {
angle += 360;
}
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;
}
Function setSelectionPos
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
setSelectionPos: function(pos, event) {
var options = this.options,
offset = $(this.overlay).cumulativeOffset();
if(options.selection.mode.indexOf('x') == -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
Function drawHit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
drawHit: function(n){
var octx = this.octx,
s = n.series,
tHoz = this.tHoz.bind(this),
tVert = this.tVert.bind(this);
- 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 ( !xhrCallbacks ) {
xhrCallbacks = {};
jQuery( window ).unload( xhrOnUnloadAbort );
}
Function createControl
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
createControl: function(mode, handler, extraClasses) {
var control = this.options[mode + 'Control'];
var text = this.options[mode + 'Text'];
if ('button' == control) {
var btn = document.createElement('input');
- 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 bezierCurveTo
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
contextPrototype.bezierCurveTo = function(aCP1x, aCP1y,
aCP2x, aCP2y,
aX, aY) {
Function open
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
open: function() {
if (this.is_disabled()) return;
if (this.tag.hasAttribute( "dhtml_confirm")) {
if (this.onclick) this.onclick();
- 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"