freakimkaefig/musicjson-toolbox

View on GitHub
musicjson-toolbox.js

Summary

Maintainability
D
2 days
Test Coverage

File musicjson-toolbox.js has 679 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function() {
  'use strict';

  /**
   * The MusicJsonToolbox class implements static functions to operate with musicjson objects.
Severity: Major
Found in musicjson-toolbox.js - About 1 day to fix

    Function weightedEditDistance has 78 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        weightedEditDistance: function(a, b, adjusted) {
          if (a.length === 0) {
            return 0;
          }
          if (b.length === 0) {
    Severity: Major
    Found in musicjson-toolbox.js - About 3 hrs to fix

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

          notes: function(obj, repeat, rests) {
            var tempNotes = [];
            var repeatStart = -1;
      
            // loop over measures
      Severity: Minor
      Found in musicjson-toolbox.js - About 1 hr to fix

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

            base12Pitch: function(step, keyAdjust, octave, alter, withOctave) {
              // lookup semitones in c major scale
              var ret = this.base12[step];
        
              // optionally add alter value (from key or accidental)
        Severity: Minor
        Found in musicjson-toolbox.js - About 1 hr to fix

          Function editDistance has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              editDistance: function(a, b, compare, weight) {
                if (a.length === 0) {
                  return 0;
                }
                if (b.length === 0) {
          Severity: Minor
          Found in musicjson-toolbox.js - About 1 hr to fix

            Function weightConsolidation has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                weightConsolidation: function(matrix, a, b, i, j, c, adjusted) {
            Severity: Major
            Found in musicjson-toolbox.js - About 50 mins to fix

              Function weightFragmentation has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  weightFragmentation: function(matrix, a, b, i, j, f, adjusted) {
              Severity: Major
              Found in musicjson-toolbox.js - About 50 mins to fix

                Function base12Pitch has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    base12Pitch: function(step, keyAdjust, octave, alter, withOctave) {
                Severity: Minor
                Found in musicjson-toolbox.js - About 35 mins to fix

                  Function pitchDifference has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      pitchDifference: function(pitch1, keyAdjust, pitch2, withOctave, absolute) {
                  Severity: Minor
                  Found in musicjson-toolbox.js - About 35 mins to fix

                    Function weightSubstitution has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        weightSubstitution: function(a, b, i, j, adjusted) {
                    Severity: Minor
                    Found in musicjson-toolbox.js - About 35 mins to fix

                      There are no issues that match your filters.

                      Category
                      Status