pedromsantos/glenn

View on GitHub

Showing 34 of 459 total issues

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

export class AbcDuration {
  constructor(private readonly duration: DurationPrimitives) {}

  toString() {
    return `L:${this.duration.fraction}`;
Severity: Major
Found in src/abcNotation/abcDuration.ts and 3 other locations - About 55 mins to fix
src/abcNotation/abcChord.ts on lines 25..31
src/abcNotation/abcKey.ts on lines 3..9
src/abcNotation/abcMeter.ts on lines 3..9

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

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

export class AbcMeter {
  constructor(private readonly timeSignature: TimeSignaturePrimitives) {}

  toString() {
    return `M:${this.timeSignature.signature}`;
Severity: Major
Found in src/abcNotation/abcMeter.ts and 3 other locations - About 55 mins to fix
src/abcNotation/abcChord.ts on lines 25..31
src/abcNotation/abcDuration.ts on lines 3..9
src/abcNotation/abcKey.ts on lines 3..9

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

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

    return new ClosedChord(
      chordPitches.pitchForFunction(ChordFunction.Root),
      ChordPattern.patternFor(chordPitches.toIntervals()) ?? ChordPattern.Major7,
      Duration.Whole,
      Octave.C4
Severity: Minor
Found in src/Domain/Scale.ts and 1 other location - About 55 mins to fix
src/Domain/Scale.ts on lines 425..430

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

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

    return new ClosedChord(
      chordPitches.pitchForFunction(ChordFunction.Root),
      ChordPattern.patternFor(chordPitches.toIntervals()) ?? ChordPattern.Major,
      Duration.Whole,
      Octave.C4
Severity: Minor
Found in src/Domain/Scale.ts and 1 other location - About 55 mins to fix
src/Domain/Scale.ts on lines 447..452

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

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

        i.name == primitive.name &&
        i.distance == primitive.distance &&
        i.abreviature == primitive.abreviature &&
Severity: Minor
Found in src/Domain/Interval.ts and 1 other location - About 30 mins to fix
src/Domain/Interval.ts on lines 345..347

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

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

        (i.quality === IntervalQuality.Perfect ||
          i.quality === IntervalQuality.Minor ||
          i.quality === IntervalQuality.Major)
Severity: Minor
Found in src/Domain/Interval.ts and 1 other location - About 30 mins to fix
src/Domain/Interval.ts on lines 68..70

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

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

Library smartwrap is licensed under a non-compliant license: GNU General Public License 2.0
Open

smartwrap@^2.0.2:
Severity: Minor
Found in yarn.lock by git-legal

No licenses found for jest-get-type. Either the library reports the licenses in an unsupported format, or the library is unlicensed.
Open

jest-get-type@^29.6.3:
Severity: Minor
Found in yarn.lock by git-legal

No licenses found for jest-circus. Either the library reports the licenses in an unsupported format, or the library is unlicensed.
Open

jest-circus@^29.7.0:
Severity: Minor
Found in yarn.lock by git-legal

No licenses found for jest-util. Either the library reports the licenses in an unsupported format, or the library is unlicensed.
Open

jest-util@^29.0.0, jest-util@^29.7.0:
Severity: Minor
Found in yarn.lock by git-legal

Library breakword is licensed under a non-compliant license: GNU General Public License 2.0
Open

breakword@^1.0.5:
Severity: Minor
Found in yarn.lock by git-legal

No licenses found for makeerror. Either the library reports the licenses in an unsupported format, or the library is unlicensed.
Open

makeerror@1.0.12:
Severity: Minor
Found in yarn.lock by git-legal

No licenses found for tmp. Either the library reports the licenses in an unsupported format, or the library is unlicensed.
Open

tmp@^0.0.33:
Severity: Minor
Found in yarn.lock by git-legal

No licenses found for create-jest. Either the library reports the licenses in an unsupported format, or the library is unlicensed.
Open

create-jest@^29.7.0:
Severity: Minor
Found in yarn.lock by git-legal
Severity
Category
Status
Source
Language