Showing 203 of 447 total issues
Function initialize
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
initialize: function () {
'use strict';
_.bindAll(this, 'updateBox');
joint.dia.ElementView.prototype.initialize.apply(this, arguments);
Function updateBox
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
Open
updateBox: function () {
'use strict';
var pendingTasks = [];
var i, port;
- 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
File joint.command.js
has 322 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
Copyright (c) 2016-2019 FPGAwars
Copyright (c) 2013 client IO
*/
Function SerialManager
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
let SerialManager = function () {
this.devices = [];
this.info = {
status: false,
dev: -1,
Function editBasicInputLabel
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function editBasicInputLabel(cellView, callback) {
var graph = cellView.paper.model;
var block = cellView.model.attributes;
var formSpecs = [
{
Function initialize
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
initialize: function () {
'use strict';
_.bindAll(this, 'updateBox');
joint.dia.ElementView.prototype.initialize.apply(this, arguments);
Function testbenchCompiler
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function testbenchCompiler(project) {
var i, o, p;
var code = '';
code += '// Testbench template\n\n';
File iceplugmanager.js
has 315 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable no-unused-vars */
var ICEpm = new (function () {
'use strict';
Function parametric
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.parametric = new (function () {
'use strict';
this.pair = function (A, B) {
if (A.length !== B.length) {
Function load
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.load = function (name, data) {
var self = this;
if (!checkVersion(data.version)) {
return;
}
Function addCommand
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addCommand: function (cmdName, cell, graph, options) {
'use strict';
if (cmdName === 'change:labels' || cmdName === 'change:z') {
return;
Function editBasicOutput
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function editBasicOutput(cellView, callback) {
var graph = cellView.paper.model;
var block = cellView.model.attributes;
var formSpecs = [
{
Function initialize
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
initialize: function () {
'use strict';
_.bindAll(this, 'updateBox');
joint.dia.ElementView.prototype.initialize.apply(this, arguments);
Function updateBox
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateBox: function () {
'use strict';
var bbox = this.model.getBBox();
var data = this.model.get('data');
Function getInstances
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getInstances(name, graph) {
var w, wire;
var instances = [];
var blocks = graph.blocks;
Function addCollections
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.addCollections = function (filepaths) {
// Load zip file
async.eachSeries(filepaths, function (filepath, nextzip) {
//alertify.message(_tcStr('Load {{name}} ...', { name: `<b>${common.basename(filepath)}</b>` }));
var zipData = nodeAdmZip(filepath);
Function revertCommand
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
Open
revertCommand: function (command) {
'use strict';
this.stopListening();
var batchCommand;
- 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 getPortAttrs
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getPortAttrs: function (port, index, total, selector, type, length) {
'use strict';
var attrs = {};
var gridsize = 8;
Function convertTo10
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function convertTo10(data, name) {
var project = {
version: '1.0',
package: {
name: name || '',
Function pcfCompiler
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function pcfCompiler(project, opt) {
var i,
j,
block,
pin,