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

                    <a
                        className="react-rainbow-design-detail_img-icon"
                        href={previewUrl}
                        target="_blank"
                        rel="noopener noreferrer"
Severity: Minor
Found in library/pages/components/DesignDetails/innerImg.js and 1 other location - About 55 mins to fix
library/pages/components/DesignDetails/innerImg.js on lines 36..43

Duplicated Code

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

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

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

Tuning

This issue has a mass of 54.

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

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

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

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

Refactorings

Further Reading

Function getCountryFromValue has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export default function getCountryFromValue(isoCode, countries) {
    if (Array.isArray(countries) && countries.length > 0) {
        if (isoCode) {
            const country = findCountryByIsoCode(isoCode, countries);
            if (country) {
Severity: Minor
Found in src/components/PhoneInput/helpers/getCountryFromValue.js - About 55 mins to fix

Cognitive Complexity

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

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

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

Further reading

Function getRowsWithInitalSelectedRows has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export default function getRowsWithInitalSelectedRows(params = {}) {
    const { rows = [], selectedRows, maxRowSelection, indexes, selectedRowsKeys = {} } = params;

    if (Array.isArray(selectedRows) && maxRowSelection > 0) {
        const previousSelectionLength = getCurrentSelectionLength(selectedRowsKeys);
Severity: Minor
Found in src/components/Table/helpers/selector/getRowsWithInitalSelectedRows.js - About 55 mins to fix

Cognitive Complexity

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

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

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

Further reading

Function useHeaderArrowNav has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export default function useHeaderArrowNav({
    disableNextMonth,
    disablePreviousMonth,
    refs,
    firstIndex,
Severity: Minor
Found in src/components/Calendar/hooks/useHeaderArrowNav.js - About 55 mins to fix

Cognitive Complexity

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

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

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

Further reading

Function ActionsCell has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export default function ActionsCell(props) {
    const { columnChildren, rowsLength, rowIndex, rowData } = props;

    if (columnChildren) {
        const getMenuAlignment = () => {
Severity: Minor
Found in src/components/Table/body/actionsCell.js - About 55 mins to fix

Cognitive Complexity

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

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

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

Further reading

Function normalizeHour has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export default function normalizeHour(value, hour24 = false) {
    if (isNumber(value)) {
        const number = Number(value);
        if (value === '000' && !hour24) {
            return '12';
Severity: Minor
Found in src/components/TimePicker/helpers/normalizeHour.js - About 55 mins to fix

Cognitive Complexity

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

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

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

Further reading

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

    const {
        icon,
        name,
        isLoading,
        label,
Severity: Major
Found in src/components/TimelineMarker/accordionMarker.js and 8 other locations - About 55 mins to fix
src/components/ImportRecordsFlow/stepThree/assignFieldModal.js on lines 13..23
src/components/ImportRecordsFlow/stepTwo/index.js on lines 18..28
src/components/AccordionSection/index.js on lines 26..36
src/components/Calendar/calendarHeader.js on lines 13..23
src/components/Card/index.js on lines 15..15
src/components/ImportRecordsFlow/index.js on lines 32..42
src/components/VerticalNavigation/index.js on lines 12..22
src/components/WeeklyCalendar/index.js on lines 20..30

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

    const {
        style,
        disabled,
        children,
        label,
Severity: Major
Found in src/components/AccordionSection/index.js and 8 other locations - About 55 mins to fix
src/components/ImportRecordsFlow/stepThree/assignFieldModal.js on lines 13..23
src/components/ImportRecordsFlow/stepTwo/index.js on lines 18..28
src/components/Calendar/calendarHeader.js on lines 13..23
src/components/Card/index.js on lines 15..15
src/components/ImportRecordsFlow/index.js on lines 32..42
src/components/TimelineMarker/accordionMarker.js on lines 20..30
src/components/VerticalNavigation/index.js on lines 12..22
src/components/WeeklyCalendar/index.js on lines 20..30

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

    const {
        isAssignFieldModalOpen,
        onRequestClose,
        columns,
        databaseFieldToAssign,
Severity: Major
Found in src/components/ImportRecordsFlow/stepThree/assignFieldModal.js and 8 other locations - About 55 mins to fix
src/components/ImportRecordsFlow/stepTwo/index.js on lines 18..28
src/components/AccordionSection/index.js on lines 26..36
src/components/Calendar/calendarHeader.js on lines 13..23
src/components/Card/index.js on lines 15..15
src/components/ImportRecordsFlow/index.js on lines 32..42
src/components/TimelineMarker/accordionMarker.js on lines 20..30
src/components/VerticalNavigation/index.js on lines 12..22
src/components/WeeklyCalendar/index.js on lines 20..30

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

    const {
        monthLabelId,
        currentYear,
        yearsRange,
        formattedMonth,
Severity: Major
Found in src/components/Calendar/calendarHeader.js and 8 other locations - About 55 mins to fix
src/components/ImportRecordsFlow/stepThree/assignFieldModal.js on lines 13..23
src/components/ImportRecordsFlow/stepTwo/index.js on lines 18..28
src/components/AccordionSection/index.js on lines 26..36
src/components/Card/index.js on lines 15..15
src/components/ImportRecordsFlow/index.js on lines 32..42
src/components/TimelineMarker/accordionMarker.js on lines 20..30
src/components/VerticalNavigation/index.js on lines 12..22
src/components/WeeklyCalendar/index.js on lines 20..30

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

    const { id, className, style, actions, children, footer, title, icon, isLoading } = props;
Severity: Major
Found in src/components/Card/index.js and 8 other locations - About 55 mins to fix
src/components/ImportRecordsFlow/stepThree/assignFieldModal.js on lines 13..23
src/components/ImportRecordsFlow/stepTwo/index.js on lines 18..28
src/components/AccordionSection/index.js on lines 26..36
src/components/Calendar/calendarHeader.js on lines 13..23
src/components/ImportRecordsFlow/index.js on lines 32..42
src/components/TimelineMarker/accordionMarker.js on lines 20..30
src/components/VerticalNavigation/index.js on lines 12..22
src/components/WeeklyCalendar/index.js on lines 20..30

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

    const {
        id,
        ariaLabel,
        style,
        selectedItem,
Severity: Major
Found in src/components/VerticalNavigation/index.js and 8 other locations - About 55 mins to fix
src/components/ImportRecordsFlow/stepThree/assignFieldModal.js on lines 13..23
src/components/ImportRecordsFlow/stepTwo/index.js on lines 18..28
src/components/AccordionSection/index.js on lines 26..36
src/components/Calendar/calendarHeader.js on lines 13..23
src/components/Card/index.js on lines 15..15
src/components/ImportRecordsFlow/index.js on lines 32..42
src/components/TimelineMarker/accordionMarker.js on lines 20..30
src/components/WeeklyCalendar/index.js on lines 20..30

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

    const {
        onProcessFile,
        isLoading,
        hasFileSelected,
        columns,
Severity: Major
Found in src/components/ImportRecordsFlow/stepTwo/index.js and 8 other locations - About 55 mins to fix
src/components/ImportRecordsFlow/stepThree/assignFieldModal.js on lines 13..23
src/components/AccordionSection/index.js on lines 26..36
src/components/Calendar/calendarHeader.js on lines 13..23
src/components/Card/index.js on lines 15..15
src/components/ImportRecordsFlow/index.js on lines 32..42
src/components/TimelineMarker/accordionMarker.js on lines 20..30
src/components/VerticalNavigation/index.js on lines 12..22
src/components/WeeklyCalendar/index.js on lines 20..30

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

    const {
        className,
        style,
        isOpen,
        onRequestClose,
Severity: Major
Found in src/components/ImportRecordsFlow/index.js and 8 other locations - About 55 mins to fix
src/components/ImportRecordsFlow/stepThree/assignFieldModal.js on lines 13..23
src/components/ImportRecordsFlow/stepTwo/index.js on lines 18..28
src/components/AccordionSection/index.js on lines 26..36
src/components/Calendar/calendarHeader.js on lines 13..23
src/components/Card/index.js on lines 15..15
src/components/TimelineMarker/accordionMarker.js on lines 20..30
src/components/VerticalNavigation/index.js on lines 12..22
src/components/WeeklyCalendar/index.js on lines 20..30

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

    const {
        events,
        currentWeek,
        minDate,
        maxDate,
Severity: Major
Found in src/components/WeeklyCalendar/index.js and 8 other locations - About 55 mins to fix
src/components/ImportRecordsFlow/stepThree/assignFieldModal.js on lines 13..23
src/components/ImportRecordsFlow/stepTwo/index.js on lines 18..28
src/components/AccordionSection/index.js on lines 26..36
src/components/Calendar/calendarHeader.js on lines 13..23
src/components/Card/index.js on lines 15..15
src/components/ImportRecordsFlow/index.js on lines 32..42
src/components/TimelineMarker/accordionMarker.js on lines 20..30
src/components/VerticalNavigation/index.js on lines 12..22

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

        const wrapper = mount(
            <Dataset
                title="Dataset 1"
                values={[1, 2, 3]}
                backgroundColor="#ccc"
Severity: Minor
Found in src/components/Dataset/__test__/dataset.spec.js and 1 other location - About 55 mins to fix
src/components/Dataset/__test__/dataset.spec.js on lines 55..64

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

        const component = mount(
            <ActivityTimeline variant="accordion">
                <AccordionTimelineMarker>
                    <Card title="TimelineMarker--children" />
                </AccordionTimelineMarker>
src/components/TimelineMarker/__test__/accordionTimelineMarker.spec.js on lines 16..22

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

        const wrapper = mount(
            <Dataset
                title="Dataset 1"
                values={[1, 2, 3]}
                backgroundColor="#ccc"
Severity: Minor
Found in src/components/Dataset/__test__/dataset.spec.js and 1 other location - About 55 mins to fix
src/components/Dataset/__test__/dataset.spec.js on lines 40..49

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

        const component = mount(
            <ActivityTimeline variant="accordion">
                <AccordionTimelineMarker>
                    <Card title="TimelineMarker--children" />
                </AccordionTimelineMarker>
src/components/TimelineMarker/__test__/accordionTimelineMarker.spec.js on lines 26..32

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

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

    async isHexFocused() {
        const inputEl = await this.getHexInput();
        return (await inputEl.isExisting()) && (await inputEl.isFocused());
    }
Severity: Major
Found in src/components/ColorPicker/pageObject/index.js and 2 other locations - About 55 mins to fix
src/components/ColorPicker/pageObject/index.js on lines 119..122
src/components/ColorPicker/pageObject/index.js on lines 129..132

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language