pedromsantos/glenn

View on GitHub
src/__test__/Domain/Guitar.test.ts

Summary

Maintainability
F
6 days
Test Coverage

File Guitar.test.ts has 342 lines of code (exceeds 250 allowed). Consider refactoring.
Wontfix

import * as fc from 'fast-check';

import {
  BlankFret,
  Fret,
Severity: Minor
Found in src/__test__/Domain/Guitar.test.ts - About 4 hrs to fix

    Similar blocks of code found in 3 locations. Consider refactoring.
    Wontfix

        test('Open A', () => {
          const { sixth, fifth, fourth, third, second, first } = GuitarTunningStrings(
            GuitarTuning.OpenA
          );
    
    
    Severity: Major
    Found in src/__test__/Domain/Guitar.test.ts and 2 other locations - About 1 day to fix
    src/__test__/Domain/Guitar.test.ts on lines 353..364
    src/__test__/Domain/Guitar.test.ts on lines 366..377

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

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

        test('Open B', () => {
          const { sixth, fifth, fourth, third, second, first } = GuitarTunningStrings(
            GuitarTuning.OpenB
          );
    
    
    Severity: Major
    Found in src/__test__/Domain/Guitar.test.ts and 2 other locations - About 1 day to fix
    src/__test__/Domain/Guitar.test.ts on lines 340..351
    src/__test__/Domain/Guitar.test.ts on lines 366..377

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

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

        test('Eb', () => {
          const { sixth, fifth, fourth, third, second, first } = GuitarTunningStrings(
            GuitarTuning.EFlat
          );
    
    
    Severity: Major
    Found in src/__test__/Domain/Guitar.test.ts and 2 other locations - About 1 day to fix
    src/__test__/Domain/Guitar.test.ts on lines 340..351
    src/__test__/Domain/Guitar.test.ts on lines 353..364

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

    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 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 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 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 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 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 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 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 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 2 locations. Consider refactoring.
    Wontfix

      test('be 1 if all frets are within adjacent strings', () => {
        const horizontalFrets = new HorizontalFrets([
          new Fret(GuitarString.Fourth, 2, Pitch.E),
          new Fret(GuitarString.Fifth, 3, Pitch.C),
          new Fret(GuitarString.Third, 2, Pitch.BFlat),
    Severity: Major
    Found in src/__test__/Domain/Guitar.test.ts and 1 other location - About 2 hrs to fix
    src/__test__/Domain/Guitar.test.ts on lines 135..143

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

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

      test('be 2 if all frets are within adjacent of adjacent strings', () => {
        const horizontalFrets = new HorizontalFrets([
          new Fret(GuitarString.Third, 2, Pitch.BFlat),
          new Fret(GuitarString.Fifth, 3, Pitch.C),
          new Fret(GuitarString.First, 3, Pitch.G),
    Severity: Major
    Found in src/__test__/Domain/Guitar.test.ts and 1 other location - About 2 hrs to fix
    src/__test__/Domain/Guitar.test.ts on lines 125..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 92.

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

      test('Not be equal if not on same fret', () => {
        const fret1 = new Fret(GuitarString.First, 1);
        const fret2 = new Fret(GuitarString.First, 2);
    
        expect(fret1.equals(fret2)).toBeFalsy();
    Severity: Major
    Found in src/__test__/Domain/Guitar.test.ts and 1 other location - About 1 hr to fix
    src/__test__/Domain/Guitar.test.ts on lines 53..58

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

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

      test('Not be equal if not on same string', () => {
        const fret1 = new Fret(GuitarString.First, 1);
        const fret2 = new Fret(GuitarString.Second, 1);
    
        expect(fret1.equals(fret2)).toBeFalsy();
    Severity: Major
    Found in src/__test__/Domain/Guitar.test.ts and 1 other location - About 1 hr to fix
    src/__test__/Domain/Guitar.test.ts on lines 60..65

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

    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 5 locations. Consider refactoring.
    Wontfix

        test('map G to third fret', () => {
          expect(GuitarString.Sixth.fretFor(Pitch.G)).toStrictEqual(
            new Fret(GuitarString.Sixth, 3, Pitch.G)
          );
        });
    Severity: Major
    Found in src/__test__/Domain/Guitar.test.ts and 4 other locations - About 1 hr to fix
    src/__test__/Domain/Guitar.test.ts on lines 167..171
    src/__test__/Domain/Guitar.test.ts on lines 173..177
    src/__test__/Domain/Guitar.test.ts on lines 179..183
    src/__test__/Domain/Guitar.test.ts on lines 185..189

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

    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 5 locations. Consider refactoring.
    Wontfix

        test('map Gb to second fret', () => {
          expect(GuitarString.Sixth.fretFor(Pitch.GFlat)).toStrictEqual(
            new Fret(GuitarString.Sixth, 2, Pitch.GFlat)
          );
        });
    Severity: Major
    Found in src/__test__/Domain/Guitar.test.ts and 4 other locations - About 1 hr to fix
    src/__test__/Domain/Guitar.test.ts on lines 167..171
    src/__test__/Domain/Guitar.test.ts on lines 173..177
    src/__test__/Domain/Guitar.test.ts on lines 179..183
    src/__test__/Domain/Guitar.test.ts on lines 191..195

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

    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 5 locations. Consider refactoring.
    Wontfix

        test('map F to first fret', () => {
          expect(GuitarString.Sixth.fretFor(Pitch.F)).toStrictEqual(
            new Fret(GuitarString.Sixth, 1, Pitch.F)
          );
        });
    Severity: Major
    Found in src/__test__/Domain/Guitar.test.ts and 4 other locations - About 1 hr to fix
    src/__test__/Domain/Guitar.test.ts on lines 167..171
    src/__test__/Domain/Guitar.test.ts on lines 179..183
    src/__test__/Domain/Guitar.test.ts on lines 185..189
    src/__test__/Domain/Guitar.test.ts on lines 191..195

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

    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 5 locations. Consider refactoring.
    Wontfix

        test('map F# to second fret', () => {
          expect(GuitarString.Sixth.fretFor(Pitch.FSharp)).toStrictEqual(
            new Fret(GuitarString.Sixth, 2, Pitch.FSharp)
          );
        });
    Severity: Major
    Found in src/__test__/Domain/Guitar.test.ts and 4 other locations - About 1 hr to fix
    src/__test__/Domain/Guitar.test.ts on lines 167..171
    src/__test__/Domain/Guitar.test.ts on lines 173..177
    src/__test__/Domain/Guitar.test.ts on lines 185..189
    src/__test__/Domain/Guitar.test.ts on lines 191..195

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

    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 5 locations. Consider refactoring.
    Wontfix

        test('map E to open string', () => {
          expect(GuitarString.Sixth.fretFor(Pitch.E)).toStrictEqual(
            new Fret(GuitarString.Sixth, 0, Pitch.E)
          );
        });
    Severity: Major
    Found in src/__test__/Domain/Guitar.test.ts and 4 other locations - About 1 hr to fix
    src/__test__/Domain/Guitar.test.ts on lines 173..177
    src/__test__/Domain/Guitar.test.ts on lines 179..183
    src/__test__/Domain/Guitar.test.ts on lines 185..189
    src/__test__/Domain/Guitar.test.ts on lines 191..195

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

    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

    There are no issues that match your filters.

    Category
    Status