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="rainbow-link"
                                    href={`https://github.com/nexxtway/react-rainbow/blob/master/src/components/${name}/readme.md`}
                                    target="_blank"
                                    rel="noopener noreferrer"
Severity: Major
Found in library/styleguideComponents/ReactComponent/index.js and 1 other location - About 1 hr to fix
library/styleguideComponents/ReactComponent/index.js on lines 127..138

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

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

export const StyledCircle = attachThemeAttrs(styled.button)`
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 6px;
Severity: Major
Found in src/components/ColorPicker/commons/saturation/styled.js and 1 other location - About 1 hr to fix
src/components/PhoneInput/countriesDropdown/styled/dropdown.js on lines 5..18

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

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

export const StyledTableHeadindCell = attachThemeAttrs(styled.td)`
    font-size: ${FONT_SIZE_TEXT_LARGE};
    text-align: ${props => props.align};
    border: 1px solid transparent;
    box-sizing: border-box;
Severity: Major
Found in src/components/MarkdownOutput/renderers/styled.js and 1 other location - About 1 hr to fix
src/components/MarkdownOutput/renderers/styled.js on lines 205..219

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

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

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

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

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

Refactorings

Further Reading

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

                            <g id="Group-26">
                                <path
                                    d="M20.9516828,0.0082334918 L1.07434649,0.0082334918 C0.4810545,0.0082334918 2.84217094e-13,0.513358782 2.84217094e-13,1.13660734 L2.84217094e-13,13.5468318 C2.84217094e-13,14.1700804 0.4810545,14.6752057 1.07434649,14.6752057 L20.9516828,14.6752057 C21.5452316,14.6752057 22.0262861,14.1700804 22.0262861,13.5468318 L22.0262861,1.13660734 C22.0262861,0.513358782 21.5452316,0.0082334918 20.9516828,0.0082334918"
                                    id="Fill-4"
                                    fill="#CED0D9"
library/styleguideComponents/ComponentsList/icons/customWorkIcon.js on lines 16..27

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

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

export const StyledInput = attachThemeAttrs(styled(HiddenElement))`
    &:focus + label {
        border: 1px solid ${props => props.palette.brand.main};
        box-shadow: ${props => props.shadows.brand};
    }
Severity: Major
Found in src/components/ColorPicker/commons/defaultColors/styled.js and 1 other location - About 1 hr to fix
src/components/InternalDropdown/styled/index.js on lines 9..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 63.

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

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

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

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

Refactorings

Further Reading

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

                            <g id="Group-215">
                                <path
                                    d="M12.0959274,5.94786169 C12.9666214,5.07716773 13.0802237,3.71428274 12.1716623,2.80572133 C10.3923641,1.02642309 9.37024321,1.21571744 7.36382606,1.21571744 C10.3923641,-0.109257223 12.5880756,-0.412111024 14.7837871,0.610009834 C15.7302159,1.02642309 16.1088046,1.40501178 16.8659391,2.16214629 L18.2287812,3.52498839 C18.5695025,3.86570964 18.7966214,4.31999034 18.8723563,4.77427104 C18.9859157,5.4935381 18.7966214,5.644965 19.2887695,6.17498059 C19.4401964,6.32640749 19.6673582,6.32640749 19.8187851,6.17498059 C19.970212,6.02355369 20.1973738,6.02355369 20.3488007,6.17498059 L21.6738183,7.5 C21.9766721,7.80285194 21.9766721,8.25713264 21.6738183,8.55998644 L18.9859586,11.2478461 C18.6831048,11.5506999 18.2288241,11.5506999 17.9259703,11.2478461 L16.6766877,9.96069599 C16.5252608,9.80926909 16.5252608,9.5821073 16.6766877,9.4306804 C16.8281146,9.2792535 16.8281146,9.01426714 16.6766877,8.86284024 C16.1466721,8.33282465 15.9952452,8.522119 15.2759781,8.44642699 C14.78383,8.37069209 14.3674167,8.14357319 14.0266955,7.80285194 L12.0959274,5.94786169"
                                    id="Path"
                                    fill="#7F7C79"
library/styleguideComponents/ComponentsList/icons/experiencesIcon.js on lines 17..28

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

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 1', () => {
        const date1 = new Date(2019, 3, 1);
        const date2 = new Date(2019, 2, 1, 23, 12, 34, 600);
        expect(compareDates(date1, date2)).toBe(1);
    });
src/components/Calendar/helpers/__test__/compareDates.spec.js on lines 9..13

Duplicated Code

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

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

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

Tuning

This issue has a mass of 63.

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

export const StyledTableCell = attachThemeAttrs(styled.td)`
    font-size: ${FONT_SIZE_TEXT_MEDIUM};
    text-align: ${props => props.align};
    border: 1px solid transparent;
    box-sizing: border-box;
