pedromsantos/glenn

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

Summary

Maintainability
C
1 day
Test Coverage

File Guitar.test.ts has 373 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 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 353..364
    src/__test__/Domain/Guitar.test.ts on lines 379..390

    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 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 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 366..377
    src/__test__/Domain/Guitar.test.ts on lines 379..390

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

        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 210..220
    src/__test__/Domain/Guitar.test.ts on lines 222..232
    src/__test__/Domain/Guitar.test.ts on lines 246..256
    src/__test__/Domain/Guitar.test.ts on lines 258..268
    src/__test__/Domain/Guitar.test.ts on lines 270..280
    src/__test__/Domain/Guitar.test.ts on lines 282..292
    src/__test__/Domain/Guitar.test.ts on lines 294..304
    src/__test__/Domain/Guitar.test.ts on lines 317..327

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

        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 210..220
    src/__test__/Domain/Guitar.test.ts on lines 222..232
    src/__test__/Domain/Guitar.test.ts on lines 234..244
    src/__test__/Domain/Guitar.test.ts on lines 246..256
    src/__test__/Domain/Guitar.test.ts on lines 258..268
    src/__test__/Domain/Guitar.test.ts on lines 270..280
    src/__test__/Domain/Guitar.test.ts on lines 282..292
    src/__test__/Domain/Guitar.test.ts on lines 294..304

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

        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 210..220
    src/__test__/Domain/Guitar.test.ts on lines 222..232
    src/__test__/Domain/Guitar.test.ts on lines 234..244
    src/__test__/Domain/Guitar.test.ts on lines 258..268
    src/__test__/Domain/Guitar.test.ts on lines 270..280
    src/__test__/Domain/Guitar.test.ts on lines 282..292
    src/__test__/Domain/Guitar.test.ts on lines 294..304
    src/__test__/Domain/Guitar.test.ts on lines 317..327

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

        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 210..220
    src/__test__/Domain/Guitar.test.ts on lines 222..232
    src/__test__/Domain/Guitar.test.ts on lines 234..244
    src/__test__/Domain/Guitar.test.ts on lines 246..256
    src/__test__/Domain/Guitar.test.ts on lines 270..280
    src/__test__/Domain/Guitar.test.ts on lines 282..292
    src/__test__/Domain/Guitar.test.ts on lines 294..304
    src/__test__/Domain/Guitar.test.ts on lines 317..327

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

        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 210..220
    src/__test__/Domain/Guitar.test.ts on lines 222..232
    src/__test__/Domain/Guitar.test.ts on lines 234..244
    src/__test__/Domain/Guitar.test.ts on lines 246..256
    src/__test__/Domain/Guitar.test.ts on lines 258..268
    src/__test__/Domain/Guitar.test.ts on lines 282..292
    src/__test__/Domain/Guitar.test.ts on lines 294..304
    src/__test__/Domain/Guitar.test.ts on lines 317..327

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

        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 210..220
    src/__test__/Domain/Guitar.test.ts on lines 234..244
    src/__test__/Domain/Guitar.test.ts on lines 246..256
    src/__test__/Domain/Guitar.test.ts on lines 258..268
    src/__test__/Domain/Guitar.test.ts on lines 270..280
    src/__test__/Domain/Guitar.test.ts on lines 282..292
    src/__test__/Domain/Guitar.test.ts on lines 294..304
    src/__test__/Domain/Guitar.test.ts on lines 317..327

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

        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 210..220
    src/__test__/Domain/Guitar.test.ts on lines 222..232
    src/__test__/Domain/Guitar.test.ts on lines 234..244
    src/__test__/Domain/Guitar.test.ts on lines 246..256
    src/__test__/Domain/Guitar.test.ts on lines 258..268
    src/__test__/Domain/Guitar.test.ts on lines 270..280
    src/__test__/Domain/Guitar.test.ts on lines 282..292
    src/__test__/Domain/Guitar.test.ts on lines 317..327

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

        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 222..232
    src/__test__/Domain/Guitar.test.ts on lines 234..244
    src/__test__/Domain/Guitar.test.ts on lines 246..256
    src/__test__/Domain/Guitar.test.ts on lines 258..268
    src/__test__/Domain/Guitar.test.ts on lines 270..280
    src/__test__/Domain/Guitar.test.ts on lines 282..292
    src/__test__/Domain/Guitar.test.ts on lines 294..304
    src/__test__/Domain/Guitar.test.ts on lines 317..327

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

        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 210..220
    src/__test__/Domain/Guitar.test.ts on lines 222..232
    src/__test__/Domain/Guitar.test.ts on lines 234..244
    src/__test__/Domain/Guitar.test.ts on lines 246..256
    src/__test__/Domain/Guitar.test.ts on lines 258..268
    src/__test__/Domain/Guitar.test.ts on lines 270..280
    src/__test__/Domain/Guitar.test.ts on lines 294..304
    src/__test__/Domain/Guitar.test.ts on lines 317..327

    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('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

    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 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 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 180..184
    src/__test__/Domain/Guitar.test.ts on lines 186..190
    src/__test__/Domain/Guitar.test.ts on lines 192..196
    src/__test__/Domain/Guitar.test.ts on lines 198..202

    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 186..190
    src/__test__/Domain/Guitar.test.ts on lines 192..196
    src/__test__/Domain/Guitar.test.ts on lines 198..202
    src/__test__/Domain/Guitar.test.ts on lines 204..208

    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 180..184
    src/__test__/Domain/Guitar.test.ts on lines 186..190
    src/__test__/Domain/Guitar.test.ts on lines 198..202
    src/__test__/Domain/Guitar.test.ts on lines 204..208

    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 180..184
    src/__test__/Domain/Guitar.test.ts on lines 186..190
    src/__test__/Domain/Guitar.test.ts on lines 192..196
    src/__test__/Domain/Guitar.test.ts on lines 204..208

    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 180..184
    src/__test__/Domain/Guitar.test.ts on lines 192..196
    src/__test__/Domain/Guitar.test.ts on lines 198..202
    src/__test__/Domain/Guitar.test.ts on lines 204..208

    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