michaltakac/mathworldvr

View on GitHub

Showing 120 of 120 total issues

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

        <CalcButton text="y" position={{ x: 0.37, y: -0.18, z: 0.03 }} id="calc-y" value="y" actionToTrigger={writeText} />
Severity: Major
Found in src/components/Calculator/index.js and 9 other locations - About 55 mins to fix
src/components/Calculator/index.js on lines 67..67
src/components/Calculator/index.js on lines 68..68
src/components/Calculator/index.js on lines 69..69
src/components/Calculator/index.js on lines 70..70
src/components/Calculator/index.js on lines 73..73
src/components/Calculator/index.js on lines 74..74
src/components/Calculator/index.js on lines 81..81
src/components/Calculator/index.js on lines 83..83
src/components/Calculator/index.js on lines 87..87

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 8 locations. Consider refactoring.
Open

        <CalcButton text="log" position={{ x: -0.28, y: 0, z: 0.03 }} id="calc-log" value="log(" actionToTrigger={writeText} />
Severity: Major
Found in src/components/Calculator/index.js and 7 other locations - About 55 mins to fix
src/components/Calculator/index.js on lines 53..53
src/components/Calculator/index.js on lines 54..54
src/components/Calculator/index.js on lines 55..55
src/components/Calculator/index.js on lines 56..56
src/components/Calculator/index.js on lines 58..58
src/components/Calculator/index.js on lines 75..75
src/components/Calculator/index.js on lines 78..78

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 8 locations. Consider refactoring.
Open

        <CalcButton text="4" position={{ x: -0.09, y: 0, z: 0.03 }} id="calc-4" value="4" actionToTrigger={writeText} />
Severity: Major
Found in src/components/Calculator/index.js and 7 other locations - About 55 mins to fix
src/components/Calculator/index.js on lines 53..53
src/components/Calculator/index.js on lines 54..54
src/components/Calculator/index.js on lines 55..55
src/components/Calculator/index.js on lines 56..56
src/components/Calculator/index.js on lines 57..57
src/components/Calculator/index.js on lines 58..58
src/components/Calculator/index.js on lines 78..78

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 10 locations. Consider refactoring.
Open

        <CalcButton text="pi" position={{ x: 0.19, y: -0.18, z: 0.03 }} id="calc-pi" value="pi" actionToTrigger={writeText} />
Severity: Major
Found in src/components/Calculator/index.js and 9 other locations - About 55 mins to fix
src/components/Calculator/index.js on lines 67..67
src/components/Calculator/index.js on lines 68..68
src/components/Calculator/index.js on lines 69..69
src/components/Calculator/index.js on lines 73..73
src/components/Calculator/index.js on lines 74..74
src/components/Calculator/index.js on lines 81..81
src/components/Calculator/index.js on lines 83..83
src/components/Calculator/index.js on lines 87..87
src/components/Calculator/index.js on lines 88..88

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 8 locations. Consider refactoring.
Open

        <CalcButton text="7" position={{ x: -0.09, y: 0.09, z: 0.03 }} id="calc-7" value="7" actionToTrigger={writeText} />
Severity: Major
Found in src/components/Calculator/index.js and 7 other locations - About 55 mins to fix
src/components/Calculator/index.js on lines 53..53
src/components/Calculator/index.js on lines 54..54
src/components/Calculator/index.js on lines 55..55
src/components/Calculator/index.js on lines 56..56
src/components/Calculator/index.js on lines 57..57
src/components/Calculator/index.js on lines 58..58
src/components/Calculator/index.js on lines 75..75

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

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

