nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

const Coin = props => {
    const { className, style } = props;
    return (
        <svg
            className={className}
Severity: Minor
Found in library/exampleComponents/Icons/coin.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

        if (
            (focusedNode && name === focusedNode) ||
            (isSelected && !focusedNode) ||
            (isFirstNode && !selectedNode && !focusedNode)
        ) {
    Severity: Major
    Found in src/components/Tree/helpers/getTabIndex.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

              if (type === 'hsv' && Array.isArray(values) && values.length === 3) {
                  return (
                      values.filter(
                          (value, index) =>
                              (index === 0 && value >= 0 && value <= 360) || (value >= 0 && value <= 100),
      Severity: Major
      Found in src/styles/helpers/color/isHsvColor.js - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

                if (
                    (currentHour && currentMinutes && ampm && !hour24) ||
                    (currentHour && currentMinutes && hour24)
                ) {
                    onChange(time);
        Severity: Major
        Found in src/components/TimePicker/timeSelect.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                  if (isNumber(value)) {
                      this.value = value;
                      if (Number(value) > 23 || this.isUpOrDownKeyPressed || this.hasPropValue) {
                          const newTypedValue = getSingleNewTypedValue(hour, value);
                          normalizedValue = normalizeHour(newTypedValue, hour24);
          Severity: Major
          Found in src/components/TimePicker/timeSelect.js - About 1 hr to fix

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

                    const component = mount(
                        <Table data={data} keyField="name">
                            <Column field="name" header="Name" isEditable />
                        </Table>,
                    );
            Severity: Major
            Found in src/components/Table/__test__/table.spec.js and 5 other locations - About 1 hr to fix
            src/components/Table/__test__/table.spec.js on lines 1488..1492
            src/components/Table/__test__/table.spec.js on lines 1497..1501
            src/components/Table/__test__/table.spec.js on lines 1508..1512
            src/components/Table/__test__/table.spec.js on lines 1534..1538
            src/components/Table/__test__/table.spec.js on lines 1570..1574

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

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

                    const component = mount(
                        <Table data={data} keyField="name">
                            <Column field="name" header="Name" isEditable />
                        </Table>,
                    );
            Severity: Major
            Found in src/components/Table/__test__/table.spec.js and 5 other locations - About 1 hr to fix
            src/components/Table/__test__/table.spec.js on lines 1488..1492
            src/components/Table/__test__/table.spec.js on lines 1497..1501
            src/components/Table/__test__/table.spec.js on lines 1508..1512
            src/components/Table/__test__/table.spec.js on lines 1521..1525
            src/components/Table/__test__/table.spec.js on lines 1570..1574

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

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

                    const component = mount(
                        <Table data={data} keyField="name">
                            <Column field="name" header="Name" isEditable />
                        </Table>,
                    );
            Severity: Major
            Found in src/components/Table/__test__/table.spec.js and 5 other locations - About 1 hr to fix
            src/components/Table/__test__/table.spec.js on lines 1497..1501
            src/components/Table/__test__/table.spec.js on lines 1508..1512
            src/components/Table/__test__/table.spec.js on lines 1521..1525
            src/components/Table/__test__/table.spec.js on lines 1534..1538
            src/components/Table/__test__/table.spec.js on lines 1570..1574

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

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

                    const component = mount(
                        <Table data={data} keyField="name">
                            <Column field="name" header="Name" isEditable />
                        </Table>,
                    );
            Severity: Major
            Found in src/components/Table/__test__/table.spec.js and 5 other locations - About 1 hr to fix
            src/components/Table/__test__/table.spec.js on lines 1488..1492
            src/components/Table/__test__/table.spec.js on lines 1508..1512
            src/components/Table/__test__/table.spec.js on lines 1521..1525
            src/components/Table/__test__/table.spec.js on lines 1534..1538
            src/components/Table/__test__/table.spec.js on lines 1570..1574

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

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

                    const component = mount(
                        <Table data={data} keyField="name">
                            <Column field="name" header="Name" isEditable />
                        </Table>,
                    );
            Severity: Major
            Found in src/components/Table/__test__/table.spec.js and 5 other locations - About 1 hr to fix
            src/components/Table/__test__/table.spec.js on lines 1488..1492
            src/components/Table/__test__/table.spec.js on lines 1497..1501
            src/components/Table/__test__/table.spec.js on lines 1521..1525
            src/components/Table/__test__/table.spec.js on lines 1534..1538
            src/components/Table/__test__/table.spec.js on lines 1570..1574

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

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

                    const component = mount(
                        <Table data={data} keyField="name">
                            <Column field="name" header="Name" isEditable />
                        </Table>,
                    );
            Severity: Major
            Found in src/components/Table/__test__/table.spec.js and 5 other locations - About 1 hr to fix
            src/components/Table/__test__/table.spec.js on lines 1488..1492
            src/components/Table/__test__/table.spec.js on lines 1497..1501
            src/components/Table/__test__/table.spec.js on lines 1508..1512
            src/components/Table/__test__/table.spec.js on lines 1521..1525
            src/components/Table/__test__/table.spec.js on lines 1534..1538

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

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

                            <RenderIf isTrue={error}>
                                <ErrorText alignSelf="center" id={this.getErrorMessageId()}>
                                    {error}
                                </ErrorText>
                            </RenderIf>
            Severity: Major
            Found in src/components/Rating/index.js and 2 other locations - About 1 hr to fix
            src/components/Input/inputBase/index.js on lines 203..207
            src/components/Input/pickerInput/index.js on lines 145..149

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

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

                            <RenderIf isTrue={error}>
                                <ErrorText alignSelf="center" id={this.getErrorMessageId()}>
                                    {error}
                                </ErrorText>
                            </RenderIf>
            Severity: Major
            Found in src/components/Input/inputBase/index.js and 2 other locations - About 1 hr to fix
            src/components/Input/pickerInput/index.js on lines 145..149
            src/components/Rating/index.js on lines 96..100

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

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

                            <RenderIf isTrue={error}>
                                <ErrorText alignSelf="center" id={this.getErrorMessageId()}>
                                    {error}
                                </ErrorText>
                            </RenderIf>
            Severity: Major
            Found in src/components/Input/pickerInput/index.js and 2 other locations - About 1 hr to fix
            src/components/Input/inputBase/index.js on lines 203..207
            src/components/Rating/index.js on lines 96..100

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

            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

                async isNextMonthButtonDisabled() {
                    const buttonEl = (await $(this.rootElement).$$('button[data-id=button-icon-element]'))[1];
                    return !(await buttonEl.isEnabled());
                }
            Severity: Major
            Found in src/components/Calendar/pageObject/doubleCalendar.js and 4 other locations - About 1 hr to fix
            src/components/Calendar/pageObject/doubleCalendar.js on lines 42..45
            src/components/Calendar/pageObject/singleCalendar.js on lines 146..149
            src/components/Calendar/pageObject/singleCalendar.js on lines 156..159
            src/components/MonthlyCalendar/pageObject/index.js on lines 84..87

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 55.

            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

                async isPrevMonthButtonDisabled() {
                    const buttonEl = (await $(this.rootElement).$$('button[data-id=button-icon-element]'))[0];
                    return !(await buttonEl.isEnabled());
                }
            Severity: Major
            Found in src/components/Calendar/pageObject/singleCalendar.js and 4 other locations - About 1 hr to fix
            src/components/Calendar/pageObject/doubleCalendar.js on lines 42..45
            src/components/Calendar/pageObject/doubleCalendar.js on lines 52..55
            src/components/Calendar/pageObject/singleCalendar.js on lines 156..159
            src/components/MonthlyCalendar/pageObject/index.js on lines 84..87

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 55.

            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

                async isPrevMonthButtonDisabled() {
                    const buttonEl = (await $(this.rootElement).$$('button[data-id=button-icon-element]'))[0];
                    return !(await buttonEl.isEnabled());
                }
            Severity: Major
            Found in src/components/MonthlyCalendar/pageObject/index.js and 4 other locations - About 1 hr to fix
            src/components/Calendar/pageObject/doubleCalendar.js on lines 42..45
            src/components/Calendar/pageObject/doubleCalendar.js on lines 52..55
            src/components/Calendar/pageObject/singleCalendar.js on lines 146..149
            src/components/Calendar/pageObject/singleCalendar.js on lines 156..159

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

            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

                async isPrevMonthButtonDisabled() {
                    const buttonEl = (await $(this.rootElement).$$('button[data-id=button-icon-element]'))[0];
                    return !(await buttonEl.isEnabled());
                }
            Severity: Major
            Found in src/components/Calendar/pageObject/doubleCalendar.js and 4 other locations - About 1 hr to fix
            src/components/Calendar/pageObject/doubleCalendar.js on lines 52..55
            src/components/Calendar/pageObject/singleCalendar.js on lines 146..149
            src/components/Calendar/pageObject/singleCalendar.js on lines 156..159
            src/components/MonthlyCalendar/pageObject/index.js on lines 84..87

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 55.

            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

                    expect(component.find(StyledSelect).prop('options')).toEqual([
                        { label: 'Select database field to assign', value: 'default', disabled: true },
                        { label: 'First_Name', value: 'First_Name' },
                        { label: 'Last_Name', value: 'Last_Name' },
                        { label: 'Email', value: 'Email' },
            src/components/ImportRecordsFlow/stepThree/__test__/assignFieldModal.spec.js on lines 19..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 55.

            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

                    const component = mount(
                        <AssignFieldModal
                            isAssignFieldModalOpen
                            attributes={attributes}
                            onRequestClose={onRequestCloseFn}
            src/components/ImportRecordsFlow/stepThree/__test__/assignFieldModal.spec.js on lines 163..172
            src/components/ImportRecordsFlow/stepThree/__test__/assignFieldModal.spec.js on lines 185..194
            src/components/ImportRecordsFlow/stepThree/__test__/assignFieldModal.spec.js on lines 208..217

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

            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