opensheetmusicdisplay/opensheetmusicdisplay

View on GitHub
src/MusicalScore/VoiceData/Note.ts

Summary

Maintainability
C
1 day
Test Coverage

Note has 56 functions (exceeds 20 allowed). Consider refactoring.
Open

export class Note {

    constructor(voiceEntry: VoiceEntry, parentStaffEntry: SourceStaffEntry, length: Fraction, pitch: Pitch, sourceMeasure: SourceMeasure, isRest?: boolean) {
        this.voiceEntry = voiceEntry;
        this.parentStaffEntry = parentStaffEntry;
Severity: Major
Found in src/MusicalScore/VoiceData/Note.ts - About 1 day to fix

    File Note.ts has 262 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import {VoiceEntry, StemDirectionType} from "./VoiceEntry";
    import {SourceStaffEntry} from "./SourceStaffEntry";
    import {Fraction} from "../../Common/DataObjects/Fraction";
    import {NoteEnum, Pitch} from "../../Common/DataObjects/Pitch";
    import {Beam} from "./Beam";
    Severity: Minor
    Found in src/MusicalScore/VoiceData/Note.ts - About 2 hrs to fix

      Consider simplifying this complex logical expression.
      Open

                  if (
                    noteSlur.StartNote !== undefined &&
                    noteSlur.EndNote !== undefined &&
                    slur.StartNote !== undefined &&
                    slur.StartNote === noteSlur.StartNote &&
      Severity: Major
      Found in src/MusicalScore/VoiceData/Note.ts - About 40 mins to fix

        There are no issues that match your filters.

        Category
        Status