lifegadget/ui-list

View on GitHub

Showing 916 of 916 total issues

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

    aspects.map( aspect => {
      aspectPanes.push(aspect);
      panes.map( pane => {
        aspectPanes.push(aspect + capitalize(pane));
      });
Severity: Major
Found in addon/mixins/shared-item-mixin.js and 1 other location - About 1 hr to fix
addon/components/ui-list.js on lines 217..222

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

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

      aspects.map( aspect => {
        aspectPanes.push(aspect);
        panes.map( pane => {
          aspectPanes.push(aspect + capitalize(pane));
        });
Severity: Major
Found in addon/components/ui-list.js and 1 other location - About 1 hr to fix
addon/mixins/shared-item-mixin.js on lines 43..48

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

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

Function _value has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

  _value: computed('value', function() {
    const {precision,type,format,empty,_isEmpty} = this.getProperties('precision', 'type', 'format','empty','_isEmpty');
    let value = this.get('value');
    if(_isEmpty && empty) {
      return empty;
Severity: Minor
Found in addon/components/ui-cell-aspect.js - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

  _isZero: computed('value', function() {
    const {value,type} = this.getProperties('value', 'type');
    return type==='number' && value === 0 ? 'zero' : null;
  }),
Severity: Major
Found in addon/components/ui-cell-aspect.js and 1 other location - About 1 hr to fix
addon/components/ui-cell-aspect.js on lines 38..41

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

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

  _isNegative: computed('value', function() {
    const {value,type} = this.getProperties('value', 'type');
    return type==='number' && value < 0 ? 'negative' : null;
  }),
Severity: Major
Found in addon/components/ui-cell-aspect.js and 1 other location - About 1 hr to fix
addon/components/ui-cell-aspect.js on lines 42..45

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

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

Function _value has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  _value: computed('value', function() {
    const {precision,type,format,empty,_isEmpty} = this.getProperties('precision', 'type', 'format','empty','_isEmpty');
    let value = this.get('value');
    if(_isEmpty && empty) {
      return empty;
Severity: Minor
Found in addon/components/ui-cell-aspect.js - About 1 hr to fix

    Function onClick has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        onClick(options) {
          const {min,max,_selected,selectionProperty} = this.getProperties('min','max','_selected','selectionProperty');
          const item = options.item;
          const itemId = item.get(selectionProperty);
          const itemSelected = item.get('selected');
    Severity: Minor
    Found in addon/components/ui-selectable-list.js - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function commit has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        commit() {
          let items = this.get('sortedItems');
          let groupModel = this.get('_registry').map(item=>item.child);
          let itemModels = items.mapBy('data');
          let draggedItem = items.findBy('wasDropped', true);
    Severity: Minor
    Found in addon/mixins/sortable-list.js - About 1 hr to fix

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

        descendingSelected: computed('propertySelected', 'sortDirection', function() {
          const {propertySelected,sortDirection} = this.getProperties('propertySelected', 'sortDirection');
          return propertySelected && sortDirection === 'descending';
        }),
      Severity: Minor
      Found in addon/components/ui-sort-control.js and 1 other location - About 55 mins to fix
      addon/components/ui-sort-control.js on lines 25..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 54.

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

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

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

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

      Refactorings

      Further Reading

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

        ascendingSelected: computed('propertySelected', 'sortDirection', function() {
          const {propertySelected,sortDirection} = this.getProperties('propertySelected', 'sortDirection');
          return propertySelected && sortDirection === 'ascending';
        }),
      Severity: Minor
      Found in addon/components/ui-sort-control.js and 1 other location - About 55 mins to fix
      addon/components/ui-sort-control.js on lines 29..32

      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

        padStop: computed('ends', {
          set(_, value) {
            return value;
          },
          get() {
      Severity: Minor
      Found in addon/components/ui-list.js and 1 other location - About 55 mins to fix
      addon/components/ui-list.js on lines 97..105

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 53.

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

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

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

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

      Refactorings

      Further Reading

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

        padStart: computed('ends', {
          set(_, value) {
            return value;
          },
          get() {
      Severity: Minor
      Found in addon/components/ui-list.js and 1 other location - About 55 mins to fix
      addon/components/ui-list.js on lines 106..114

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 53.

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

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

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

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

      Refactorings

      Further Reading

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

          {
            name: 'ember-canary',
            bower: {
              dependencies: {
                'ember': 'components/ember#canary'
      Severity: Major
      Found in config/ember-try.js and 4 other locations - About 50 mins to fix
      config/ember-try.js on lines 4..19
      config/ember-try.js on lines 20..35
      config/ember-try.js on lines 36..51
      config/ember-try.js on lines 52..67

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

          {
            name: 'ember-lts-2.8',
            bower: {
              dependencies: {
                'ember': 'components/ember#lts-2-8'
      Severity: Major
      Found in config/ember-try.js and 4 other locations - About 50 mins to fix
      config/ember-try.js on lines 4..19
      config/ember-try.js on lines 36..51
      config/ember-try.js on lines 52..67
      config/ember-try.js on lines 68..83

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

          {
            name: 'ember-lts-2.4',
            bower: {
              dependencies: {
                'ember': 'components/ember#lts-2-4'
      Severity: Major
      Found in config/ember-try.js and 4 other locations - About 50 mins to fix
      config/ember-try.js on lines 20..35
      config/ember-try.js on lines 36..51
      config/ember-try.js on lines 52..67
      config/ember-try.js on lines 68..83

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

          {
            name: 'ember-release',
            bower: {
              dependencies: {
                'ember': 'components/ember#release'
      Severity: Major
      Found in config/ember-try.js and 4 other locations - About 50 mins to fix
      config/ember-try.js on lines 4..19
      config/ember-try.js on lines 20..35
      config/ember-try.js on lines 52..67
      config/ember-try.js on lines 68..83

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

          {
            name: 'ember-beta',
            bower: {
              dependencies: {
                'ember': 'components/ember#beta'
      Severity: Major
      Found in config/ember-try.js and 4 other locations - About 50 mins to fix
      config/ember-try.js on lines 4..19
      config/ember-try.js on lines 20..35
      config/ember-try.js on lines 36..51
      config/ember-try.js on lines 68..83

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

      const { computed, observer, $, A, run, on, typeOf, debug } = Ember;     
      Severity: Major
      Found in addon/mixins/shared-list-mixin.js and 9 other locations - About 40 mins to fix
      addon/components/ui-cell-aspect.js on lines 3..3
      addon/components/ui-column-pane.js on lines 3..3
      addon/components/ui-list.js on lines 3..3
      addon/components/ui-pagination-control.js on lines 3..3
      addon/components/ui-pane.js on lines 3..3
      addon/components/ui-row-item.js on lines 3..3
      addon/components/ui-sort-control.js on lines 3..3
      addon/components/ui-tabular-list.js on lines 3..3
      addon/mixins/node-messenger.js on lines 3..3

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

      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

      const { computed, observer, $, run, on, typeOf, debug, isPresent } = Ember;   
      Severity: Major
      Found in addon/components/ui-row-item.js and 9 other locations - About 40 mins to fix
      addon/components/ui-cell-aspect.js on lines 3..3
      addon/components/ui-column-pane.js on lines 3..3
      addon/components/ui-list.js on lines 3..3
      addon/components/ui-pagination-control.js on lines 3..3
      addon/components/ui-pane.js on lines 3..3
      addon/components/ui-sort-control.js on lines 3..3
      addon/components/ui-tabular-list.js on lines 3..3
      addon/mixins/node-messenger.js on lines 3..3
      addon/mixins/shared-list-mixin.js on lines 2..2

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

      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

      const { computed, observer, $, run, on, typeOf, debug, isPresent } = Ember;   
      Severity: Major
      Found in addon/components/ui-cell-aspect.js and 9 other locations - About 40 mins to fix
      addon/components/ui-column-pane.js on lines 3..3
      addon/components/ui-list.js on lines 3..3
      addon/components/ui-pagination-control.js on lines 3..3
      addon/components/ui-pane.js on lines 3..3
      addon/components/ui-row-item.js on lines 3..3
      addon/components/ui-sort-control.js on lines 3..3
      addon/components/ui-tabular-list.js on lines 3..3
      addon/mixins/node-messenger.js on lines 3..3
      addon/mixins/shared-list-mixin.js on lines 2..2

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

      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