pedromsantos/glenn

View on GitHub

Showing 44 of 557 total issues

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

  test('melodic line from scale with octave above', () => {
    const line = ScalePattern.Ionian.createScale(Pitch.C)
      .melodicLine(Duration.Eighth, Octave.C4)
      .appendOctaveAbove();

Severity: Major
Found in src/__test__/Domain/Scale.test.ts and 1 other location - About 1 day to fix
src/__test__/Domain/Scale.test.ts on lines 453..474

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 350.

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('melodic line from scale with octave bellow', () => {
    const line = ScalePattern.Ionian.createScale(Pitch.C)
      .melodicLine(Duration.Eighth, Octave.C4)
      .prependOctaveDown();

Severity: Major
Found in src/__test__/Domain/Scale.test.ts and 1 other location - About 1 day to fix
src/__test__/Domain/Scale.test.ts on lines 430..451

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 350.

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

    describe('Arpeggio up', () => {
      type TestTuple = [ScaleDegree, Pitch[]];

      test.each<TestTuple>([
        [ScaleDegree.I, [Pitch.C, Pitch.E, Pitch.G, Pitch.BFlat]],
Severity: Major
Found in src/__test__/Domain/Barry.test.ts and 1 other location - About 1 day to fix
src/__test__/Domain/Barry.test.ts on lines 32..50

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 318.

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

    describe('Pivot', () => {
      type TestTuple = [ScaleDegree, Pitch[]];

      test.each<TestTuple>([
        [ScaleDegree.VII, [Pitch.BFlat, Pitch.C, Pitch.E, Pitch.G]],
Severity: Major
Found in src/__test__/Domain/Barry.test.ts and 1 other location - About 1 day to fix
src/__test__/Domain/Barry.test.ts on lines 12..30

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 318.

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 3 locations. Consider refactoring.
Open

    test('multiple pitches when repeated stay on same octave on neutral lines', () => {
      const line = new PitchLine([Pitch.C, Pitch.D, Pitch.E, Pitch.C], PitchLineDirection.Neutral);

      const melodicLine = line.toMelodicLine(Octave.C4, Duration.Eighth);

Severity: Major
Found in src/__test__/Domain/Pitch.test.ts and 2 other locations - About 1 day to fix
src/__test__/Domain/Pitch.test.ts on lines 42..54
src/__test__/Domain/Pitch.test.ts on lines 71..83

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 238.

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 3 locations. Consider refactoring.
Open

    test('multiple pitches when repeated go down an octave on descending lines', () => {
      const line = new PitchLine(
        [Pitch.C, Pitch.B, Pitch.A, Pitch.G],
        PitchLineDirection.Descending
      );
Severity: Major
Found in src/__test__/Domain/Pitch.test.ts and 2 other locations - About 1 day to fix
src/__test__/Domain/Pitch.test.ts on lines 31..40
src/__test__/Domain/Pitch.test.ts on lines 42..54

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 238.

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 3 locations. Consider refactoring.
Open

    test('multiple pitches when repeated go up an octave on ascending lines', () => {
      const line = new PitchLine(
        [Pitch.C, Pitch.D, Pitch.E, Pitch.C],
        PitchLineDirection.Ascending
      );
Severity: Major
Found in src/__test__/Domain/Pitch.test.ts and 2 other locations - About 1 day to fix
src/__test__/Domain/Pitch.test.ts on lines 31..40
src/__test__/Domain/Pitch.test.ts on lines 71..83

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 238.

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 9 locations. Consider refactoring.
Open

    test('map frets on C position sixth string', () => {
      const frets = GuitarString.Sixth.fretsFor(Position.C);

      expect([...frets]).toStrictEqual([
        new Fret(GuitarString.Sixth, 1, Pitch.F, Octave.C2),
Severity: Major
Found in src/__test__/Domain/Guitar.test.ts and 8 other locations - About 6 hrs to fix
src/__test__/Domain/Guitar.test.ts on lines 209..219
src/__test__/Domain/Guitar.test.ts on lines 221..231
src/__test__/Domain/Guitar.test.ts on lines 233..243
src/__test__/Domain/Guitar.test.ts on lines 245..255
src/__test__/Domain/Guitar.test.ts on lines 257..267
src/__test__/Domain/Guitar.test.ts on lines 269..279
src/__test__/Domain/Guitar.test.ts on lines 281..291
src/__test__/Domain/Guitar.test.ts on lines 304..314

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 156.

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 9 locations. Consider refactoring.
Open

    test('map frets on C position second string', () => {
      const frets = GuitarString.Second.fretsFor(Position.C);

      expect([...frets]).toStrictEqual([
        new Fret(GuitarString.Second, 1, Pitch.C, Octave.C4),
Severity: Major
Found in src/__test__/Domain/Guitar.test.ts and 8 other locations - About 6 hrs to fix
src/__test__/Domain/Guitar.test.ts on lines 197..207
src/__test__/Domain/Guitar.test.ts on lines 209..219
src/__test__/Domain/Guitar.test.ts on lines 221..231
src/__test__/Domain/Guitar.test.ts on lines 233..243
src/__test__/Domain/Guitar.test.ts on lines 257..267
src/__test__/Domain/Guitar.test.ts on lines 269..279
src/__test__/Domain/Guitar.test.ts on lines 281..291
src/__test__/Domain/Guitar.test.ts on lines 304..314

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 156.

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 9 locations. Consider refactoring.
Open

    test('map frets on C position fourth string', () => {
      const frets = GuitarString.Fourth.fretsFor(Position.C);

      expect([...frets]).toStrictEqual([
        new Fret(GuitarString.Fourth, 1, Pitch.DSharp, Octave.C3),
Severity: Major
Found in src/__test__/Domain/Guitar.test.ts and 8 other locations - About 6 hrs to fix
src/__test__/Domain/Guitar.test.ts on lines 197..207
src/__test__/Domain/Guitar.test.ts on lines 209..219
src/__test__/Domain/Guitar.test.ts on lines 233..243
src/__test__/Domain/Guitar.test.ts on lines 245..255
src/__test__/Domain/Guitar.test.ts on lines 257..267
src/__test__/Domain/Guitar.test.ts on lines 269..279
src/__test__/Domain/Guitar.test.ts on lines 281..291
src/__test__/Domain/Guitar.test.ts on lines 304..314

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 156.

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 9 locations. Consider refactoring.
Open

    test('map frets on A position', () => {
      const frets = GuitarString.Sixth.fretsFor(Position.A);

      expect([...frets]).toStrictEqual([
        new Fret(GuitarString.Sixth, 4, Pitch.GSharp, Octave.C2),
Severity: Major
Found in src/__test__/Domain/Guitar.test.ts and 8 other locations - About 6 hrs to fix
src/__test__/Domain/Guitar.test.ts on lines 197..207
src/__test__/Domain/Guitar.test.ts on lines 209..219
src/__test__/Domain/Guitar.test.ts on lines 221..231
src/__test__/Domain/Guitar.test.ts on lines 233..243
src/__test__/Domain/Guitar.test.ts on lines 245..255
src/__test__/Domain/Guitar.test.ts on lines 257..267
src/__test__/Domain/Guitar.test.ts on lines 281..291
src/__test__/Domain/Guitar.test.ts on lines 304..314

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 156.

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 9 locations. Consider refactoring.
Open

    test('map frets on D position', () => {
      const frets = GuitarString.Sixth.fretsFor(Position.D);

      expect([...frets]).toStrictEqual([
        new Fret(GuitarString.Sixth, 11, Pitch.DSharp, Octave.C3),
Severity: Major
Found in src/__test__/Domain/Guitar.test.ts and 8 other locations - About 6 hrs to fix
src/__test__/Domain/Guitar.test.ts on lines 197..207
src/__test__/Domain/Guitar.test.ts on lines 209..219
src/__test__/Domain/Guitar.test.ts on lines 221..231
src/__test__/Domain/Guitar.test.ts on lines 233..243
src/__test__/Domain/Guitar.test.ts on lines 245..255
src/__test__/Domain/Guitar.test.ts on lines 257..267
src/__test__/Domain/Guitar.test.ts on lines 269..279
src/__test__/Domain/Guitar.test.ts on lines 281..291

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 156.

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 9 locations. Consider refactoring.
Open

    test('map frets on C position first string', () => {
      const frets = GuitarString.First.fretsFor(Position.C);

      expect([...frets]).toStrictEqual([
        new Fret(GuitarString.First, 1, Pitch.F, Octave.C4),
Severity: Major
Found in src/__test__/Domain/Guitar.test.ts and 8 other locations - About 6 hrs to fix
src/__test__/Domain/Guitar.test.ts on lines 197..207
src/__test__/Domain/Guitar.test.ts on lines 209..219
src/__test__/Domain/Guitar.test.ts on lines 221..231
src/__test__/Domain/Guitar.test.ts on lines 233..243
src/__test__/Domain/Guitar.test.ts on lines 245..255
src/__test__/Domain/Guitar.test.ts on lines 269..279
src/__test__/Domain/Guitar.test.ts on lines 281..291
src/__test__/Domain/Guitar.test.ts on lines 304..314

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 156.

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 9 locations. Consider refactoring.
Open

    test('map frets on C position third string', () => {
      const frets = GuitarString.Third.fretsFor(Position.C);

      expect([...frets]).toStrictEqual([
        new Fret(GuitarString.Third, 1, Pitch.GSharp, Octave.C3),
Severity: Major
Found in src/__test__/Domain/Guitar.test.ts and 8 other locations - About 6 hrs to fix
src/__test__/Domain/Guitar.test.ts on lines 197..207
src/__test__/Domain/Guitar.test.ts on lines 209..219
src/__test__/Domain/Guitar.test.ts on lines 221..231
src/__test__/Domain/Guitar.test.ts on lines 245..255
src/__test__/Domain/Guitar.test.ts on lines 257..267
src/__test__/Domain/Guitar.test.ts on lines 269..279
src/__test__/Domain/Guitar.test.ts on lines 281..291
src/__test__/Domain/Guitar.test.ts on lines 304..314

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 156.

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 9 locations. Consider refactoring.
Open

    test('map frets on G position', () => {
      const frets = GuitarString.Sixth.fretsFor(Position.G);

      expect([...frets]).toStrictEqual([
        new Fret(GuitarString.Sixth, 6, Pitch.ASharp, Octave.C2),
Severity: Major
Found in src/__test__/Domain/Guitar.test.ts and 8 other locations - About 6 hrs to fix
src/__test__/Domain/Guitar.test.ts on lines 197..207
src/__test__/Domain/Guitar.test.ts on lines 209..219
src/__test__/Domain/Guitar.test.ts on lines 221..231
src/__test__/Domain/Guitar.test.ts on lines 233..243
src/__test__/Domain/Guitar.test.ts on lines 245..255
src/__test__/Domain/Guitar.test.ts on lines 257..267
src/__test__/Domain/Guitar.test.ts on lines 269..279
src/__test__/Domain/Guitar.test.ts on lines 304..314

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 156.

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 9 locations. Consider refactoring.
Open

    test('map frets on C position fifth string', () => {
      const frets = GuitarString.Fifth.fretsFor(Position.C);

      expect([...frets]).toStrictEqual([
        new Fret(GuitarString.Fifth, 1, Pitch.ASharp, Octave.C2),
Severity: Major
Found in src/__test__/Domain/Guitar.test.ts and 8 other locations - About 6 hrs to fix
src/__test__/Domain/Guitar.test.ts on lines 197..207
src/__test__/Domain/Guitar.test.ts on lines 221..231
src/__test__/Domain/Guitar.test.ts on lines 233..243
src/__test__/Domain/Guitar.test.ts on lines 245..255
src/__test__/Domain/Guitar.test.ts on lines 257..267
src/__test__/Domain/Guitar.test.ts on lines 269..279
src/__test__/Domain/Guitar.test.ts on lines 281..291
src/__test__/Domain/Guitar.test.ts on lines 304..314

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 156.

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('map C G E descending on C position', () => {
    const line = new MelodicLine([
      new Note(Pitch.C, Duration.Eighth, Octave.C4),
      new Note(Pitch.G, Duration.Eighth, Octave.C3),
      new Note(Pitch.E, Duration.Eighth, Octave.C3),
Severity: Major
Found in src/__test__/Domain/Guitar.tab.test.ts and 1 other location - About 6 hrs to fix
src/__test__/Domain/Guitar.tab.test.ts on lines 100..116

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 156.

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('map G E C descending on C position', () => {
    const line = new MelodicLine([
      new Note(Pitch.G, Duration.Eighth, Octave.C4),
      new Note(Pitch.E, Duration.Eighth, Octave.C4),
      new Note(Pitch.C, Duration.Eighth, Octave.C4),
Severity: Major
Found in src/__test__/Domain/Guitar.tab.test.ts and 1 other location - About 6 hrs to fix
src/__test__/Domain/Guitar.tab.test.ts on lines 118..134

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 156.

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('4 quarter notes fill it', () => {
      expect(
        measure
          .add(new Note(Pitch.C, Duration.Quarter, Octave.C1))
          .add(new Note(Pitch.C, Duration.Quarter, Octave.C2))
Severity: Major
Found in src/__test__/Domain/Song.test.ts and 1 other location - About 5 hrs to fix
src/__test__/Domain/Song.test.ts on lines 50..60

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 151.

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('2 dotted quarter notes and a quarter note fill it', () => {
      expect(
        measure
          .add(new Note(Pitch.C, Duration.DottedQuarter, Octave.C1))
          .add(new Note(Pitch.C, Duration.DottedQuarter, Octave.C2))
Severity: Major
Found in src/__test__/Domain/Song.test.ts and 1 other location - About 5 hrs to fix
src/__test__/Domain/Song.test.ts on lines 38..48

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 151.

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

Severity
Category
Status
Source
Language