codevise/pageflow

View on GitHub

Showing 630 of 1,055 total issues

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

  menuItemNames: function() {
    return this.$el.find('li').map(function() {
      return $(this).data('name');
    }).get();
  },
Severity: Major
Found in package/src/testHelpers/dominos/editor/DropDownButton.js and 10 other locations - About 1 hr to fix
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 14..18
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 20..24
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 26..30
package/src/testHelpers/dominos/ui/Table.js on lines 8..12
package/src/testHelpers/dominos/ui/Tabs.js on lines 8..12
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 6..10
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 12..16
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 10..14
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 16..20

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

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

  inputPropertyNames: function() {
    return this.$el.find('.input').map(function() {
      return $(this).data('inputPropertyName');
    }).get();
  },
package/src/testHelpers/dominos/editor/DropDownButton.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 14..18
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 20..24
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 26..30
package/src/testHelpers/dominos/ui/Table.js on lines 8..12
package/src/testHelpers/dominos/ui/Tabs.js on lines 8..12
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 6..10
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 12..16
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 10..14
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 16..20

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

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

  tabNames: function() {
    return this.$el.find('[data-tab-name]').map(function() {
      return $(this).data('tabName');
    }).get();
  },
Severity: Major
Found in package/src/testHelpers/dominos/ui/Tabs.js and 10 other locations - About 1 hr to fix
package/src/testHelpers/dominos/editor/DropDownButton.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 14..18
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 20..24
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 26..30
package/src/testHelpers/dominos/ui/Table.js on lines 8..12
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 6..10
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 12..16
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 10..14
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 16..20

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

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

  visibleInputPropertyNames: function() {
    return this.$el.find('.input:not(.hidden_via_binding)').map(function() {
      return $(this).data('inputPropertyName');
    }).get();
  },
package/src/testHelpers/dominos/editor/DropDownButton.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 20..24
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 26..30
package/src/testHelpers/dominos/ui/Table.js on lines 8..12
package/src/testHelpers/dominos/ui/Tabs.js on lines 8..12
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 6..10
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 12..16
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 10..14
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 16..20

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

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

  columnNames: function() {
    return this.$el.find('th').map(function() {
      return $(this).data('columnName');
    }).get();
  }
Severity: Major
Found in package/src/testHelpers/dominos/ui/Table.js and 10 other locations - About 1 hr to fix
package/src/testHelpers/dominos/editor/DropDownButton.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 14..18
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 20..24
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 26..30
package/src/testHelpers/dominos/ui/Tabs.js on lines 8..12
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 6..10
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 12..16
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 10..14
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 16..20

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

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

  values: function() {
    return this.$el.find('input').map(function() {
      return $(this).attr('value');
    }).get();
  },
package/src/testHelpers/dominos/editor/DropDownButton.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 14..18
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 20..24
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 26..30
package/src/testHelpers/dominos/ui/Table.js on lines 8..12
package/src/testHelpers/dominos/ui/Tabs.js on lines 8..12
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 12..16
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 10..14
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 16..20

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

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

  enabledValues: function() {
    return this.$el.find('option:not([disabled])').map(function() {
      return $(this).attr('value');
    }).get();
  }
Severity: Major
Found in package/src/testHelpers/dominos/ui/inputs/SelectInput.js and 10 other locations - About 1 hr to fix
package/src/testHelpers/dominos/editor/DropDownButton.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 14..18
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 20..24
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 26..30
package/src/testHelpers/dominos/ui/Table.js on lines 8..12
package/src/testHelpers/dominos/ui/Tabs.js on lines 8..12
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 6..10
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 12..16
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 10..14

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

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

  inlineHelpTexts: function() {
    return this.$el.find('.input').map(function() {
      return $(this).data('inlineHelpText');
    }).get();
  }
package/src/testHelpers/dominos/editor/DropDownButton.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 14..18
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 20..24
package/src/testHelpers/dominos/ui/Table.js on lines 8..12
package/src/testHelpers/dominos/ui/Tabs.js on lines 8..12
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 6..10
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 12..16
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 10..14
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 16..20

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

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

  inputLabels: function() {
    return this.$el.find('.input').map(function() {
      return $(this).data('labelText');
    }).get();
  },
