pedromsantos/glenn

View on GitHub
src/Domain/Pitch.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
97%

Pitch has 91 functions (exceeds 20 allowed). Consider refactoring.
Wontfix

export class Pitch {
  PITCHES = 12;

  private constructor(
    private readonly name: string,
Severity: Major
Found in src/Domain/Pitch.ts - About 1 day to fix

    File Pitch.ts has 590 lines of code (exceeds 250 allowed). Consider refactoring.
    Wontfix

    import { PitchPrimitives } from '../primitives/Pitch';
    import { Duration } from './Duration';
    import { Interval } from './Interval';
    import { MelodicLine, Note, Octave } from './Note';
    
    
    Severity: Major
    Found in src/Domain/Pitch.ts - About 1 day to fix

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

        public static readonly B: Pitch = new Pitch(
          'B',
          11,
          Accidental.Natural,
          () => Pitch.C,
      Severity: Major
      Found in src/Domain/Pitch.ts and 5 other locations - About 3 days to fix
      src/Domain/Pitch.ts on lines 82..118
      src/Domain/Pitch.ts on lines 140..176
      src/Domain/Pitch.ts on lines 235..271
      src/Domain/Pitch.ts on lines 303..339
      src/Domain/Pitch.ts on lines 361..397

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

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

        public static readonly G: Pitch = new Pitch(
          'G',
          7,
          Accidental.Natural,
          () => Pitch.GSharp,
      Severity: Major
      Found in src/Domain/Pitch.ts and 5 other locations - About 3 days to fix
      src/Domain/Pitch.ts on lines 82..118
      src/Domain/Pitch.ts on lines 140..176
      src/Domain/Pitch.ts on lines 235..271
      src/Domain/Pitch.ts on lines 361..397
      src/Domain/Pitch.ts on lines 419..455

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

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

        public static readonly F: Pitch = new Pitch(
          'F',
          5,
          Accidental.Natural,
          () => Pitch.FSharp,
      Severity: Major
      Found in src/Domain/Pitch.ts and 5 other locations - About 3 days to fix
      src/Domain/Pitch.ts on lines 82..118
      src/Domain/Pitch.ts on lines 140..176
      src/Domain/Pitch.ts on lines 303..339
      src/Domain/Pitch.ts on lines 361..397
      src/Domain/Pitch.ts on lines 419..455

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

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

        public static readonly C: Pitch = new Pitch(
          'C',
          0,
          Accidental.Natural,
          () => Pitch.CSharp,
      Severity: Major
      Found in src/Domain/Pitch.ts and 5 other locations - About 3 days to fix
      src/Domain/Pitch.ts on lines 140..176
      src/Domain/Pitch.ts on lines 235..271
      src/Domain/Pitch.ts on lines 303..339
      src/Domain/Pitch.ts on lines 361..397
      src/Domain/Pitch.ts on lines 419..455

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

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

        public static readonly D: Pitch = new Pitch(
          'D',
          2,
          Accidental.Natural,
          () => Pitch.DSharp,
      Severity: Major
      Found in src/Domain/Pitch.ts and 5 other locations - About 3 days to fix
      src/Domain/Pitch.ts on lines 82..118
      src/Domain/Pitch.ts on lines 235..271
      src/Domain/Pitch.ts on lines 303..339
      src/Domain/Pitch.ts on lines 361..397
      src/Domain/Pitch.ts on lines 419..455

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

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

        public static readonly A: Pitch = new Pitch(
          'A',
          9,
          Accidental.Natural,
          () => Pitch.ASharp,
      Severity: Major
      Found in src/Domain/Pitch.ts and 5 other locations - About 3 days to fix
      src/Domain/Pitch.ts on lines 82..118
      src/Domain/Pitch.ts on lines 140..176
      src/Domain/Pitch.ts on lines 235..271
      src/Domain/Pitch.ts on lines 303..339
      src/Domain/Pitch.ts on lines 419..455

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

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

        public static readonly CSharp: Pitch = new Pitch(
          'C#',
          1,
          Accidental.Sharp,
          () => Pitch.D,
      Severity: Major
      Found in src/Domain/Pitch.ts and 12 other locations - About 1 hr to fix
      src/Domain/Pitch.ts on lines 130..138
      src/Domain/Pitch.ts on lines 178..186
      src/Domain/Pitch.ts on lines 188..196
      src/Domain/Pitch.ts on lines 273..281
      src/Domain/Pitch.ts on lines 283..291
      src/Domain/Pitch.ts on lines 293..301
      src/Domain/Pitch.ts on lines 341..349
      src/Domain/Pitch.ts on lines 351..359
      src/Domain/Pitch.ts on lines 399..407
      src/Domain/Pitch.ts on lines 409..417
      src/Domain/Pitch.ts on lines 457..465
      src/Domain/Pitch.ts on lines 467..475

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

        public static readonly AFlat: Pitch = new Pitch(
          'Ab',
          8,
          Accidental.Flat,
          () => Pitch.A,
      Severity: Major
      Found in src/Domain/Pitch.ts and 12 other locations - About 1 hr to fix
      src/Domain/Pitch.ts on lines 120..128
      src/Domain/Pitch.ts on lines 130..138
      src/Domain/Pitch.ts on lines 178..186
      src/Domain/Pitch.ts on lines 188..196
      src/Domain/Pitch.ts on lines 273..281
      src/Domain/Pitch.ts on lines 283..291
      src/Domain/Pitch.ts on lines 293..301
      src/Domain/Pitch.ts on lines 341..349
      src/Domain/Pitch.ts on lines 399..407
      src/Domain/Pitch.ts on lines 409..417
      src/Domain/Pitch.ts on lines 457..465
      src/Domain/Pitch.ts on lines 467..475

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

        public static readonly FSharp: Pitch = new Pitch(
          'F#',
          6,
          Accidental.Sharp,
          () => Pitch.G,
      Severity: Major
      Found in src/Domain/Pitch.ts and 12 other locations - About 1 hr to fix
      src/Domain/Pitch.ts on lines 120..128
      src/Domain/Pitch.ts on lines 130..138
      src/Domain/Pitch.ts on lines 178..186
      src/Domain/Pitch.ts on lines 188..196
      src/Domain/Pitch.ts on lines 273..281
      src/Domain/Pitch.ts on lines 293..301
      src/Domain/Pitch.ts on lines 341..349
      src/Domain/Pitch.ts on lines 351..359
      src/Domain/Pitch.ts on lines 399..407
      src/Domain/Pitch.ts on lines 409..417
      src/Domain/Pitch.ts on lines 457..465
      src/Domain/Pitch.ts on lines 467..475

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

        public static readonly GSharp: Pitch = new Pitch(
          'G#',
          8,
          Accidental.Sharp,
          () => Pitch.A,
      Severity: Major
      Found in src/Domain/Pitch.ts and 12 other locations - About 1 hr to fix
      src/Domain/Pitch.ts on lines 120..128
      src/Domain/Pitch.ts on lines 130..138
      src/Domain/Pitch.ts on lines 178..186
      src/Domain/Pitch.ts on lines 188..196
      src/Domain/Pitch.ts on lines 273..281
      src/Domain/Pitch.ts on lines 283..291
      src/Domain/Pitch.ts on lines 293..301
      src/Domain/Pitch.ts on lines 351..359
      src/Domain/Pitch.ts on lines 399..407
      src/Domain/Pitch.ts on lines 409..417
      src/Domain/Pitch.ts on lines 457..465
      src/Domain/Pitch.ts on lines 467..475

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

        public static readonly DSharp: Pitch = new Pitch(
          'D#',
          3,
          Accidental.Sharp,
          () => Pitch.E,
      Severity: Major
      Found in src/Domain/Pitch.ts and 12 other locations - About 1 hr to fix
      src/Domain/Pitch.ts on lines 120..128
      src/Domain/Pitch.ts on lines 130..138
      src/Domain/Pitch.ts on lines 188..196
      src/Domain/Pitch.ts on lines 273..281
      src/Domain/Pitch.ts on lines 283..291
      src/Domain/Pitch.ts on lines 293..301
      src/Domain/Pitch.ts on lines 341..349
      src/Domain/Pitch.ts on lines 351..359
      src/Domain/Pitch.ts on lines 399..407
      src/Domain/Pitch.ts on lines 409..417
      src/Domain/Pitch.ts on lines 457..465
      src/Domain/Pitch.ts on lines 467..475

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

        public static readonly EFlat: Pitch = new Pitch(
          'Eb',
          3,
          Accidental.Flat,
          () => Pitch.E,
      Severity: Major
      Found in src/Domain/Pitch.ts and 12 other locations - About 1 hr to fix
      src/Domain/Pitch.ts on lines 120..128
      src/Domain/Pitch.ts on lines 130..138
      src/Domain/Pitch.ts on lines 178..186
      src/Domain/Pitch.ts on lines 273..281
      src/Domain/Pitch.ts on lines 283..291
      src/Domain/Pitch.ts on lines 293..301
      src/Domain/Pitch.ts on lines 341..349
      src/Domain/Pitch.ts on lines 351..359
      src/Domain/Pitch.ts on lines 399..407
      src/Domain/Pitch.ts on lines 409..417
      src/Domain/Pitch.ts on lines 457..465
      src/Domain/Pitch.ts on lines 467..475

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

        public static readonly DFlat: Pitch = new Pitch(
          'Db',
          1,
          Accidental.Flat,
          () => Pitch.D,
      Severity: Major
      Found in src/Domain/Pitch.ts and 12 other locations - About 1 hr to fix
      src/Domain/Pitch.ts on lines 120..128
      src/Domain/Pitch.ts on lines 178..186
      src/Domain/Pitch.ts on lines 188..196
      src/Domain/Pitch.ts on lines 273..281
      src/Domain/Pitch.ts on lines 283..291
      src/Domain/Pitch.ts on lines 293..301
      src/Domain/Pitch.ts on lines 341..349
      src/Domain/Pitch.ts on lines 351..359
      src/Domain/Pitch.ts on lines 399..407
      src/Domain/Pitch.ts on lines 409..417
      src/Domain/Pitch.ts on lines 457..465
      src/Domain/Pitch.ts on lines 467..475

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

        public static readonly ASharp: Pitch = new Pitch(
          'A#',
          10,
          Accidental.Sharp,
          () => Pitch.B,
      Severity: Major
      Found in src/Domain/Pitch.ts and 12 other locations - About 1 hr to fix
      src/Domain/Pitch.ts on lines 120..128
      src/Domain/Pitch.ts on lines 130..138
      src/Domain/Pitch.ts on lines 178..186
      src/Domain/Pitch.ts on lines 188..196
      src/Domain/Pitch.ts on lines 273..281
      src/Domain/Pitch.ts on lines 283..291
      src/Domain/Pitch.ts on lines 293..301
      src/Domain/Pitch.ts on lines 341..349
      src/Domain/Pitch.ts on lines 351..359
      src/Domain/Pitch.ts on lines 409..417
      src/Domain/Pitch.ts on lines 457..465
      src/Domain/Pitch.ts on lines 467..475

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

        public static readonly BSharp: Pitch = new Pitch(
          'C',
          0,
          Accidental.Sharp,
          () => Pitch.C,
      Severity: Major
      Found in src/Domain/Pitch.ts and 12 other locations - About 1 hr to fix
      src/Domain/Pitch.ts on lines 120..128
      src/Domain/Pitch.ts on lines 130..138
      src/Domain/Pitch.ts on lines 178..186
      src/Domain/Pitch.ts on lines 188..196
      src/Domain/Pitch.ts on lines 273..281
      src/Domain/Pitch.ts on lines 283..291
      src/Domain/Pitch.ts on lines 293..301
      src/Domain/Pitch.ts on lines 341..349
      src/Domain/Pitch.ts on lines 351..359
      src/Domain/Pitch.ts on lines 399..407
      src/Domain/Pitch.ts on lines 409..417
      src/Domain/Pitch.ts on lines 467..475

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

        public static readonly ESharp: Pitch = new Pitch(
          'E#',
          5,
          Accidental.Sharp,
          () => Pitch.F,
      Severity: Major
      Found in src/Domain/Pitch.ts and 12 other locations - About 1 hr to fix
      src/Domain/Pitch.ts on lines 120..128
      src/Domain/Pitch.ts on lines 130..138
      src/Domain/Pitch.ts on lines 178..186
      src/Domain/Pitch.ts on lines 188..196
      src/Domain/Pitch.ts on lines 283..291
      src/Domain/Pitch.ts on lines 293..301
      src/Domain/Pitch.ts on lines 341..349
      src/Domain/Pitch.ts on lines 351..359
      src/Domain/Pitch.ts on lines 399..407
      src/Domain/Pitch.ts on lines 409..417
      src/Domain/Pitch.ts on lines 457..465
      src/Domain/Pitch.ts on lines 467..475

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

        public static readonly GFlat: Pitch = new Pitch(
          'Gb',
          6,
          Accidental.Flat,
          () => Pitch.G,
      Severity: Major
      Found in src/Domain/Pitch.ts and 12 other locations - About 1 hr to fix
      src/Domain/Pitch.ts on lines 120..128
      src/Domain/Pitch.ts on lines 130..138
      src/Domain/Pitch.ts on lines 178..186
      src/Domain/Pitch.ts on lines 188..196
      src/Domain/Pitch.ts on lines 273..281
      src/Domain/Pitch.ts on lines 283..291
      src/Domain/Pitch.ts on lines 341..349
      src/Domain/Pitch.ts on lines 351..359
      src/Domain/Pitch.ts on lines 399..407
      src/Domain/Pitch.ts on lines 409..417
      src/Domain/Pitch.ts on lines 457..465
      src/Domain/Pitch.ts on lines 467..475

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

        public static readonly BFlat: Pitch = new Pitch(
          'Bb',
          10,
          Accidental.Flat,
          () => Pitch.B,
      Severity: Major
      Found in src/Domain/Pitch.ts and 12 other locations - About 1 hr to fix
      src/Domain/Pitch.ts on lines 120..128
      src/Domain/Pitch.ts on lines 130..138
      src/Domain/Pitch.ts on lines 178..186
      src/Domain/Pitch.ts on lines 188..196
      src/Domain/Pitch.ts on lines 273..281
      src/Domain/Pitch.ts on lines 283..291
      src/Domain/Pitch.ts on lines 293..301
      src/Domain/Pitch.ts on lines 341..349
      src/Domain/Pitch.ts on lines 351..359
      src/Domain/Pitch.ts on lines 399..407
      src/Domain/Pitch.ts on lines 457..465
      src/Domain/Pitch.ts on lines 467..475

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

        public static readonly CFlat: Pitch = new Pitch(
          'Cb',
          11,
          Accidental.Flat,
          () => Pitch.C,
      Severity: Major
      Found in src/Domain/Pitch.ts and 12 other locations - About 1 hr to fix
      src/Domain/Pitch.ts on lines 120..128
      src/Domain/Pitch.ts on lines 130..138
      src/Domain/Pitch.ts on lines 178..186
      src/Domain/Pitch.ts on lines 188..196
      src/Domain/Pitch.ts on lines 273..281
      src/Domain/Pitch.ts on lines 283..291
      src/Domain/Pitch.ts on lines 293..301
      src/Domain/Pitch.ts on lines 341..349
      src/Domain/Pitch.ts on lines 351..359
      src/Domain/Pitch.ts on lines 399..407
      src/Domain/Pitch.ts on lines 409..417
      src/Domain/Pitch.ts on lines 457..465

      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

        sharp = () => {
          return new IntervalsToPitches(
            this.intervalsToPitches.map(
              (it) =>
                ({
      Severity: Major
      Found in src/Domain/Pitch.ts and 1 other location - About 1 hr to fix
      src/Domain/Pitch.ts on lines 520..530

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

      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

        flat = () => {
          return new IntervalsToPitches(
            this.intervalsToPitches.map(
              (it) =>
                ({
      Severity: Major
      Found in src/Domain/Pitch.ts and 1 other location - About 1 hr to fix
      src/Domain/Pitch.ts on lines 508..518

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

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

        *[Symbol.iterator](): Iterator<Pitch> {
          for (const pitch of this.line) {
            yield pitch;
          }
        }
      Severity: Major
      Found in src/Domain/Pitch.ts and 3 other locations - About 35 mins to fix
      src/Domain/Barry.ts on lines 43..47
      src/Domain/Counterpoint.ts on lines 43..47
      src/Domain/Scale.ts on lines 410..414

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

      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