Showing 206 of 267 total issues
Function Run
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Run(ref, json_q, callback, ind, progressObj) {
if (!progressObj) progressObj = { stop: function() { } };
function drawStep(drawarray, pos) {
if (pos == drawarray.length && drawarray[pos - 1] !== undefined) {
- Create a ticketCreate a ticket
Function draw
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
function draw(input, callback, progressObj) {
progressObj.stop(true);
progressObj.overrideFlag = true;
- Create a ticketCreate a ticket
Function Rotate
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Rotate(options, UI) {
let output;
function draw(input, callback, progressObj) {
- Create a ticketCreate a ticket
Function DefaultHtmlSequencerUi
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function DefaultHtmlSequencerUi(_sequencer, options) {
options = options || {};
var addStepSel = options.addStepSel = options.addStepSel || '#addStep';
var removeStepSel = options.removeStepSel = options.removeStepSel || 'button.remove';
- Read upRead up
- Create a ticketCreate a ticket
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 LoadImage
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function LoadImage(ref, name, src, main_callback) {
function makeImage(datauri) {
var image = {
src: datauri,
format: datauri.split(':')[1].split(';')[0].split('/')[1]
- Read upRead up
- Create a ticketCreate a ticket
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 exports
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (program, sequencer, outputFilename) {
utils.makedir(program.output, () => {
console.log('Files will be exported to "' + program.output + '"');
if (program.basic)
- Read upRead up
- Create a ticketCreate a ticket
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 CropModuleUi
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function CropModuleUi(step, ui) {
let inputWidth = 0,
inputHeight = 0;
- Create a ticketCreate a ticket
Function onComplete
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
function onComplete(step) {
let {$step, $stepAll} = step;
$step('img').show();
$stepAll('.load-spin').hide();
$step('.load').hide();
- Create a ticketCreate a ticket
Function exports
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (program, sequencer, outputFilename) {
utils.makedir(program.output, () => {
console.log('Files will be exported to "' + program.output + '"');
if (program.basic)
- Create a ticketCreate a ticket
Function Noise
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Noise(pixels, method) {
let neighbourX = [-1, -1, -1, 0, 0, 0, 1, 1, 1];
let neighbourY = [-1, 0, 1, -1, 0, 1, -1, 0, 1];
if(method == 'Median Filtering'){
- Create a ticketCreate a ticket
Function draw
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
function draw(input, callback, progressObj) {
options.offset = parseInt(options.offset || defaults.offset);
progressObj.stop(true);
- Create a ticketCreate a ticket
Function Mask
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Mask(options, UI, util) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
options.offset = options.offset || defaults.offset;
options.resize = options.resize || defaults.resize;
- Create a ticketCreate a ticket
Function warpWebGl
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
var warpWebGl = function warpWebGl(id, matrix1, matrix2, download) {
// try to create a WebGL canvas (will fail if WebGL isn't supported)
try {
var canvas = fx.canvas(1500, 1500);
- Create a ticketCreate a ticket
Function Channel
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Channel(options, UI) {
var output;
function draw(input, callback, progressObj) {
- Create a ticketCreate a ticket
File ImageSequencer.js
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
if (typeof window !== 'undefined') { isBrowser = true; }
else { var isBrowser = false; }
require('./util/getStep.js');
/**
- Create a ticketCreate a ticket
Function Rotate
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Rotate(pixels, finalPixels, rotate_value, width, height, cos, sin){
const height_half = Math.floor(height / 2),
width_half = Math.floor(width / 2);
dimension = width + height;
- Create a ticketCreate a ticket
Function UserInterface
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function UserInterface(events = {}) {
events.onSetup = events.onSetup || function(step) {
if (step.ui == false) {
// No UI
- Read upRead up
- Create a ticketCreate a ticket
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 ColorTemperature
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function ColorTemperature(options, UI) {
const pixelSetter = require('../../util/pixelSetter.js');
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
- Create a ticketCreate a ticket
Function stepUI
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function stepUI() {
// Basic markup for the selector
return '<div class="row insertDiv collapse">\
<section class="panel panel-primary .insert-step">\
<button class="btn btn-default close-insert-box"><i class="fa fa-times" aria-hidden="true"></i> Close</button>\
- Create a ticketCreate a ticket
Function runVideo
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runVideo(){
/* event handler for Take-Photo */
document.getElementById('video').style.display = 'inline';
document.getElementById('capture').style.display = 'inline';
document.getElementById('close').style.display = 'inline';
- Create a ticketCreate a ticket