Showing 203 of 447 total issues
Function BuildCommand
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def BuildCommand(ctx, board, device, package, project_dir, verbose, verbose_yosys, verbose_pnr):
Function applyShape
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
applyShape: function () {
'use strict';
var data = this.model.get('data');
var name = data.name + (data.range || '');
- 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 updateBox
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
updateBox: function () {
'use strict';
var bbox = this.model.getBBox();
var data = this.model.get('data');
- 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 (var j = 0; j < vB.length - 1; j++) {
// Eval if intersects any segment of wire vB
if (evalIntersection(vA[i], [vB[j], vB[j + 1]])) {
// Bifurcation found!
var point = vA[i];
Function getPortAttrs
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
getPortAttrs: function (port, index, total, selector, type, length) {
Function updateBox
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
updateBox: function () {
'use strict';
var bbox = this.model.getBBox();
var data = this.model.get('data');
- 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
switch (common.selectedBoard.name) {
// TinyFPGA-B2 programmer errors
case 'TinyFPGA-B2':
case 'TinyFPGA-BX':
var match = stdout.match(/Bootloader\snot\sactive/g);
Avoid deeply nested control flow statements. Open
if (cssRule.selectorText === ruleName) {
return cssRule;
}
Avoid deeply nested control flow statements. Open
if (portWires[A].id !== portWires[B].id) {
// Not the same wire
findBifurcations(
portWires[A].view,
portWires[B].view,
Avoid deeply nested control flow statements. Open
if (common.selectedBoard.name.startsWith('TinyFPGA-B')) {
// TinyFPGA bootloader notification
errorMessage +=
'</br>(' + _tcStr('Bootloader not active') + ')';
}
Avoid deeply nested control flow statements. Open
else if (
stdout.indexOf('Library not loaded:') !== -1 &&
stdout.indexOf('libffi') !== -1
) {
resultAlert = alertify.error(
Function storeBatchCommand
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
storeBatchCommand: function () {
'use strict';
// In order to store batch command it is necesary to run storeBatchCommand as many times as
// initBatchCommand was executed
if (this.batchCommand && this.batchLevel <= 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"
Further reading
Avoid deeply nested control flow statements. Open
for (var j in module.params) {
var param = module.params[j];
if (
codeError.line === param.line ||
(matchConstant && param.name === matchConstant[1])
Function getPortAttrs
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
getPortAttrs: function (port, index, total, selector, type, length) {
'use strict';
var attrs = {};
var gridsize = 8;
- 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 (vw.target.block === lin.id) {
if (typeof vwiresLut[lin.data.name] === 'undefined') {
vwiresLut[lin.data.name] = {
source: [],
target: [],
Avoid deeply nested control flow statements. Open
if (inPort.default && inPort.default.apply) {
initPorts.push({
block: block.id,
port: inPort.name,
name: inPort.default.port,
Function validateConnection
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
cellViewS,
magnetS,
cellViewT,
magnetT,
end,
Avoid deeply nested control flow statements. Open
for (i in initPins) {
value += initPins[i].bit;
}
Avoid deeply nested control flow statements. Open
if (wire.target.block === block.id) {
if (
wire.source.port === 'constant-out' ||
wire.source.port === 'memory-out'
) {
Avoid deeply nested control flow statements. Open
if (
wire.source.port !== 'constant-out' &&
wire.source.port !== 'memory-out'
) {
connectPort(wire.target.port, portsNames, ports, block);