nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

    it('should set "right" to labelAlignment prop passed in the Label component', () => {
        const component = mount(<Slider label="Slider Label" labelAlignment="right" />);
        expect(component.find(StyledLabel).prop('labelAlignment')).toBe('right');
    });
Severity: Major
Found in src/components/Slider/__test__/slider.spec.js and 9 other locations - About 1 hr to fix
src/components/CheckboxGroup/__test__/checkboxGroup.spec.js on lines 60..65
src/components/CheckboxGroup/__test__/checkboxGroup.spec.js on lines 67..72
src/components/RadioButtonGroup/__test__/radioButtonGroup.spec.js on lines 64..69
src/components/RadioButtonGroup/__test__/radioButtonGroup.spec.js on lines 70..75
src/components/RadioGroup/__test__/radioGroup.spec.js on lines 44..47
src/components/RadioGroup/__test__/radioGroup.spec.js on lines 49..52
src/components/Rating/__test__/rating.spec.js on lines 24..27
src/components/Rating/__test__/rating.spec.js on lines 28..31
src/components/Slider/__test__/slider.spec.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 71.

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

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

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

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

Refactorings

Further Reading

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

        const component = mount(
            <Table
                data={tableData}
                showCheckboxColumn
                selectedRows={['1234qwerty']}
Severity: Major
Found in src/components/Table/__test__/table.spec.js and 1 other location - About 1 hr to fix
src/components/Table/__test__/table.spec.js on lines 769..779

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

        const component = mount(
            <Table
                data={tableData}
                showCheckboxColumn
                selectedRows={['1234qwerty']}
Severity: Major
Found in src/components/Table/__test__/table.spec.js and 1 other location - About 1 hr to fix
src/components/Table/__test__/table.spec.js on lines 636..646

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    it('should return true', () => {
        const array = ['09/07/2022', new Date('09/08/2022')];
        expect(isInArray(new Date('09/07/2022'), array)).toBe(true);
        expect(isInArray('09/08/2022', array)).toBe(true);
    });
Severity: Major
Found in src/components/Calendar/helpers/__test__/isInArray.spec.js and 1 other location - About 1 hr to fix
src/components/Calendar/helpers/__test__/isInArray.spec.js on lines 9..13

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    it('should return required attribute as false when the required attribute param is not set', () => {
        const assignFields = getAssignFieldsData({
            fieldsMap: {},
            attributes: {
                name: {},
src/components/ImportRecordsFlow/helpers/__test__/getAssignFieldsData.spec.js on lines 49..58

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

        const component = mount(
            <ProgressIndicator currentStepName="step-1" variant="numeric">
                <ProgressStep name="step-1" />
                <ProgressStep name="step-2" />
                <ProgressStep name="step-3" />
Severity: Major
Found in src/components/ProgressStep/__test__/progressStep.spec.js and 1 other location - About 1 hr to fix
src/components/ProgressStep/__test__/progressStep.spec.js on lines 53..59

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

                                        <g id="phone" transform="translate(5.000000, 5.000000)">
                                            <path
                                                d="M8.07180144,11.9084727 C6.40362144,11.5368327 4.58970144,10.5255927 3.02895144,8.9648427 C1.46799144,7.4038827 0.456751444,5.5899327 0.0851414439,3.9216927 C-0.245458556,2.4375327 0.406261444,0.907472703 1.70058144,0.109472703 C1.99071144,-0.0694172966 2.36574144,-0.0255272966 2.60676144,0.215492703 L4.39683144,2.0055627 C4.73262144,2.3413527 4.66698144,2.9026227 4.26273144,3.1518327 L3.53127144,3.6028227 C3.22428144,3.7920927 3.09930144,4.1759127 3.23709144,4.5091827 C3.53616144,5.2324527 4.07655144,6.2334627 5.04375144,7.1640027 C5.90889144,7.9963227 6.81060144,8.4789627 7.48737144,8.7581127 C7.81959144,8.8951527 8.20224144,8.7687327 8.39085144,8.4628227 L8.84199144,7.7310927 C9.09123144,7.3268427 9.65247144,7.2612027 9.98826144,7.5969927 L11.7780614,9.3867927 C12.0190814,9.6278127 12.0629414,10.0028427 11.8840814,10.2929727 C11.0860214,11.5873227 9.55596144,12.2391027 8.07180144,11.9084727 Z"
                                                id="Path"
                                                fill="#9398A5"
Severity: Major
Found in library/exampleComponents/Icons/phoneSolid.js and 1 other location - About 1 hr to fix
library/exampleComponents/Icons/expandArrow.js on lines 53..65

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

                    <g id="Group-134" transform="translate(6.250000, 6.250000)" fillRule="nonzero">
                        <polygon id="Path" fill="#A4A7B5" points="0 0 7.5 0 7.5 7.5 0 7.5" />
                        <path
                            d="M5.32774396,2.09404831 L1.43885507,2.09404831 C1.17038332,2.09404831 0.952743961,2.31168767 0.952743961,2.58015942 C0.952743961,2.84863117 1.17038332,3.06627053 1.43885507,3.06627053 L5.32774396,3.06627053 C5.59621571,3.06627053 5.81385507,2.84863117 5.81385507,2.58015942 C5.81385507,2.31168767 5.59621571,2.09404831 5.32774396,2.09404831 Z"
                            id="Path"
Severity: Major
Found in library/exampleComponents/Icons/expandArrow.js and 1 other location - About 1 hr to fix
library/exampleComponents/Icons/phoneSolid.js on lines 28..44

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    it('should render the 7 days of the week', () => {
        const wrapper = mount(<Week week={week} />);
        expect(wrapper.find('Days').children().length).toBe(7);
    });
Severity: Major
Found in src/components/WeeklyCalendar/week/__test__/week.spec.js and 1 other location - About 1 hr to fix
src/components/WeeklyCalendar/week/__test__/week.spec.js on lines 12..15

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    it('should render as disabled when disabled returns true', () => {
        const component = mount(<DynamicMenuItem disabled={() => true} />);
        expect(component.find('MenuItem').prop('disabled')).toBe(true);
    });
src/components/DynamicMenuItem/__test__/dynamicMenuItem.spec.js on lines 26..29

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    it('should render as enabled when disabled returns false', () => {
        const component = mount(<DynamicMenuItem disabled={() => false} />);
        expect(component.find('MenuItem').prop('disabled')).toBe(false);
    });
src/components/DynamicMenuItem/__test__/dynamicMenuItem.spec.js on lines 21..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 71.

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

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

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

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

Refactorings

Further Reading

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

                    <g id="Group-31" transform="translate(124.000000, 458.000000)">
                        <g id="messages" transform="translate(32.000000, 279.000000)">
                            <path
                                d="M5.87378516,0.00566761364 C2.70058594,0.0730397727 0.103382812,2.6209517 0.00309375,5.76703125 C-0.04675,7.3300142 0.510984375,8.76315341 1.45960547,9.85193182 C1.88684375,10.3422443 2.00878906,11.0254688 1.78900391,11.635696 L1.39394922,12.7326989 C1.26547266,13.0895028 1.68214062,13.3944886 1.98807812,13.167571 L3.38924609,12.1283097 C3.80617187,11.8190625 4.33558984,11.7040483 4.84640234,11.8038494 C5.3783125,11.9077841 5.93527344,11.9421307 6.50808984,11.8951705 C9.52178906,11.6478409 11.8985195,9.17607955 12.0068008,6.17893466 C12.1309375,2.74619318 9.32430469,-0.0675852273 5.87378516,0.00566761364 Z"
                                id="Shape"
Severity: Major
Found in library/exampleComponents/Icons/messages.js and 1 other location - About 1 hr to fix
library/exampleComponents/Icons/infoFilled.js on lines 16..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 71.

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

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

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

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

Refactorings

Further Reading

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

    it('should have back button disabled when isBackButtonDisabled is set to true', () => {
        const component = mount(<Footer isBackButtonDisabled />);
        const prevButton = component.find(StyledBackButton);
        expect(prevButton.prop('disabled')).toBe(true);
    });
Severity: Major
Found in src/components/ImportRecordsFlow/__test__/footer.spec.js and 1 other location - About 1 hr to fix
src/components/ImportRecordsFlow/__test__/footer.spec.js on lines 13..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 71.

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

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

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

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

Refactorings

Further Reading

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

    it('should return false', () => {
        const array = ['09/07/2022', new Date('09/08/2022')];
        expect(isInArray(new Date('10/07/2022'), array)).toBe(false);
        expect(isInArray('09/08/2022', undefined)).toBe(false);
    });
Severity: Major
Found in src/components/Calendar/helpers/__test__/isInArray.spec.js and 1 other location - About 1 hr to fix
src/components/Calendar/helpers/__test__/isInArray.spec.js on lines 4..8

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

    it('should have next button disabled when isNextButtonDisabled is set to true', () => {
        const component = mount(<Footer isNextButtonDisabled />);
        const nextButton = component.find(StyledNextButton);
        expect(nextButton.prop('disabled')).toBe(true);
    });
Severity: Major
Found in src/components/ImportRecordsFlow/__test__/footer.spec.js and 1 other location - About 1 hr to fix
src/components/ImportRecordsFlow/__test__/footer.spec.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 71.

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

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

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

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

Refactorings

Further Reading

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

    it('should return required attribute as true when matchField value matches an attribute', () => {
        const assignFields = getAssignFieldsData({
            fieldsMap: {},
            attributes: {
                street: {},
src/components/ImportRecordsFlow/helpers/__test__/getAssignFieldsData.spec.js on lines 39..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 71.

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

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

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

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

Refactorings

Further Reading

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

    it('should render the 24 hours of the day', () => {
        const wrapper = mount(<Week week={week} />);
        expect(wrapper.find('GridLines').children().length).toBe(24);
    });
Severity: Major
Found in src/components/WeeklyCalendar/week/__test__/week.spec.js and 1 other location - About 1 hr to fix
src/components/WeeklyCalendar/week/__test__/week.spec.js on lines 7..10

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

                <g
                    id="component-page-(interactive-example)"
                    transform="translate(-226.000000, -351.000000)"
                    fillRule="nonzero"
                >
Severity: Major
Found in library/exampleComponents/Icons/infoFilled.js and 1 other location - About 1 hr to fix
library/exampleComponents/Icons/messages.js on lines 22..35

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

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

        const component = mount(
            <ProgressIndicator currentStepName="step-3" variant="numeric">
                <ProgressStep name="step-1" />
                <ProgressStep name="step-2" />
                <ProgressStep name="step-3" />
Severity: Major
Found in src/components/ProgressStep/__test__/progressStep.spec.js and 1 other location - About 1 hr to fix
src/components/ProgressStep/__test__/progressStep.spec.js on lines 23..29

Duplicated Code

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

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

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

Tuning

This issue has a mass of 71.

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

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

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

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

Refactorings

Further Reading

Function render has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    render() {
        const {
            itemRef,
            label,
            ariaDescribedby,
Severity: Minor
Found in src/components/RadioButtonGroup/radioButtonItem.js - About 1 hr to fix
    Severity
    Category
    Status
    Source
    Language