pedromsantos/glenn

View on GitHub

Showing 110 of 565 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    test('fret is outside normal range', () => {
      const lowFret = new Fret(GuitarString.First, 5);
      const highFret = new Fret(GuitarString.First, 7);

      const fretTooLow = new Fret(GuitarString.First, 4);
Severity: Major
Found in src/__test__/Domain/Guitar.test.ts and 1 other location - About 4 hrs to fix
src/__test__/Domain/Guitar.test.ts on lines 124..133

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 125.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    test('fret is exactly at boundaries', () => {
      const lowFret = new Fret(GuitarString.First, 5);
      const highFret = new Fret(GuitarString.First, 7);

      const fretAtLow = new Fret(GuitarString.First, 5);
Severity: Major
Found in src/__test__/Domain/Guitar.test.ts and 1 other location - About 4 hrs to fix
src/__test__/Domain/Guitar.test.ts on lines 135..144

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 125.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function executeCommand has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  executeCommand(command: BarryHarrisCommand) {
    switch (command.command) {
      case 'ArpeggioUpFrom':
        this.line.arpeggioUpFrom(command.degree);
        break;
Severity: Minor
Found in src/UseCases/Barry.ts - About 1 hr to fix

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

          new MelodicLine(
            scaleDown.map(
              (p, i) =>
                new Note(
                  p,
    Severity: Major
    Found in src/Domain/Barry.ts and 1 other location - About 1 hr to fix
    src/Domain/Barry.ts on lines 217..226

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 55.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        const line = new MelodicLine(
          scaleDown.map(
            (p, i) =>
              new Note(
                p,
    Severity: Major
    Found in src/Domain/Barry.ts and 1 other location - About 1 hr to fix
    src/Domain/Barry.ts on lines 241..250

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 55.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    export class AbcDuration {
      constructor(private readonly duration: DurationPrimitives) {}
    
      toString() {
        return `L:${this.duration.fraction}`;
    Severity: Major
    Found in src/abcNotation/abcDuration.ts and 3 other locations - About 55 mins to fix
    src/abcNotation/abcChord.ts on lines 25..31
    src/abcNotation/abcKey.ts on lines 3..9
    src/abcNotation/abcMeter.ts on lines 3..9

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 54.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    export class AbcMeter {
      constructor(private readonly timeSignature: TimeSignaturePrimitives) {}
    
      toString() {
        return `M:${this.timeSignature.signature}`;
    Severity: Major
    Found in src/abcNotation/abcMeter.ts and 3 other locations - About 55 mins to fix
    src/abcNotation/abcChord.ts on lines 25..31
    src/abcNotation/abcDuration.ts on lines 3..9
    src/abcNotation/abcKey.ts on lines 3..9

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 54.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        return new ClosedChord(
          chordPitches.pitchForFunction(ChordFunction.Root),
          ChordPattern.patternFor(chordPitches.toIntervals()) ??
            throwExpression('Invalid chord pattern'),
          Duration.Whole,
    Severity: Minor
    Found in src/Domain/Scale.ts and 1 other location - About 55 mins to fix
    src/Domain/Scale.ts on lines 462..468

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 53.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        return new ClosedChord(
          chordPitches.pitchForFunction(ChordFunction.Root),
          ChordPattern.patternFor(chordPitches.toIntervals()) ??
            throwExpression('Invalid chord pattern'),
          Duration.Whole,
    Severity: Minor
    Found in src/Domain/Scale.ts and 1 other location - About 55 mins to fix
    src/Domain/Scale.ts on lines 439..445

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 53.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            (i.quality === IntervalQuality.Perfect ||
              i.quality === IntervalQuality.Minor ||
              i.quality === IntervalQuality.Major)
    Severity: Minor
    Found in src/Domain/Interval.ts and 1 other location - About 30 mins to fix
    src/Domain/Interval.ts on lines 68..70

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            i.name == primitive.name &&
            i.distance == primitive.distance &&
            i.abreviature == primitive.abreviature &&
    Severity: Minor
    Found in src/Domain/Interval.ts and 1 other location - About 30 mins to fix
    src/Domain/Interval.ts on lines 345..347

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 45.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    TODO found
    Open

            // TODO https://github.com/yarnpkg/yarn/issues/3751
    Severity: Minor
    Found in .yarn/releases/yarn-1.22.22.cjs by fixme

    TODO found
    Open

                // TODO maybe throw an error
    Severity: Minor
    Found in .yarn/releases/yarn-1.22.22.cjs by fixme

    TODO found
    Open

       * TODO description
    Severity: Minor
    Found in .yarn/releases/yarn-1.22.22.cjs by fixme

    TODO found
    Open

       * TODO description
    Severity: Minor
    Found in .yarn/releases/yarn-1.22.22.cjs by fixme

    TODO found
    Open

            // TODO what should the behaviour here be? we could buffer progress messages maybe
    Severity: Minor
    Found in .yarn/releases/yarn-1.22.22.cjs by fixme

    TODO found
    Open

      if(this.cells){  //TODO: cells should always exist - some tests don't fill it in though
    Severity: Minor
    Found in .yarn/releases/yarn-1.22.22.cjs by fixme

    TODO found
    Open

          // TODO: 0x20 might not be a space in all character sets...
    Severity: Minor
    Found in .yarn/releases/yarn-1.22.22.cjs by fixme

    TODO found
    Open

        // TODO - This is a bit of a hack to take care of a case
    Severity: Minor
    Found in .yarn/releases/yarn-1.22.22.cjs by fixme

    TODO found
    Open

        // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.
    Severity: Minor
    Found in .yarn/releases/yarn-1.22.22.cjs by fixme
    Severity
    Category
    Status
    Source
    Language