package/src/testHelpers/dominos/editor/DropDownButton.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 14..18
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 26..30
package/src/testHelpers/dominos/ui/Table.js on lines 8..12
package/src/testHelpers/dominos/ui/Tabs.js on lines 8..12
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 6..10
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 12..16
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 10..14
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 16..20

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

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

  enabledValues: function() {
    return this.$el.find('input:not([disabled])').map(function() {
      return $(this).attr('value');
    }).get();
  }
package/src/testHelpers/dominos/editor/DropDownButton.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 8..12
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 14..18
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 20..24
package/src/testHelpers/dominos/ui/ConfigurationEditorTab.js on lines 26..30
package/src/testHelpers/dominos/ui/Table.js on lines 8..12
package/src/testHelpers/dominos/ui/Tabs.js on lines 8..12
package/src/testHelpers/dominos/ui/inputs/RadioButtonGroupInput.js on lines 6..10
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 10..14
package/src/testHelpers/dominos/ui/inputs/SelectInput.js on lines 16..20

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

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

    this.handleDrag = (mouseEvent, dragEvent) => {
      if (this.props.onScrub) {
        this.props.onScrub(this.positionToTime(dragEvent.x));
      }
    };
entry_types/paged/packages/pageflow-paged-react/src/components/PlayerControls/ProgressSlider.jsx on lines 24..28

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

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

    this.handleStop = (mouseEvent, dragEvent) => {
      if (this.props.onSeek) {
        this.props.onSeek(this.positionToTime(dragEvent.x));
      }
    };
entry_types/paged/packages/pageflow-paged-react/src/components/PlayerControls/ProgressSlider.jsx on lines 30..34

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

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

      backgroundPosition: this.model.getFilePosition(this.options.propertyName, 'x') + '% ' +
        this.model.getFilePosition(this.options.propertyName, 'y') + '%'
package/src/editor/views/embedded/BackgroundImageEmbeddedView.js on lines 51..52

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

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

  tabLabels: function() {
    return this.$el.find('[data-tab-name]').map(function() {
      return $(this).text();
    }).get();
  }
Severity: Major
Found in package/src/testHelpers/dominos/ui/Tabs.js and 2 other locations - About 1 hr to fix
package/src/testHelpers/dominos/editor/DropDownButton.js on lines 14..18
package/src/testHelpers/dominos/editor/FileMetaDataTable.js on lines 8..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 59.

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

  menuItemLabels: function() {
    return this.$el.find('li a').map(function() {
      return $(this).text();
    }).get();
  },
Severity: Major
Found in package/src/testHelpers/dominos/editor/DropDownButton.js and 2 other locations - About 1 hr to fix
package/src/testHelpers/dominos/editor/FileMetaDataTable.js on lines 8..12
package/src/testHelpers/dominos/ui/Tabs.js on lines 14..18

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

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

  values: function() {
    return this.$el.find('.value').map(function() {
      return $(this).text();
    }).get();
  }
package/src/testHelpers/dominos/editor/DropDownButton.js on lines 14..18
package/src/testHelpers/dominos/ui/Tabs.js on lines 14..18

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

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 urls = variants.reduce((result, variant) => {
    const url = getFileUrl(collectionName,
                           file,
                           variant,
                           urlTemplates);
Severity: Major
Found in entry_types/scrolled/package/src/entryState/extendFile.js and 1 other location - About 1 hr to fix
entry_types/paged/packages/pageflow-paged-react/src/files/expandUrls.js on lines 13..24

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

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 urls = variants.reduce((result, variant) => {
    const url = getFileUrl(collectionName,
                           file,
                           variant,
                           urlTemplates);
entry_types/scrolled/package/src/entryState/extendFile.js on lines 41..52

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

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

      backgroundPosition: this.model.getFilePosition(this.options.propertyName, 'x') + '% ' +
        this.model.getFilePosition(this.options.propertyName, 'y') + '%'
package/src/editor/views/BackgroundPositioningPreviewView.js on lines 32..33

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

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('keeps state on other action', () => {
    const state = {slug: 'my-entry'};
    const result = reducer(state, {type: 'other'});

    expect(result).toBe(state);
entry_types/paged/packages/pageflow-paged-react/src/i18n/__spec__/reducer-spec.js on lines 12..17

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

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