const initialState = {
  xMin: -1,
  yMin: -1,
  zMin: -4,
  xMax: 1,
Severity: Minor
Found in src/reducers/settings/index.js and 1 other location - About 55 mins to fix
src/reducers/settings/index.test.js on lines 3..12

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

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

const initialState = {
  xMin: -1,
  yMin: -1,
  zMin: -4,
  xMax: 1,
Severity: Minor
Found in src/reducers/settings/index.test.js and 1 other location - About 55 mins to fix
src/reducers/settings/index.js on lines 3..12

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 3 locations. Consider refactoring.
Open

      <SettingsController type="slider" name="xMax" step={0.01} min={-20} max={20} initialState={1} actionToTrigger={setXMax} />
Severity: Major
Found in src/components/SettingsPanel/index.js and 2 other locations - About 55 mins to fix
src/components/SettingsPanel/index.js on lines 50..50
src/components/SettingsPanel/index.js on lines 51..51

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 8 locations. Consider refactoring.
Open

        <CalcButton text="6" position={{ x: 0.09, y: 0, z: 0.03 }} id="calc-6" value="6" actionToTrigger={writeText} />
Severity: Major
Found in src/components/Calculator/index.js and 7 other locations - About 50 mins to fix
src/components/Calculator/index.js on lines 63..63
src/components/Calculator/index.js on lines 64..64
src/components/Calculator/index.js on lines 65..65
src/components/Calculator/index.js on lines 66..66
src/components/Calculator/index.js on lines 76..76
src/components/Calculator/index.js on lines 79..79
src/components/Calculator/index.js on lines 80..80

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

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 8 locations. Consider refactoring.
Open

        <CalcButton text="9" position={{ x: 0.09, y: 0.09, z: 0.03 }} id="calc-9" value="9" actionToTrigger={writeText} />
Severity: Major
Found in src/components/Calculator/index.js and 7 other locations - About 50 mins to fix
src/components/Calculator/index.js on lines 63..63
src/components/Calculator/index.js on lines 64..64
src/components/Calculator/index.js on lines 65..65
src/components/Calculator/index.js on lines 66..66
src/components/Calculator/index.js on lines 76..76
src/components/Calculator/index.js on lines 77..77
src/components/Calculator/index.js on lines 79..79

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

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 8 locations. Consider refactoring.
Open

        <CalcButton text="5" position={{ x: 0, y: 0, z: 0.03 }} id="calc-5" value="5" actionToTrigger={writeText} />
Severity: Major
Found in src/components/Calculator/index.js and 7 other locations - About 50 mins to fix
src/components/Calculator/index.js on lines 63..63
src/components/Calculator/index.js on lines 64..64
src/components/Calculator/index.js on lines 65..65
src/components/Calculator/index.js on lines 66..66
src/components/Calculator/index.js on lines 77..77
src/components/Calculator/index.js on lines 79..79
src/components/Calculator/index.js on lines 80..80

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

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 8 locations. Consider refactoring.
Open

        <CalcButton text="-" position={{ x: 0.28, y: 0, z: 0.03 }} id="calc-minus" value="-" actionToTrigger={writeText} />
Severity: Major
Found in src/components/Calculator/index.js and 7 other locations - About 50 mins to fix
src/components/Calculator/index.js on lines 63..63
src/components/Calculator/index.js on lines 64..64
src/components/Calculator/index.js on lines 65..65
src/components/Calculator/index.js on lines 76..76
src/components/Calculator/index.js on lines 77..77
src/components/Calculator/index.js on lines 79..79
src/components/Calculator/index.js on lines 80..80

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

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

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

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

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

Refactorings

Further Reading

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

  it('should create an action to toggle AttentionBox', () => {
    const expectedAction = {
      type: actions.UI_ATTENTIONBOX_TOGGLE,
    }
    expect(actions.uiAttentionboxToggle()).toEqual(expectedAction)
Severity: Major
Found in src/actions/index.test.js and 2 other locations - About 50 mins to fix
src/actions/index.test.js on lines 13..18
src/actions/index.test.js on lines 20..25

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

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 8 locations. Consider refactoring.
Open

        <CalcButton text="(" position={{ x: 0.19, y: 0.09, z: 0.03 }} id="calc-parent-left" value="(" actionToTrigger={writeText} />
Severity: Major
Found in src/components/Calculator/index.js and 7 other locations - About 50 mins to fix
src/components/Calculator/index.js on lines 64..64
src/components/Calculator/index.js on lines 65..65
src/components/Calculator/index.js on lines 66..66
src/components/Calculator/index.js on lines 76..76
src/components/Calculator/index.js on lines 77..77
src/components/Calculator/index.js on lines 79..79
src/components/Calculator/index.js on lines 80..80

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

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 8 locations. Consider refactoring.
Open

        <CalcButton text="+" position={{ x: 0.28, y: 0.09, z: 0.03 }} id="calc-plus" value="+" actionToTrigger={writeText} />
Severity: Major
Found in src/components/Calculator/index.js and 7 other locations - About 50 mins to fix
src/components/Calculator/index.js on lines 63..63
src/components/Calculator/index.js on lines 64..64
src/components/Calculator/index.js on lines 66..66
src/components/Calculator/index.js on lines 76..76
src/components/Calculator/index.js on lines 77..77
src/components/Calculator/index.js on lines 79..79
src/components/Calculator/index.js on lines 80..80

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

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 8 locations. Consider refactoring.
Open

        <CalcButton text=")" position={{ x: 0.19, y: 0, z: 0.03 }} id="calc-parent-right" value=")" actionToTrigger={writeText} />
Severity: Major
Found in src/components/Calculator/index.js and 7 other locations - About 50 mins to fix
src/components/Calculator/index.js on lines 63..63
src/components/Calculator/index.js on lines 65..65
src/components/Calculator/index.js on lines 66..66
src/components/Calculator/index.js on lines 76..76
src/components/Calculator/index.js on lines 77..77
src/components/Calculator/index.js on lines 79..79
src/components/Calculator/index.js on lines 80..80

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

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 8 locations. Consider refactoring.
Open

        <CalcButton text="8" position={{ x: 0, y: 0.09, z: 0.03 }} id="calc-8" value="8" actionToTrigger={writeText} />
Severity: Major
Found in src/components/Calculator/index.js and 7 other locations - About 50 mins to fix
src/components/Calculator/index.js on lines 63..63
src/components/Calculator/index.js on lines 64..64
src/components/Calculator/index.js on lines 65..65
src/components/Calculator/index.js on lines 66..66
src/components/Calculator/index.js on lines 76..76
src/components/Calculator/index.js on lines 77..77
src/components/Calculator/index.js on lines 80..80

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

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

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

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

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

Refactorings

Further Reading

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

  it('should create an action to clear text on Calculator', () => {
    const expectedAction = {
      type: actions.CALCULATOR_CLEAR_TEXT,
    }
    expect(actions.calculatorClearText()).toEqual(expectedAction)
Severity: Major
Found in src/actions/index.test.js and 2 other locations - About 50 mins to fix
src/actions/index.test.js on lines 13..18
src/actions/index.test.js on lines 117..122

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

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

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

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

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

Refactorings

Further Reading

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

  it('should create an action to use backspace button on Calculator', () => {
    const expectedAction = {
      type: actions.CALCULATOR_BACKSPACE,
    }
    expect(actions.calculatorBackspace()).toEqual(expectedAction)
Severity: Major
Found in src/actions/index.test.js and 2 other locations - About 50 mins to fix
src/actions/index.test.js on lines 20..25
src/actions/index.test.js on lines 117..122

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

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 ( dollyDelta.y > 0 ) {

            dollyIn( getZoomScale() );

        } else if ( dollyDelta.y < 0 ) {
Severity: Minor
Found in src/lib/components/orbit-controls.js and 1 other location - About 50 mins to fix
src/lib/components/orbit-controls.js on lines 607..615

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

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