Severity: Major
Found in src/components/MarkdownOutput/renderers/styled.js and 1 other location - About 1 hr to fix
src/components/MarkdownOutput/renderers/styled.js on lines 189..203

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

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

AccordionTimelineMarker.defaultProps = {
    label: null,
    description: null,
    datetime: null,
    icon: <CalendarIcon />,
Severity: Major
Found in src/components/TimelineMarker/accordionMarker.js and 1 other location - About 1 hr to fix
src/components/TimelineMarker/index.js on lines 48..58

Duplicated Code

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

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

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

Tuning

This issue has a mass of 63.

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

TimelineMarker.defaultProps = {
    label: null,
    description: null,
    datetime: null,
    icon: <CalendarIcon />,
Severity: Major
Found in src/components/TimelineMarker/index.js and 1 other location - About 1 hr to fix
src/components/TimelineMarker/accordionMarker.js on lines 129..139

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

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 0', () => {
        const date1 = new Date(2019, 2, 1);
        const date2 = new Date(2019, 2, 1, 23, 12, 34, 600);
        expect(compareDates(date1, date2)).toBe(0);
    });
src/components/Calendar/helpers/__test__/compareDates.spec.js on lines 14..18

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

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 StyledDropdown = attachThemeAttrs(styled(BorderRadiusElement))`
    position: relative;
    overflow: hidden;
    float: left;
    width: 100%;
src/components/ColorPicker/commons/saturation/styled.js on lines 23..40

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

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

                                <a
                                    className="rainbow-link react-rainbow-component_tab-edit-link"
                                    href={`https://github.com/nexxtway/react-rainbow/blob/master/src/components/${name}/index.js`}
                                    target="_blank"
                                    rel="noopener noreferrer"
Severity: Major
Found in library/styleguideComponents/ReactComponent/index.js and 1 other location - About 1 hr to fix
library/styleguideComponents/ReactComponent/index.js on lines 107..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 63.

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

