bemusic/bemuse

View on GitHub

Showing 508 of 508 total issues

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

    it('completely fills in if player finishes with ≥520000', () => {
      const gauge = setup(555555, [100, 100])
      assert(gauge.getPrimary() === 1)
    })
Severity: Major
Found in bemuse/src/game/display/Gauge.spec.js and 8 other locations - About 35 mins to fix
bemuse/src/game/display/Gauge.spec.js on lines 33..36
bemuse/src/game/display/Gauge.spec.js on lines 46..49
bemuse/src/game/display/Gauge.spec.js on lines 52..55
bemuse/src/game/display/Gauge.spec.js on lines 56..59
bemuse/src/game/display/Gauge.spec.js on lines 60..63
bemuse/src/game/display/Gauge.spec.js on lines 66..69
bemuse/src/game/display/Gauge.spec.js on lines 70..73
bemuse/src/game/display/Gauge.spec.js on lines 74..77

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

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

    it('is inactive if player cannot attain S rank anymore', () => {
      const gauge = setup(499999, [100, 100])
      assert(gauge.getPrimary() === 0)
    })
Severity: Major
Found in bemuse/src/game/display/Gauge.spec.js and 8 other locations - About 35 mins to fix
bemuse/src/game/display/Gauge.spec.js on lines 33..36
bemuse/src/game/display/Gauge.spec.js on lines 37..40
bemuse/src/game/display/Gauge.spec.js on lines 52..55
bemuse/src/game/display/Gauge.spec.js on lines 56..59
bemuse/src/game/display/Gauge.spec.js on lines 60..63
bemuse/src/game/display/Gauge.spec.js on lines 66..69
bemuse/src/game/display/Gauge.spec.js on lines 70..73
bemuse/src/game/display/Gauge.spec.js on lines 74..77

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

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

    it('inactive while player still can attain S rank', () => {
      const gauge = setup(500001, [40, 100])
      assert(gauge.getSecondary() === 0)
    })
Severity: Major
Found in bemuse/src/game/display/Gauge.spec.js and 8 other locations - About 35 mins to fix
bemuse/src/game/display/Gauge.spec.js on lines 33..36
bemuse/src/game/display/Gauge.spec.js on lines 37..40
bemuse/src/game/display/Gauge.spec.js on lines 46..49
bemuse/src/game/display/Gauge.spec.js on lines 56..59
bemuse/src/game/display/Gauge.spec.js on lines 60..63
bemuse/src/game/display/Gauge.spec.js on lines 66..69
bemuse/src/game/display/Gauge.spec.js on lines 70..73
bemuse/src/game/display/Gauge.spec.js on lines 74..77

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

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

    it('starts at half', () => {
      const gauge = setup(555555, [0, 100])
      assert(gauge.getPrimary() === 0.5)
    })
Severity: Major
Found in bemuse/src/game/display/Gauge.spec.js and 8 other locations - About 35 mins to fix
bemuse/src/game/display/Gauge.spec.js on lines 37..40
bemuse/src/game/display/Gauge.spec.js on lines 46..49
bemuse/src/game/display/Gauge.spec.js on lines 52..55
bemuse/src/game/display/Gauge.spec.js on lines 56..59
bemuse/src/game/display/Gauge.spec.js on lines 60..63
bemuse/src/game/display/Gauge.spec.js on lines 66..69
bemuse/src/game/display/Gauge.spec.js on lines 70..73
bemuse/src/game/display/Gauge.spec.js on lines 74..77

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

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

    it('zeroes out when user cannot attain A rank anymore', () => {
      const gauge = setup(449999, [40, 100])
      assert(gauge.getSecondary() === 0)
    })
Severity: Major
Found in bemuse/src/game/display/Gauge.spec.js and 8 other locations - About 35 mins to fix
bemuse/src/game/display/Gauge.spec.js on lines 33..36
bemuse/src/game/display/Gauge.spec.js on lines 37..40
bemuse/src/game/display/Gauge.spec.js on lines 46..49
bemuse/src/game/display/Gauge.spec.js on lines 52..55
bemuse/src/game/display/Gauge.spec.js on lines 56..59
bemuse/src/game/display/Gauge.spec.js on lines 66..69
bemuse/src/game/display/Gauge.spec.js on lines 70..73
bemuse/src/game/display/Gauge.spec.js on lines 74..77

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

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

    it('starts at 0', () => {
      const gauge = setup(555555, [0, 100])
      assert(gauge.getExtra() === 0)
    })
Severity: Major
Found in bemuse/src/game/display/Gauge.spec.js and 8 other locations - About 35 mins to fix
bemuse/src/game/display/Gauge.spec.js on lines 33..36
bemuse/src/game/display/Gauge.spec.js on lines 37..40
bemuse/src/game/display/Gauge.spec.js on lines 46..49
bemuse/src/game/display/Gauge.spec.js on lines 52..55
bemuse/src/game/display/Gauge.spec.js on lines 56..59
bemuse/src/game/display/Gauge.spec.js on lines 60..63
bemuse/src/game/display/Gauge.spec.js on lines 70..73
bemuse/src/game/display/Gauge.spec.js on lines 74..77

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

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

    it('active while player still can attain A rank', () => {
      const gauge = setup(499999, [40, 100])
      assert(gauge.getSecondary() >= 0.99)
    })
