Showing 203 of 447 total issues
Avoid deeply nested control flow statements. Open
if (vw.source.block === lin.id) {
if (typeof vwiresLut[lin.data.name] === 'undefined') {
vwiresLut[lin.data.name] = {
source: [],
target: [],
Avoid deeply nested control flow statements. Open
if (connectedLink.get('target').port === item.id) {
connected = true;
return false;
}
Avoid deeply nested control flow statements. Open
for (var opin = 0; opin < opt.designPinout.length; opin++) {
if (
String(opt.designPinout[opin].name) ===
String(pins[i].name)
) {
Avoid deeply nested control flow statements. Open
if (block.type !== 'basic.code') {
paramName = utils.digestId(paramName);
}
Avoid deeply nested control flow statements. Open
if (port.name === target.port && port.default) {
port.default.apply = value;
break;
}
Avoid deeply nested control flow statements. Open
for (i in blocks) {
block = blocks[i];
if (
block.type === 'basic.input' &&
!block.data.range &&
Avoid deeply nested control flow statements. Open
if (!found) {
// Add imaginary input block with the initPort value
project.design.graph.blocks.push({
id: initPort.name,
type: 'basic.input',
Function _navigateProject
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _navigateProject(update, prj, submodule, submoduleId, editMode) {
Function _addBlockFile
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _addBlockFile(self, orig, name, data, notify) {
Function adjustSelection
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
adjustSelection: function (evt) {
'use strict';
var dx;
var dy;
- 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 mouseManager
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
mouseManager: function (evt, fnc) {
'use strict';
evt.preventDefault();
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
initialize: function () {
'use strict';
_.bindAll(this, 'updateBox');
joint.dia.ElementView.prototype.initialize.apply(this, arguments);
- 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 createSelectionBox
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
createSelectionBox: function (element, opt) {
'use strict';
opt = opt || {};
- 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 push(command);
Avoid too many return
statements within this function. Open
return push(command);
Avoid too many return
statements within this function. Open
return push(command);
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return ret;
Avoid too many return
statements within this function. Open
return lowerBlock;
Avoid too many return
statements within this function. Open
return false;