michaltakac/mathworldvr

View on GitHub

Showing 108 of 120 total issues

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

describe('LeftController', () => {
  it('renders <a-entity>', () => {
    const tree = renderer.create(<LeftController />).toJSON()
    expect(tree.type).toBe('a-entity')
  })
Severity: Major
Found in src/components/LeftController/index.test.js and 9 other locations - About 1 hr to fix
src/components/AttentionBox/index.test.js on lines 7..12
src/components/Camera/index.test.js on lines 7..12
src/components/Lights/index.test.js on lines 7..12
src/components/ParametricFunction/index.test.js on lines 7..12
src/components/Plane/index.test.js on lines 7..12
src/components/RightController/index.test.js on lines 7..12
src/components/SettingsController/index.test.js on lines 7..12
src/components/Sky/index.test.js on lines 7..12
src/components/Text/index.test.js on lines 7..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 73.

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

describe('Sky', () => {
  it('renders <a-entity>', () => {
    const tree = renderer.create(<Sky />).toJSON()
    expect(tree.type).toBe('a-entity')
  })
Severity: Major
Found in src/components/Sky/index.test.js and 9 other locations - About 1 hr to fix
src/components/AttentionBox/index.test.js on lines 7..12
src/components/Camera/index.test.js on lines 7..12
src/components/LeftController/index.test.js on lines 7..12
src/components/Lights/index.test.js on lines 7..12
src/components/ParametricFunction/index.test.js on lines 7..12
src/components/Plane/index.test.js on lines 7..12
src/components/RightController/index.test.js on lines 7..12
src/components/SettingsController/index.test.js on lines 7..12
src/components/Text/index.test.js on lines 7..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 73.

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

describe('SettingsController', () => {
  it('renders <a-entity>', () => {
    const tree = renderer.create(<SettingsController />).toJSON()
    expect(tree.type).toBe('a-entity')
  })
Severity: Major
Found in src/components/SettingsController/index.test.js and 9 other locations - About 1 hr to fix
src/components/AttentionBox/index.test.js on lines 7..12
src/components/Camera/index.test.js on lines 7..12
src/components/LeftController/index.test.js on lines 7..12
src/components/Lights/index.test.js on lines 7..12
src/components/ParametricFunction/index.test.js on lines 7..12
src/components/Plane/index.test.js on lines 7..12
src/components/RightController/index.test.js on lines 7..12
src/components/Sky/index.test.js on lines 7..12
src/components/Text/index.test.js on lines 7..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 73.

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

describe('Plane', () => {
  it('renders <a-entity>', () => {
    const tree = renderer.create(<Plane />).toJSON()
    expect(tree.type).toBe('a-entity')
  })
Severity: Major
Found in src/components/Plane/index.test.js and 9 other locations - About 1 hr to fix
src/components/AttentionBox/index.test.js on lines 7..12
src/components/Camera/index.test.js on lines 7..12
src/components/LeftController/index.test.js on lines 7..12
src/components/Lights/index.test.js on lines 7..12
src/components/ParametricFunction/index.test.js on lines 7..12
src/components/RightController/index.test.js on lines 7..12
src/components/SettingsController/index.test.js on lines 7..12
src/components/Sky/index.test.js on lines 7..12
src/components/Text/index.test.js on lines 7..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 73.

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

describe('Lights', () => {
  it('renders <a-entity>', () => {
    const tree = renderer.create(<Lights />).toJSON()
    expect(tree.type).toBe('a-entity')
  })
Severity: Major
Found in src/components/Lights/index.test.js and 9 other locations - About 1 hr to fix
src/components/AttentionBox/index.test.js on lines 7..12
src/components/Camera/index.test.js on lines 7..12
src/components/LeftController/index.test.js on lines 7..12
src/components/ParametricFunction/index.test.js on lines 7..12
src/components/Plane/index.test.js on lines 7..12
src/components/RightController/index.test.js on lines 7..12
src/components/SettingsController/index.test.js on lines 7..12
src/components/Sky/index.test.js on lines 7..12
src/components/Text/index.test.js on lines 7..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 73.

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

describe('ParametricFunction', () => {
  it('renders <a-entity>', () => {
    const tree = renderer.create(<ParametricFunction />).toJSON()
    expect(tree.type).toBe('a-entity')
  })
Severity: Major
Found in src/components/ParametricFunction/index.test.js and 9 other locations - About 1 hr to fix
src/components/AttentionBox/index.test.js on lines 7..12
src/components/Camera/index.test.js on lines 7..12
src/components/LeftController/index.test.js on lines 7..12
src/components/Lights/index.test.js on lines 7..12
src/components/Plane/index.test.js on lines 7..12
src/components/RightController/index.test.js on lines 7..12
src/components/SettingsController/index.test.js on lines 7..12
src/components/Sky/index.test.js on lines 7..12
src/components/Text/index.test.js on lines 7..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 73.

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

describe('Text', () => {
  it('renders <a-entity>', () => {
    const tree = renderer.create(<Text />).toJSON()
    expect(tree.type).toBe('a-entity')
  })
Severity: Major
Found in src/components/Text/index.test.js and 9 other locations - About 1 hr to fix
src/components/AttentionBox/index.test.js on lines 7..12
src/components/Camera/index.test.js on lines 7..12
src/components/LeftController/index.test.js on lines 7..12
src/components/Lights/index.test.js on lines 7..12
src/components/ParametricFunction/index.test.js on lines 7..12
src/components/Plane/index.test.js on lines 7..12
src/components/RightController/index.test.js on lines 7..12
src/components/SettingsController/index.test.js on lines 7..12
src/components/Sky/index.test.js on lines 7..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 73.

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

describe('Camera', () => {
  it('renders <a-entity>', () => {
    const tree = renderer.create(<Camera />).toJSON()
    expect(tree.type).toBe('a-entity')
  })
Severity: Major
Found in src/components/Camera/index.test.js and 9 other locations - About 1 hr to fix
src/components/AttentionBox/index.test.js on lines 7..12
src/components/LeftController/index.test.js on lines 7..12
src/components/Lights/index.test.js on lines 7..12
src/components/ParametricFunction/index.test.js on lines 7..12
src/components/Plane/index.test.js on lines 7..12
src/components/RightController/index.test.js on lines 7..12
src/components/SettingsController/index.test.js on lines 7..12
src/components/Sky/index.test.js on lines 7..12
src/components/Text/index.test.js on lines 7..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 73.

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

describe('AttentionBox', () => {
  it('renders <div>', () => {
    const tree = renderer.create(<AttentionBox />).toJSON()
    expect(tree.type).toBe('div')
  })
Severity: Major
Found in src/components/AttentionBox/index.test.js and 9 other locations - About 1 hr to fix
src/components/Camera/index.test.js on lines 7..12
src/components/LeftController/index.test.js on lines 7..12
src/components/Lights/index.test.js on lines 7..12
src/components/ParametricFunction/index.test.js on lines 7..12
src/components/Plane/index.test.js on lines 7..12
src/components/RightController/index.test.js on lines 7..12
src/components/SettingsController/index.test.js on lines 7..12
src/components/Sky/index.test.js on lines 7..12
src/components/Text/index.test.js on lines 7..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 73.

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

    noKeys: {

        get: function () {

            console.warn( 'THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead.' );
Severity: Major
Found in src/lib/components/orbit-controls.js and 3 other locations - About 1 hr to fix
src/lib/components/orbit-controls.js on lines 924..940
src/lib/components/orbit-controls.js on lines 942..958
src/lib/components/orbit-controls.js on lines 978..994

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

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

    noRotate: {

        get: function () {

            console.warn( 'THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead.' );
Severity: Major
Found in src/lib/components/orbit-controls.js and 3 other locations - About 1 hr to fix
src/lib/components/orbit-controls.js on lines 942..958
src/lib/components/orbit-controls.js on lines 960..976
src/lib/components/orbit-controls.js on lines 978..994

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

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

    staticMoving : {

        get: function () {

            console.warn( 'THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead.' );
Severity: Major
Found in src/lib/components/orbit-controls.js and 3 other locations - About 1 hr to fix
src/lib/components/orbit-controls.js on lines 924..940
src/lib/components/orbit-controls.js on lines 942..958
src/lib/components/orbit-controls.js on lines 960..976

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

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

    noPan: {

        get: function () {

            console.warn( 'THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead.' );
Severity: Major
Found in src/lib/components/orbit-controls.js and 3 other locations - About 1 hr to fix
src/lib/components/orbit-controls.js on lines 924..940
src/lib/components/orbit-controls.js on lines 960..976
src/lib/components/orbit-controls.js on lines 978..994

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

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

  it('CALCULATOR_BACKSPACE', () => {
    const next = reducer(initialState, { type: 'CALCULATOR_BACKSPACE' })
    expect(next).toEqual({ ...initialState, displayText: 'x^2 + y^' })
    expect(next).toMatchSnapshot()
  })
Severity: Major
Found in src/reducers/calculator/index.test.js and 1 other location - About 1 hr to fix
src/reducers/calculator/index.test.js on lines 25..29

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

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

  it('CALCULATOR_CLEAR_TEXT', () => {
    const next = reducer(initialState, { type: 'CALCULATOR_CLEAR_TEXT' })
    expect(next).toEqual({ ...initialState, displayText: '' })
    expect(next).toMatchSnapshot()
  })
Severity: Major
Found in src/reducers/calculator/index.test.js and 1 other location - About 1 hr to fix
src/reducers/calculator/index.test.js on lines 19..23

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

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 set yMin parameter in settings', () => {
    const yMin = -999
    const expectedAction = {
      type: actions.SETTINGS_SET_Y_MIN,
      payload: yMin,
Severity: Major
Found in src/actions/index.test.js and 2 other locations - About 1 hr to fix
src/actions/index.test.js on lines 45..52
src/actions/index.test.js on lines 63..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 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 3 locations. Consider refactoring.
Open

  it('should create an action to set xMin parameter in settings', () => {
    const xMin = -999
    const expectedAction = {
      type: actions.SETTINGS_SET_X_MIN,
      payload: xMin,
Severity: Major
Found in src/actions/index.test.js and 2 other locations - About 1 hr to fix
src/actions/index.test.js on lines 54..61
src/actions/index.test.js on lines 63..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 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 3 locations. Consider refactoring.
Open

  it('should create an action to set zMin parameter in settings', () => {
    const zMin = -999
    const expectedAction = {
      type: actions.SETTINGS_SET_Z_MIN,
      payload: zMin,
Severity: Major
Found in src/actions/index.test.js and 2 other locations - About 1 hr to fix
src/actions/index.test.js on lines 45..52
src/actions/index.test.js on lines 54..61

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

  it('should create an action to set xMax parameter in settings', () => {
    const xMax = 999
    const expectedAction = {
      type: actions.SETTINGS_SET_X_MAX,
      payload: xMax,
Severity: Major
Found in src/actions/index.test.js and 3 other locations - About 1 hr to fix
src/actions/index.test.js on lines 81..88
src/actions/index.test.js on lines 90..97
src/actions/index.test.js on lines 99..106

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

  it('should create an action to set segments parameter in settings', () => {
    const segments = 15
    const expectedAction = {
      type: actions.SETTINGS_SET_SEGMENTS,
      payload: segments,
Severity: Major
Found in src/actions/index.test.js and 3 other locations - About 1 hr to fix
src/actions/index.test.js on lines 72..79
src/actions/index.test.js on lines 81..88
src/actions/index.test.js on lines 90..97

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

Severity
Category
Status
Source
Language