Severity: Major
Found in bemuse/src/game/display/Gauge.spec.js and 8 other locations - About 35 mins to fix
bemuse/src/game/display/Gauge.spec.js on lines 33..36
bemuse/src/game/display/Gauge.spec.js on lines 37..40
bemuse/src/game/display/Gauge.spec.js on lines 46..49
bemuse/src/game/display/Gauge.spec.js on lines 52..55
bemuse/src/game/display/Gauge.spec.js on lines 60..63
bemuse/src/game/display/Gauge.spec.js on lines 66..69
bemuse/src/game/display/Gauge.spec.js on lines 70..73
bemuse/src/game/display/Gauge.spec.js on lines 74..77

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

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

  await tester.checkState(async (state) => {
    expect(state.songs).to.have.length(2)
  })
Severity: Major
Found in bemuse/src/custom-folder/index.spec.ts and 4 other locations - About 35 mins to fix
bemuse/src/custom-folder/index.spec.ts on lines 66..68
bemuse/src/custom-folder/index.spec.ts on lines 72..74
bemuse/src/custom-folder/index.spec.ts on lines 82..84
bemuse/src/custom-folder/index.spec.ts on lines 88..90

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

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

  await tester.checkState(async (state) => {
    expect(state.songs).to.have.length(2)
  })
Severity: Major
Found in bemuse/src/custom-folder/index.spec.ts and 4 other locations - About 35 mins to fix
bemuse/src/custom-folder/index.spec.ts on lines 56..58
bemuse/src/custom-folder/index.spec.ts on lines 66..68
bemuse/src/custom-folder/index.spec.ts on lines 72..74
bemuse/src/custom-folder/index.spec.ts on lines 88..90

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

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

      } else if (
        buffer[0] === 0x4f &&
        buffer[1] === 0x67 &&
        buffer[2] === 0x67 &&
        buffer[3] === 0x53
Severity: Minor
Found in packages/bemuse-tools/src/audio.js and 1 other location - About 35 mins to fix
bemuse/src/sampling-master/index.js on lines 109..116

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

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

  await tester.checkState(async (state) => {
    expect(state.songs).to.have.length(2)
  })
Severity: Major
Found in bemuse/src/custom-folder/index.spec.ts and 4 other locations - About 35 mins to fix
bemuse/src/custom-folder/index.spec.ts on lines 56..58
bemuse/src/custom-folder/index.spec.ts on lines 66..68
bemuse/src/custom-folder/index.spec.ts on lines 82..84
bemuse/src/custom-folder/index.spec.ts on lines 88..90

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

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

  get fileList() {
    return this._getLinks().then((links) => links.map((l) => l.Name))
  }
Severity: Minor
Found in bemuse/src/resources/ipfs-resources.js and 1 other location - About 35 mins to fix
bemuse/src/resources/ipfs-resources.js on lines 55..57

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

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

        if (
          view[0] === 0x4f &&
          view[1] === 0x67 &&
          view[2] === 0x67 &&
          view[3] === 0x53
Severity: Minor
Found in bemuse/src/sampling-master/index.js and 1 other location - About 35 mins to fix
packages/bemuse-tools/src/audio.js on lines 56..63

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

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

  await tester.checkState(async (state) => {
    expect(state.songs).to.have.length(1)
  })
Severity: Major
Found in bemuse/src/custom-folder/index.spec.ts and 4 other locations - About 35 mins to fix
bemuse/src/custom-folder/index.spec.ts on lines 56..58
bemuse/src/custom-folder/index.spec.ts on lines 66..68
bemuse/src/custom-folder/index.spec.ts on lines 72..74
bemuse/src/custom-folder/index.spec.ts on lines 82..84

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

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

  get fileList() {
    return this._getLinks().then((links) => links.map((l) => l.name))
  }
Severity: Minor
Found in bemuse/src/resources/ipfs-resources.js and 1 other location - About 35 mins to fix
bemuse/src/resources/ipfs-resources.js on lines 135..137

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

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

  await tester.checkState(async (state) => {
    expect(state.songs).to.have.length(1)
  })
Severity: Major
Found in bemuse/src/custom-folder/index.spec.ts and 4 other locations - About 35 mins to fix
bemuse/src/custom-folder/index.spec.ts on lines 56..58
bemuse/src/custom-folder/index.spec.ts on lines 72..74
bemuse/src/custom-folder/index.spec.ts on lines 82..84
bemuse/src/custom-folder/index.spec.ts on lines 88..90

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

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

export const isScratchPosition = (str: string): str is ScratchPosition =>
  (SCRATCH_POSITION as readonly string[]).includes(str)
Severity: Minor
Found in bemuse/src/app/entities/Options.ts and 1 other location - About 35 mins to fix
bemuse/src/rules/mapping-mode.ts on lines 4..5

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

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

export interface ScoreBase {
  score: number
  combo: number
  count: ScoreCount
  total: number
Severity: Minor
Found in bemuse/src/online/index.ts and 1 other location - About 35 mins to fix
bemuse/src/online/scoreboard-system/createFakeScoreboardClient.ts on lines 189..195

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 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

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

export interface ScoreData {
  score: number
  combo: number
  count: ScoreCount
  total: number
bemuse/src/online/index.ts on lines 63..69

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

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

export const isMappingMode = (str: string): str is MappingMode =>
  (MAPPING_MODES as readonly string[]).includes(str)
Severity: Minor
Found in bemuse/src/rules/mapping-mode.ts and 1 other location - About 35 mins to fix
bemuse/src/app/entities/Options.ts on lines 113..114

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

Severity
Category
Status
Source
Language