publiclab/image-sequencer

View on GitHub
src/modules/Rotate/Module.js

Summary

Maintainability
B
6 hrs
Test Coverage

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) {
Severity: Major
Found in src/modules/Rotate/Module.js - About 2 hrs to fix

Function draw has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function draw(input, callback, progressObj) {

    const defaults = require('./../../util/getDefaults.js')(require('./info.json'));
    options.rotate = options.rotate || defaults.rotate;

Severity: Major
Found in src/modules/Rotate/Module.js - About 2 hrs to fix

Function extraManipulation has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function extraManipulation(pixels) {
      const rotate_value = (options.rotate) % 360;
      radians = (Math.PI) * rotate_value / 180,
      width = pixels.shape[0],
      height = pixels.shape[1],
Severity: Minor
Found in src/modules/Rotate/Module.js - About 1 hr to fix

There are no issues that match your filters.

Category
Status