export default function Week(props) {
    const { week, events, onEventClick, onScroll, locale } = props;

    function Days() {
        return Array.from(Array(7), (_value, index) => {
Severity: Minor
Found in src/components/WeeklyCalendar/week/index.js - About 1 hr to fix

    Function ErrorIcon has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function ErrorIcon() {
        return (
            <svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
                <g id="components" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
                    <g
    Severity: Minor
    Found in src/components/FileSelector/icons/error.js - About 1 hr to fix

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

      describe('<InputCheckbox/>', () => {
          it('should be focusable', () => {
              const component = mount(<InputCheckbox label="Input Label" />);
              expect(component).toBeFocusable();
          });
      src/components/AvatarMenu/__test__/avatarButton.focusable.spec.js on lines 5..10
      src/components/Button/__test__/button.focusable.spec.js on lines 5..10
      src/components/CheckboxToggle/__test__/checkboxToggle.focusable.spec.js on lines 5..10
      src/components/DatePicker/__test__/datePicker.focusable.spec.js on lines 5..10
      src/components/DateTimePicker/__test__/dateTimePicker.focusable.spec.js on lines 5..10
      src/components/Input/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/inputBase/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/inputRadio/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/pickerInput/__test__/input.focusable.spec.js on lines 5..10
      src/components/Lookup/__test__/lookup.focusable.spec.js on lines 5..10
      src/components/PrimitiveCheckbox/__test__/input.focusable.spec.js on lines 5..10
      src/components/Select/__test__/select.focusable.spec.js on lines 5..10
      src/components/Slider/__test__/slider.focusable.spec.js on lines 5..10
      src/components/Textarea/__test__/textarea.focusable.spec.js on lines 5..10
      src/components/TimePicker/__test__/timePicker.focusable.spec.js on lines 5..10

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 62.

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

      describe('<DateTimePicker/>', () => {
          it('should be focusable', () => {
              const component = mount(<DateTimePicker label="DateTimePicker Label" />);
              expect(component).toBeFocusable();
          });
      src/components/AvatarMenu/__test__/avatarButton.focusable.spec.js on lines 5..10
      src/components/Button/__test__/button.focusable.spec.js on lines 5..10
      src/components/CheckboxToggle/__test__/checkboxToggle.focusable.spec.js on lines 5..10
      src/components/DatePicker/__test__/datePicker.focusable.spec.js on lines 5..10
      src/components/Input/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/inputBase/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/inputCheckbox/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/inputRadio/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/pickerInput/__test__/input.focusable.spec.js on lines 5..10
      src/components/Lookup/__test__/lookup.focusable.spec.js on lines 5..10
      src/components/PrimitiveCheckbox/__test__/input.focusable.spec.js on lines 5..10
      src/components/Select/__test__/select.focusable.spec.js on lines 5..10
      src/components/Slider/__test__/slider.focusable.spec.js on lines 5..10
      src/components/Textarea/__test__/textarea.focusable.spec.js on lines 5..10
      src/components/TimePicker/__test__/timePicker.focusable.spec.js on lines 5..10

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 62.

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

      describe('<Button />', () => {
          it('should be focusable', () => {
              const component = mount(<Button label="button label" />);
              expect(component).toBeFocusable();
          });
      Severity: Major
      Found in src/components/Button/__test__/button.focusable.spec.js and 15 other locations - About 1 hr to fix
      src/components/AvatarMenu/__test__/avatarButton.focusable.spec.js on lines 5..10
      src/components/CheckboxToggle/__test__/checkboxToggle.focusable.spec.js on lines 5..10
      src/components/DatePicker/__test__/datePicker.focusable.spec.js on lines 5..10
      src/components/DateTimePicker/__test__/dateTimePicker.focusable.spec.js on lines 5..10
      src/components/Input/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/inputBase/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/inputCheckbox/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/inputRadio/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/pickerInput/__test__/input.focusable.spec.js on lines 5..10
      src/components/Lookup/__test__/lookup.focusable.spec.js on lines 5..10
      src/components/PrimitiveCheckbox/__test__/input.focusable.spec.js on lines 5..10
      src/components/Select/__test__/select.focusable.spec.js on lines 5..10
      src/components/Slider/__test__/slider.focusable.spec.js on lines 5..10
      src/components/Textarea/__test__/textarea.focusable.spec.js on lines 5..10
      src/components/TimePicker/__test__/timePicker.focusable.spec.js on lines 5..10

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 62.

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

      describe('<Slider/>', () => {
          it('should be focusable', () => {
              const component = mount(<Slider label="Slider Label" />);
              expect(component).toBeFocusable();
          });
      Severity: Major
      Found in src/components/Slider/__test__/slider.focusable.spec.js and 15 other locations - About 1 hr to fix
      src/components/AvatarMenu/__test__/avatarButton.focusable.spec.js on lines 5..10
      src/components/Button/__test__/button.focusable.spec.js on lines 5..10
      src/components/CheckboxToggle/__test__/checkboxToggle.focusable.spec.js on lines 5..10
      src/components/DatePicker/__test__/datePicker.focusable.spec.js on lines 5..10
      src/components/DateTimePicker/__test__/dateTimePicker.focusable.spec.js on lines 5..10
      src/components/Input/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/inputBase/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/inputCheckbox/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/inputRadio/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/pickerInput/__test__/input.focusable.spec.js on lines 5..10
      src/components/Lookup/__test__/lookup.focusable.spec.js on lines 5..10
      src/components/PrimitiveCheckbox/__test__/input.focusable.spec.js on lines 5..10
      src/components/Select/__test__/select.focusable.spec.js on lines 5..10
      src/components/Textarea/__test__/textarea.focusable.spec.js on lines 5..10
      src/components/TimePicker/__test__/timePicker.focusable.spec.js on lines 5..10

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 62.

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

      describe('<CheckboxToggle/>', () => {
          it('should be focusable', () => {
              const component = mount(<CheckboxToggle label="Toggle label" />);
              expect(component).toBeFocusable();
          });
      src/components/AvatarMenu/__test__/avatarButton.focusable.spec.js on lines 5..10
      src/components/Button/__test__/button.focusable.spec.js on lines 5..10
      src/components/DatePicker/__test__/datePicker.focusable.spec.js on lines 5..10
      src/components/DateTimePicker/__test__/dateTimePicker.focusable.spec.js on lines 5..10
      src/components/Input/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/inputBase/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/inputCheckbox/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/inputRadio/__test__/input.focusable.spec.js on lines 5..10
      src/components/Input/pickerInput/__test__/input.focusable.spec.js on lines 5..10
      src/components/Lookup/__test__/lookup.focusable.spec.js on lines 5..10
      src/components/PrimitiveCheckbox/__test__/input.focusable.spec.js on lines 5..10
      src/components/Select/__test__/select.focusable.spec.js on lines 5..10
      src/components/Slider/__test__/slider.focusable.spec.js on lines 5..10
      src/components/Textarea/__test__/textarea.focusable.spec.js on lines 5..10
      src/components/TimePicker/__test__/timePicker.focusable.spec.js on lines 5..10

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 62.

      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