Showing 54 of 117 total issues
Function applyAttr
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
jvm.SVGShapeElement.prototype.applyAttr = function(attr, value){
var patternEl,
imageEl,
that = 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
Function bindContainerPointerEvents
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
bindContainerPointerEvents: function(){
var map = this,
gesture = new MSGesture(),
element = this.container[0],
handlePointerDownEvent = function(e){
- 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 setSelected
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
setSelected: function(type, keys){
var i;
if (typeof keys != 'object') {
keys = [keys];
- 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 applyAttr
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
jvm.VMLShapeElement.prototype.applyAttr = function(attr, value){
switch (attr) {
case 'fill':
this.node.fillcolor = value;
break;
- 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 too many return
statements within this function. Open
return 'l'+cx+','+cy;
Avoid too many return
statements within this function. Open
return 'v'+coords.join(',');
Avoid too many return
statements within this function. Open
return 'r0,'+coords[0];
Avoid too many return
statements within this function. Open
return 'l'+cx+','+cy;
Avoid too many return
statements within this function. Open
return 'v'+coords.join(',');
Avoid too many return
statements within this function. Open
return 'c'+coords.join(',');
Avoid too many return
statements within this function. Open
return 'r'+coords[0]+',0';
Avoid too many return
statements within this function. Open
return 'c'+coords.join(',');
Avoid too many return
statements within this function. Open
return '';
Function getValue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
getValue: function(value) {
var lengthes = [],
fullLength = 0,
l,
i = 0,
- 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"