Showing 330 of 15,369 total issues
Function solve
has a Cognitive Complexity of 148 (exceeds 5 allowed). Consider refactoring. Open
BooleanMinimize.prototype.solve = function () {
function dec_to_binary_string(n) {
var str = n.toString(2);
while (str.length != this.numVars) {
- 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 listeners.js
has 1068 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable no-shadow */
/* eslint-disable no-negated-condition */
/* eslint-disable no-alert */
/* eslint-disable new-cap */
/* eslint-disable no-undef */
Function update
has a Cognitive Complexity of 120 (exceeds 5 allowed). Consider refactoring. Open
update() {
if (embed) return;
if (this == simulationArea.hover) simulationArea.hover = undefined;
this.hover = this.isHover();
- 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 VerilogClasses.js
has 940 lines of code (exceeds 250 allowed). Consider refactoring. Open
import AndGate from './modules/AndGate';
import NandGate from './modules/NandGate';
import Multiplexer from './modules/Multiplexer';
import XorGate from './modules/XorGate';
import XnorGate from './modules/XnorGate';
File canvas2svg.js
has 807 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!!
* Canvas 2 Svg v1.0.19
* A low level canvas to SVG converter. Uses a mock canvas context to build an SVG document.
*
* Licensed under the MIT license:
File canvas2svg.js
has 800 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!!
* Canvas 2 Svg v1.0.19
* A low level canvas to SVG converter. Uses a mock canvas context to build an SVG document.
*
* Licensed under the MIT license:
Function startListeners
has 443 lines of code (exceeds 100 allowed). Consider refactoring. Open
export default function startListeners() {
$('#deleteSelected').on('click', () => {
deleteSelected();
});
Function add
has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring. Open
add: function (shortcut_combination, callback, opt) {
//Provide a set of default options
var default_options = {
type: "keydown",
propagate: false,
- 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 data.js
has 735 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Function to create new circuit
// Function creates button in tab, creates scope and switches to this circuit
function newCircuit(name, id) {
name = name || prompt("Enter circuit name:");
name = stripTags(name);
File testbench.js
has 631 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* This file contains all functions related the the testbench
* Contains the the testbench engine and UI modules
*/
Function render
has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring. Open
render() {
var { width, height } = this;
this.canvas.height = height;
this.canvas.width = width;
var endTime = this.getCurrentTime();
- 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 resolve
has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring. Open
resolve() {
if (this.type == NODE_OUTPUT) {
// Since output node forces its value on its neighbours, remove its contentions.
// An existing contention will now trickle to the other output node that was causing
// the contention.
- 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 customResolve
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
function customResolve(clockInp, dInp, qOutput, en, masterState,
slaveState, prevClockState, clock_polarity, enable_polarity, numIterations) {
for(var i = 0; i < numIterations; i++) {
if(clock_polarity[i] != undefined) {
- 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 subcircuit.js
has 586 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable import/no-cycle */
import Scope, { scopeList, switchCircuit } from "./circuit";
import CircuitElement from "./circuitElement";
import simulationArea from "./simulationArea";
import { scheduleBackup, checkIfBackup } from "./data/backupCircuit";
File circuitElement.js
has 585 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable no-multi-assign */
/* eslint-disable no-bitwise */
/* eslint-disable */
import { scheduleUpdate } from './engine';
import simulationArea from './simulationArea';
File node.js
has 581 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable import/no-cycle */
import { drawCircle, drawLine, arc } from './canvasApi';
import simulationArea from './simulationArea';
import { distance, showError } from './utils';
import {
Function showProperties
has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring. Open
export function showProperties(obj) {
if (obj === prevPropertyObjGet()) return;
hideProperties();
prevPropertyObjSet(obj);
if(layoutModeGet()){
- 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 ux.js
has 528 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable import/no-cycle */
/* eslint-disable guard-for-in */
/* eslint-disable no-restricted-syntax */
/* eslint-disable no-restricted-syntax */
/* eslint-disable guard-for-in */
Function findDimensions
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
export function findDimensions(scope = globalScope) {
var totalObjects = 0;
simulationArea.minWidth = undefined;
simulationArea.maxWidth = undefined;
simulationArea.minHeight = undefined;
- 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 drawCombinationalAnalysis
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
function drawCombinationalAnalysis(combinationalData, inputList, outputListNames, scope = globalScope) {
findDimensions(scope);
var inputCount = inputList.length;
var maxTerms = 0;
for (var i = 0; i < combinationalData.length; i++) { maxTerms = Math.max(maxTerms, combinationalData[i].length); }
- 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"