nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

    it('should focus am-pm selector when the right key is pressed while minutes input is focused and the time selector is open', async () => {
        const timePicker = new PageTimePicker(TIME_PICKER);
        await timePicker.clickTimeInput();
        await timePicker.waitUntilOpen();
        await browser.keys(ARROW_RIGHT_KEY);
Severity: Major
Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
integration/specs/TimePicker/timePicker-1.spec.js on lines 137..144

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

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 select am input by default when the hour input has a value less than 12 while am-pm selector is focused', async () => {
        const timePicker = new PageTimePicker(TIME_PICKER);
        await timePicker.clickTimeInput();
        await timePicker.waitUntilOpen();
        await timePicker.setHourValue('11');
Severity: Major
Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
integration/specs/TimePicker/timePicker-1.spec.js on lines 189..196

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

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 select pm input by default when the hour input has a value greater than 11 while am-pm selector is focused', async () => {
        const timePicker = new PageTimePicker(TIME_PICKER);
        await timePicker.clickTimeInput();
        await timePicker.waitUntilOpen();
        await timePicker.setHourValue('14');
Severity: Major
Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
integration/specs/TimePicker/timePicker-1.spec.js on lines 181..188

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

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 call onCloseModal when click the OK button', () => {
        const onCloseModalMockFn = jest.fn();
        const component = mount(<TimeSelect onCloseModal={onCloseModalMockFn} />);
        const okButton = component.find('Button').at(1);
        okButton.simulate('click');
Severity: Major
Found in src/components/TimePicker/__test__/timeSelect.spec.js and 1 other location - About 3 hrs to fix
src/components/TimePicker/__test__/timeSelect.spec.js on lines 508..514

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

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 focus the close button when the drawer is opened and press TAB', async () => {
        const drawer = new PageDrawer(DRAWER);
        const triggerButton = await $(BUTTON);
        await triggerButton.click();
        await drawer.waitUntilOpen();
Severity: Major
Found in integration/specs/Drawer/drawer-1.spec.js and 1 other location - About 3 hrs to fix
integration/specs/Drawer/drawer-1.spec.js on lines 24..31

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

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 call onCloseModal when click the cancel button', () => {
        const onCloseModalMockFn = jest.fn();
        const component = mount(<TimeSelect onCloseModal={onCloseModalMockFn} />);
        const cancelButton = component.find('Button').at(0);
        cancelButton.simulate('click');
Severity: Major
Found in src/components/TimePicker/__test__/timeSelect.spec.js and 1 other location - About 3 hrs to fix
src/components/TimePicker/__test__/timeSelect.spec.js on lines 515..521

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

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

File utils.spec.js has 300 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import {
    insertChildOrderly,
    getChildTabNodes,
    getTabIndexFromName,
    getChildrenTotalWidth,
Severity: Minor
Found in src/components/Tabset/__test__/utils.spec.js - About 3 hrs to fix

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

        it('should set the right props if the indicator is not selected', () => {
            const { getByRole } = render(
                <Indicator
                    selectedItem="indicator-2"
                    id="indicator-1"
    Severity: Major
    Found in src/components/CarouselCard/__tests__/indicator.spec.js and 2 other locations - About 3 hrs to fix
    src/components/CarouselCard/__tests__/indicator.spec.js on lines 6..19
    src/components/CarouselCard/__tests__/indicator.spec.js on lines 61..74

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should set the right accesivillity props', () => {
            const { getByRole } = render(
                <Indicator
                    selectedItem="indicator-1"
                    id="indicator-1"
    Severity: Major
    Found in src/components/CarouselCard/__tests__/indicator.spec.js and 2 other locations - About 3 hrs to fix
    src/components/CarouselCard/__tests__/indicator.spec.js on lines 6..19
    src/components/CarouselCard/__tests__/indicator.spec.js on lines 20..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 99.

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

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

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

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

    Refactorings

    Further Reading

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

        it('should set the right props if the indicator is selected', () => {
            const { getByRole } = render(
                <Indicator
                    selectedItem="indicator-1"
                    id="indicator-1"
    Severity: Major
    Found in src/components/CarouselCard/__tests__/indicator.spec.js and 2 other locations - About 3 hrs to fix
    src/components/CarouselCard/__tests__/indicator.spec.js on lines 20..33
    src/components/CarouselCard/__tests__/indicator.spec.js on lines 61..74

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

    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 set hour input value to "01" when hour input has "0" as value and press up button while hour input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setHourValue('0');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 523..530

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

    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 set hour input value to "12" when hour input has "0" as value and press down button while hour input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await timePicker.setHourValue('0');
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 227..234

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

    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 rowsWithSelection = rows.map((row, index) => {
            const currentSelectionLength = getCurrentSelectionLength(selectedRowsKeys);
            const maxSelectionReached = currentSelectionLength > maxRowSelection;
    
            if (index >= start && index <= end && !maxSelectionReached) {
    src/components/Table/helpers/selector/getUpdatedRowsWhenSelect.js on lines 30..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 99.

    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 set minutes input value to "00" when press up button while minutes input value is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 336..343

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

    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 call onCloseModal when when press enter key', () => {
            const onCloseModalMockFn = jest.fn();
            const component = mount(<TimeSelect onCloseModal={onCloseModalMockFn} />);
            const container = component.find('div[role="presentation"]');
            container.simulate('keyDown', { keyCode: ENTER_KEY });
    Severity: Major
    Found in src/components/TimePicker/__test__/timeSelect.spec.js and 1 other location - About 3 hrs to fix
    src/components/TimePicker/__test__/timeSelect.spec.js on lines 536..542

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

    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

        incrementHandler() {
            const { inputFocusedIndex } = this.state;
            this.isUpOrDownKeyPressed = true;
            if (inputFocusedIndex === 0) {
                this.incrementHour();
    Severity: Major
    Found in src/components/TimePicker/timeSelect.js and 1 other location - About 3 hrs to fix
    src/components/TimePicker/timeSelect.js on lines 281..293

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

    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

        decrementHandler() {
            const { inputFocusedIndex } = this.state;
            this.isUpOrDownKeyPressed = true;
            if (inputFocusedIndex === 0) {
                this.decrementHour();
    Severity: Major
    Found in src/components/TimePicker/timeSelect.js and 1 other location - About 3 hrs to fix
    src/components/TimePicker/timeSelect.js on lines 267..279

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

    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 not call onChange when press enter key while hour, minutes and ampm has not value', () => {
            const onChangeMockFn = jest.fn();
            const component = mount(<TimeSelect onChange={onChangeMockFn} />);
            const container = component.find('div[role="presentation"]');
            container.simulate('keyDown', { keyCode: ENTER_KEY });
    Severity: Major
    Found in src/components/TimePicker/__test__/timeSelect.spec.js and 1 other location - About 3 hrs to fix
    src/components/TimePicker/__test__/timeSelect.spec.js on lines 501..507

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

    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

            <svg
                className={className}
                style={style}
                width="32px"
                height="32px"
    Severity: Major
    Found in library/exampleComponents/Icons/homeFilled.js and 1 other location - About 3 hrs to fix
    src/components/Table/body/icons/cancel.js on lines 7..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 99.

    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 set minutes input value to "59" when press down button while minutes input is focused', async () => {
            const timePicker = new PageTimePicker(TIME_PICKER);
            await timePicker.clickTimeInput();
            await timePicker.waitUntilOpen();
            await browser.keys(ARROW_RIGHT_KEY);
    Severity: Major
    Found in integration/specs/TimePicker/timePicker-1.spec.js and 1 other location - About 3 hrs to fix
    integration/specs/TimePicker/timePicker-1.spec.js on lines 400..407

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

    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