Showing 267 of 267 total issues
Function draw
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function draw(input, callback) {
var step = this;
function output(image, datauri, mimetype, wasmSuccess) {
step.output = { src: datauri, format: mimetype, wasmSuccess, useWasm: options.useWasm };
- Create a ticketCreate a ticket
Function ImportImageModuleUi
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function ImportImageModuleUi(step, ui) {
function setup(setImage, onLoad) {
// generate a unique timestamp based id for the dropzone
- Create a ticketCreate a ticket
Function doubleThreshold
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
function doubleThreshold(pixels, highThresholdRatio, lowThresholdRatio, grads, strongEdgePixels, weakEdgePixels, pixelsToBeSupressed) {
const highThreshold = findMaxInMatrix(grads) * highThresholdRatio, // High Threshold relative to the strongest edge
lowThreshold = highThreshold * lowThresholdRatio; // Low threshold relative to high threshold
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
Open
module.exports = function(pixels){
var canvas = document.createElement('canvas');
canvas.width = pixels.shape[0];
canvas.height = pixels.shape[1];
var ctx = canvas.getContext('2d');
- 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 ImageThreshold
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function ImageThreshold(options, UI) {
var output;
function draw(input, callback, progressObj) {
- Create a ticketCreate a ticket
Function draw
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function draw(input, callback) {
var step = this,
startingX = Number(options.startingX || defaults.startingX),
startingY = Number(options.startingY || defaults.startingY),
- Create a ticketCreate a ticket
Function FlipImage
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function FlipImage(options, UI) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
options.Axis = options.Axis || defaults.Axis;
let output;
- Create a ticketCreate a ticket
Function draw
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function draw(input, callback) {
var step = this;
if (!options.inBrowser) {
- Create a ticketCreate a ticket
Function draw
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function draw(input, callback, progressObj) {
progressObj.stop(true);
progressObj.overrideFlag = true;
- Create a ticketCreate a ticket
Function BlobAnalysis
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function BlobAnalysis(options, UI){
var output;
function draw(input, callback, progressObj) {
- Create a ticketCreate a ticket
Function Exposure
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function Exposure(options, UI) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
var output;
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
Open
if (!options.inBrowser) {
require('../_nomodule/gl-context')(input, callback, step, options);
}
else {
// Create a canvas, if it doesn't already exist.
- Create a ticketCreate a ticket
Function DoNothing
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function DoNothing(options, UI) {
var output;
var jsQR = require('jsqr');
var getPixels = require('get-pixels');
- Create a ticketCreate a ticket
Function updatePreviews
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function updatePreviews(src, DomNode) {
$(DomNode).find('img').remove();
var previewSequencerSteps = {
'resize': '125%',
- Create a ticketCreate a ticket
Function TextOverlay
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function TextOverlay(options, UI) {
var output;
function draw(input, callback) {
- Create a ticketCreate a ticket
Function Brightness
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function Brightness(options, UI) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
var output;
- Create a ticketCreate a ticket
Function Gamma
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function Gamma(options, UI) {
var output;
function draw(input, callback, progressObj) {
- Create a ticketCreate a ticket
Function ReplaceColor
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function ReplaceColor(options, UI) {
var output;
function draw(input, callback, progressObj) {
- Create a ticketCreate a ticket
Function DrawRectangle
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function DrawRectangle(options, UI) {
var output;
- Create a ticketCreate a ticket
Function Convolution
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function Convolution(options, UI) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
options.kernelValues = options.kernelValues || defaults.kernelValues;
- Create a ticketCreate a ticket