pedromsantos/glenn

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

Summary

Maintainability
A
F
+6 days
Test Coverage

Similar blocks of code found in 9 locations. Consider refactoring.
New

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

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

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

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

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

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

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

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

    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 4 locations. Consider refactoring.
Fixed

Severity: Major
Found in src/__test__/Domain/Guitar.test.ts and 3 other locations - About 4 hrs to fix
src/__test__/Domain/Guitar.test.ts on lines 196..206
src/__test__/Domain/Guitar.test.ts on lines 208..218
src/__test__/Domain/Guitar.test.ts on lines 243..253

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

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

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

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

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

Refactorings

Further Reading

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

Severity: Major
Found in src/__test__/Domain/Guitar.test.ts and 3 other locations - About 4 hrs to fix
src/__test__/Domain/Guitar.test.ts on lines 196..206
src/__test__/Domain/Guitar.test.ts on lines 220..230
src/__test__/Domain/Guitar.test.ts on lines 243..253

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

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

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

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

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

Refactorings

Further Reading

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

Severity: Major
Found in src/__test__/Domain/Guitar.test.ts and 3 other locations - About 4 hrs to fix
src/__test__/Domain/Guitar.test.ts on lines 208..218
src/__test__/Domain/Guitar.test.ts on lines 220..230
src/__test__/Domain/Guitar.test.ts on lines 243..253

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

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

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

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

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

Refactorings

Further Reading

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

Severity: Major
Found in src/__test__/Domain/Guitar.test.ts and 3 other locations - About 4 hrs to fix
src/__test__/Domain/Guitar.test.ts on lines 196..206
src/__test__/Domain/Guitar.test.ts on lines 208..218
src/__test__/Domain/Guitar.test.ts on lines 220..230

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

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