nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

    it('should put the AvatarMenu button focused when the menu is opened and press ESC', async () => {
        const avatarMenu = new PageAvatarMenu(AVATAR_MENU);
        await avatarMenu.click();
        await browser.keys('Escape');
        await expect(await avatarMenu.hasFocusButton()).toBe(true);
Severity: Major
Found in integration/specs/AvatarMenu/avatarMenu-1.spec.js and 7 other locations - About 2 hrs to fix
integration/specs/AvatarMenu/avatarMenu-1.spec.js on lines 28..33
integration/specs/AvatarMenu/avatarMenu-1.spec.js on lines 87..92
integration/specs/AvatarMenu/avatarMenu-1.spec.js on lines 100..105
integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 28..33
integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 41..46
integration/specs/ButtonMenu/buttonMenu-5.spec.js on lines 85..90
integration/specs/InternalDropdown/internalDropdown-3.spec.js on lines 28..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 75.

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

    it('should return an empty array when the are not tabbable nodes but one has a tabindex of -1', () => {
        const dom = new JSDOM(`
            <div>
                <span tabindex="-1"></span>
            </div>
Severity: Major
Found in src/libs/manageTab/__test__/findTabbableElements.spec.js and 4 other locations - About 2 hrs to fix
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 7..25
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 26..38
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 39..47
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 57..72

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

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

    it('should return the 5 tabbable elements', () => {
        const dom = new JSDOM(`
            <div>
                <h1>Modal Header</h1>
                <p>
Severity: Major
Found in src/libs/manageTab/__test__/findTabbableElements.spec.js and 4 other locations - About 2 hrs to fix
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 26..38
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 39..47
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 48..56
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 57..72

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

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

    it('should return an empty array when the are not tabbable elements', () => {
        const dom = new JSDOM(`
            <div>
                <h1>Modal Header</h1>
                <p>
Severity: Major
Found in src/libs/manageTab/__test__/findTabbableElements.spec.js and 4 other locations - About 2 hrs to fix
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 7..25
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 39..47
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 48..56
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 57..72

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

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

    it('should return only 1 tabbable element when there are two but one is disabled', () => {
        const dom = new JSDOM(`
            <div>
                <h1>Modal Header</h1>
                <p>
Severity: Major
Found in src/libs/manageTab/__test__/findTabbableElements.spec.js and 4 other locations - About 2 hrs to fix
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 7..25
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 26..38
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 39..47
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 48..56

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

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

    it('should return one element when there is not tabbable nodes but one has a tabindex of 0', () => {
        const dom = new JSDOM(`
            <div>
                <span tabindex="0"></span>
            </div>
Severity: Major
Found in src/libs/manageTab/__test__/findTabbableElements.spec.js and 4 other locations - About 2 hrs to fix
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 7..25
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 26..38
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 48..56
src/libs/manageTab/__test__/findTabbableElements.spec.js on lines 57..72

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

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(
            <ButtonGroupPicker value={value} onChange={onChangeFn} multiple>
                <ButtonOption label="Option 1" name="option1" />
                <ButtonOption label="Option 2" name="option2" />
            </ButtonGroupPicker>,
src/components/ButtonGroupPicker/__test__/buttonGroupPicker.spec.js on lines 113..118

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

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(
            <ButtonGroupPicker value={value} onChange={onChangeFn} multiple>
                <ButtonOption label="Option 1" name="option1" />
                <ButtonOption label="Option 2" name="option2" />
            </ButtonGroupPicker>,
src/components/ButtonGroupPicker/__test__/buttonGroupPicker.spec.js on lines 82..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 75.

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 if no required fields are set, matchField is set to an attribute and the field is not mapped in fieldsMap param', () => {
        const isButtonDisabled = isStepThreeNextButtonDisabled({
            fieldsMap: {},
            attributes: {
                name: {},
src/components/ImportRecordsFlow/helpers/__test__/isStepThreeNextButtonDisabled.spec.js on lines 4..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 75.

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

    async getLeftMonthSelectedDay() {
        const day = await $(this.rootElement)
            .$$('table[role=grid]')[0]
            .$('button[data-selected=true]');
        if (await day.isExisting()) return day.getText();
Severity: Major
Found in src/components/Calendar/pageObject/doubleCalendar.js and 1 other location - About 2 hrs to fix
src/components/Calendar/pageObject/doubleCalendar.js on lines 247..253

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

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 EditableCell when pass isEditable to function that returns true', () => {
        const component = mount(<Cell value="cell-1" isEditable={() => true} />);
        expect(component.find(EditableCell).exists()).toBe(true);
    });
Severity: Major
Found in src/components/Table/body/__test__/cell.spec.js and 1 other location - About 2 hrs to fix
src/components/Table/body/__test__/cell.spec.js on lines 90..93

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

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

    async getRightMonthSelectedDay() {
        const day = await $(this.rootElement)
            .$$('table[role=grid]')[1]
            .$('button[data-selected=true]');
        if (await day.isExisting()) return day.getText();
Severity: Major
Found in src/components/Calendar/pageObject/doubleCalendar.js and 1 other location - About 2 hrs to fix
src/components/Calendar/pageObject/doubleCalendar.js on lines 128..134

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

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 open the DatePicker when readOnly is passed and enter key is pressed while the input element is focused', async () => {
        const datePicker = new PageDatePicker(DATEPICKER);
        await datePicker.click();
        await browser.keys(ENTER_KEY);
        await expect(await datePicker.isOpen()).toBe(false);
Severity: Major
Found in integration/specs/DatePicker/datepicker-13.spec.js and 1 other location - About 2 hrs to fix
integration/specs/DatePicker/datepicker-13.spec.js on lines 26..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 75.

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

    options: PropTypes.arrayOf(
        PropTypes.shape({
            label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
            value: PropTypes.string,
            disabled: PropTypes.bool,
Severity: Major
Found in src/components/RadioGroup/index.js and 1 other location - About 2 hrs to fix
src/components/CheckboxGroup/index.js on lines 96..103

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

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

    options: PropTypes.arrayOf(
        PropTypes.shape({
            label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
            value: PropTypes.string,
            disabled: PropTypes.bool,
Severity: Major
Found in src/components/CheckboxGroup/index.js and 1 other location - About 2 hrs to fix
src/components/RadioGroup/index.js on lines 93..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 75.

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 open the DatePicker when readOnly is passed and space key is pressed while the input element is focused', async () => {
        const datePicker = new PageDatePicker(DATEPICKER);
        await datePicker.click();
        await browser.keys(SPACE_KEY);
        await expect(await datePicker.isOpen()).toBe(false);
Severity: Major
Found in integration/specs/DatePicker/datepicker-13.spec.js and 1 other location - About 2 hrs to fix
integration/specs/DatePicker/datepicker-13.spec.js on lines 20..25

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

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 if the fields sent are not mapped in fieldsMap param', () => {
        const isButtonDisabled = isStepThreeNextButtonDisabled({
            fieldsMap: {},
            attributes: {
                name: {},
src/components/ImportRecordsFlow/helpers/__test__/isStepThreeNextButtonDisabled.spec.js on lines 28..39

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

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 render EditableCell when pass isEditable to function that returns false', () => {
        const component = mount(<Cell value="cell-1" isEditable={() => false} />);
        expect(component.find(EditableCell).exists()).toBe(false);
    });
Severity: Major
Found in src/components/Table/body/__test__/cell.spec.js and 1 other location - About 2 hrs to fix
src/components/Table/body/__test__/cell.spec.js on lines 86..89

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

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 ButtonMenuExample has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function ButtonMenuExample() {
    return (
        <div>
            <ButtonMenu
                className="rainbow-m-horizontal_medium"
Severity: Minor
Found in examples/create-react-app/src/pages/ButtonMenu/index.js - About 1 hr to fix

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

        render() {
            const {
                style,
                className,
                onChange,
    Severity: Minor
    Found in src/components/Rating/index.js - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language