nexxtway/react-rainbow

View on GitHub

Showing 2,739 of 2,739 total issues

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

const StyledPercentValue = attachThemeAttrs(styled.h1)`
    font-size: 2rem;
    font-weight: 400;
    color: ${props => props.palette.brand.main};
    margin: 0;
Severity: Major
Found in src/components/ProgressCircular/styled/percentValue.js and 2 other locations - About 6 hrs to fix
src/components/ProgressCircular/styled/ringFill.js on lines 4..22
src/components/StrongPasswordInput/styled/index.js on lines 70..91

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

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

const StyledRingFill = attachThemeAttrs(styled.circle)`
    stroke: ${props => props.palette.brand.main};
    transition: all 0.4s ease-out 0s;
    ${props =>
        props.variant === 'success' &&
Severity: Major
Found in src/components/ProgressCircular/styled/ringFill.js and 2 other locations - About 6 hrs to fix
src/components/ProgressCircular/styled/percentValue.js on lines 4..25
src/components/StrongPasswordInput/styled/index.js on lines 70..91

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

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

describe('<Badge/>', () => {
    it('should be accessible when label is passed', async () => {
        expect.assertions(1);
        const html = ReactDOMServer.renderToString(<Badge label="badge text" />);
        const results = await axe(html);
Severity: Major
Found in src/components/Badge/__tests__/badge.a11y.spec.js and 1 other location - About 6 hrs to fix
src/components/Button/__test__/button.a11y.spec.js on lines 6..19

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

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

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

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

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

Refactorings

Further Reading

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

    it('should set hour value to "01" when press up key after reset hour input', () => {
        const component = mount(<TimeSelect />);
        const hourInput = component.find('input').at(0);
        const container = component.find('div[role="presentation"]');
        hourInput.simulate('change', { target: { value: '7' } });
Severity: Major
Found in src/components/TimePicker/__test__/timeSelect.spec.js and 1 other location - About 6 hrs to fix
src/components/TimePicker/__test__/timeSelect.spec.js on lines 438..451

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

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

describe('<Button/>', () => {
    it('should be accessible when label is passed', async () => {
        expect.assertions(1);
        const html = ReactDOMServer.renderToString(<Button label="button text" />);
        const results = await axe(html);
Severity: Major
Found in src/components/Button/__test__/button.a11y.spec.js and 1 other location - About 6 hrs to fix
src/components/Badge/__tests__/badge.a11y.spec.js on lines 6..19

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

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 reset minutes input when has a value and press delete key while it is focused', () => {
        const component = mount(<TimeSelect />);
        const minutesInput = component.find('input').at(1);
        const container = component.find('div[role="presentation"]');
        minutesInput.simulate('change', { target: { value: '20' } });
Severity: Major
Found in src/components/TimePicker/__test__/timeSelect.spec.js and 1 other location - About 6 hrs to fix
src/components/TimePicker/__test__/timeSelect.spec.js on lines 452..465

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

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 change left month year when right month year changed', () => {
        const value = new Date('12/24/2019');
        const component = mount(<DoubleCalendar value={value} />);
        component
            .find('select')
src/components/Calendar/doubleCalendar/__test__/doubleCalendar.spec.js on lines 110..131

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

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 change right month year when left month year changed', () => {
        const value = new Date('12/24/2019');
        const component = mount(<DoubleCalendar value={value} />);
        component
            .find('select')
src/components/Calendar/doubleCalendar/__test__/doubleCalendar.spec.js on lines 132..153

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

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

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

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

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

Refactorings

Further Reading

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

    it('should call getPageItems with the right data for second time when data change dynamically and activePage is equal to pages amount', () => {
        getPageItems.mockReset();
        const component = mount(
            <TableWithBrowserPagination data={data} pageSize={1} keyField="name" />,
        );
src/components/TableWithBrowserPagination/__test__/tableWithBrowserPagination.spec.js on lines 160..174
src/components/TableWithBrowserPagination/__test__/tableWithBrowserPagination.spec.js on lines 190..204

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

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

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

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

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

Refactorings

Further Reading

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

    it('should call getPageItems with the right data for second time when data change dynamically and activePage is greater than pages amount', () => {
        getPageItems.mockReset();
        const component = mount(
            <TableWithBrowserPagination data={data} pageSize={1} keyField="name" />,
        );
src/components/TableWithBrowserPagination/__test__/tableWithBrowserPagination.spec.js on lines 160..174
src/components/TableWithBrowserPagination/__test__/tableWithBrowserPagination.spec.js on lines 175..189

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

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

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

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

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

Refactorings

Further Reading

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

    it('should call getPageItems with the right data for second time when data change dynamically and activePage is less than pages amount', () => {
        getPageItems.mockReset();
        const component = mount(
            <TableWithBrowserPagination data={data} pageSize={1} keyField="name" />,
        );
src/components/TableWithBrowserPagination/__test__/tableWithBrowserPagination.spec.js on lines 175..189
src/components/TableWithBrowserPagination/__test__/tableWithBrowserPagination.spec.js on lines 190..204

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

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 expand all accordion section when the first and second accordion section are expanded and click on the third button icon', async () => {
        const accordion = new PageAccordion(ACCORDION);
        const firstAccordionSection = await accordion.getItem(0);
        const secondAccordionSection = await accordion.getItem(1);
        const thirdAccordionSection = await accordion.getItem(2);
Severity: Major
Found in integration/specs/Accordion/accordion-5.spec.js and 1 other location - About 6 hrs to fix
integration/specs/ButtonGroupPicker/buttonGroupPicker-3.spec.js on lines 31..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 165.

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 allow several options checked at the same time', async () => {
        const groupPicker = new PageButtonGroupPicker(BUTTON_GROUP_PICKER);
        const option1 = await groupPicker.getItem(0);
        const option2 = await groupPicker.getItem(1);
        const option3 = await groupPicker.getItem(2);
integration/specs/Accordion/accordion-5.spec.js on lines 21..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 165.

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

describe('<Side Navigation in AdminExample/>', () => {
    it('should render the SideNavigation', () => {
        const component = shallow(<SideNavigation />);
        expect(component.find(VerticalItem).exists()).toBe(true);
        expect(component.find(VerticalNavigation).exists()).toBe(true);
examples/create-react-app/src/pages/Admin/__test__/accountPage.spec.js on lines 9..17

Duplicated Code

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

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

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

Tuning

This issue has a mass of 163.

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

describe('<Account Page in AdminExample/>', () => {
    it('should render the AccountPage', () => {
        const component = mount(<AccountPage />);
        expect(component.find(Card).exists()).toBe(true);
        expect(component.find(Badge).exists()).toBe(true);
examples/create-react-app/src/pages/Admin/__test__/sideNavigation.spec.js on lines 9..17

Duplicated Code

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

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

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

Tuning

This issue has a mass of 163.

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

function SvgGhana({ className, style }) {
    return (
        <svg width={32} height={32} viewBox="0 0 32 32" className={className} style={style}>
            <g fillRule="nonzero" fill="none">
                <path
Severity: Major
Found in src/components/PhoneInput/flags/Ghana.js and 15 other locations - About 6 hrs to fix
src/components/PhoneInput/flags/Argentina.js on lines 4..27
src/components/PhoneInput/flags/Cameroon.js on lines 4..27
src/components/PhoneInput/flags/Canada.js on lines 4..27
src/components/PhoneInput/flags/Djibouti.js on lines 4..27
src/components/PhoneInput/flags/Eritrea.js on lines 4..27
src/components/PhoneInput/flags/Kuwait.js on lines 4..27
src/components/PhoneInput/flags/Lesotho.js on lines 4..27
src/components/PhoneInput/flags/Malawi.js on lines 4..27
src/components/PhoneInput/flags/MarshallIsland.js on lines 4..27
src/components/PhoneInput/flags/Mauritius.js on lines 4..27
src/components/PhoneInput/flags/Myanmar.js on lines 4..27
src/components/PhoneInput/flags/Rwanda.js on lines 4..27
src/components/PhoneInput/flags/Sudan.js on lines 4..27
src/components/PhoneInput/flags/UnitedKingdom.js on lines 4..27
src/components/PhoneInput/flags/VaticanCity.js on lines 4..24

Duplicated Code

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

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

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

Tuning

This issue has a mass of 162.

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

function SvgVaticanCity({ className, style }) {
    return (
        <svg width={32} height={32} viewBox="0 0 32 32" className={className} style={style}>
            <g fillRule="nonzero" fill="none">
                <path
Severity: Major
Found in src/components/PhoneInput/flags/VaticanCity.js and 15 other locations - About 6 hrs to fix
src/components/PhoneInput/flags/Argentina.js on lines 4..27
src/components/PhoneInput/flags/Cameroon.js on lines 4..27
src/components/PhoneInput/flags/Canada.js on lines 4..27
src/components/PhoneInput/flags/Djibouti.js on lines 4..27
src/components/PhoneInput/flags/Eritrea.js on lines 4..27
src/components/PhoneInput/flags/Ghana.js on lines 4..27
src/components/PhoneInput/flags/Kuwait.js on lines 4..27
src/components/PhoneInput/flags/Lesotho.js on lines 4..27
src/components/PhoneInput/flags/Malawi.js on lines 4..27
src/components/PhoneInput/flags/MarshallIsland.js on lines 4..27
src/components/PhoneInput/flags/Mauritius.js on lines 4..27
src/components/PhoneInput/flags/Myanmar.js on lines 4..27
src/components/PhoneInput/flags/Rwanda.js on lines 4..27
src/components/PhoneInput/flags/Sudan.js on lines 4..27
src/components/PhoneInput/flags/UnitedKingdom.js on lines 4..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 162.

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

function SvgKuwait({ className, style }) {
    return (
        <svg width={32} height={32} viewBox="0 0 32 32" className={className} style={style}>
            <g fillRule="nonzero" fill="none">
                <path
Severity: Major
Found in src/components/PhoneInput/flags/Kuwait.js and 15 other locations - About 6 hrs to fix
src/components/PhoneInput/flags/Argentina.js on lines 4..27
src/components/PhoneInput/flags/Cameroon.js on lines 4..27
src/components/PhoneInput/flags/Canada.js on lines 4..27
src/components/PhoneInput/flags/Djibouti.js on lines 4..27
src/components/PhoneInput/flags/Eritrea.js on lines 4..27
src/components/PhoneInput/flags/Ghana.js on lines 4..27
src/components/PhoneInput/flags/Lesotho.js on lines 4..27
src/components/PhoneInput/flags/Malawi.js on lines 4..27
src/components/PhoneInput/flags/MarshallIsland.js on lines 4..27
src/components/PhoneInput/flags/Mauritius.js on lines 4..27
src/components/PhoneInput/flags/Myanmar.js on lines 4..27
src/components/PhoneInput/flags/Rwanda.js on lines 4..27
src/components/PhoneInput/flags/Sudan.js on lines 4..27
src/components/PhoneInput/flags/UnitedKingdom.js on lines 4..27
src/components/PhoneInput/flags/VaticanCity.js on lines 4..24

Duplicated Code

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

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

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

Tuning

This issue has a mass of 162.

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

function SvgUnitedKingdom({ className, style }) {
    return (
        <svg width={32} height={32} viewBox="0 0 32 32" className={className} style={style}>
            <g fillRule="nonzero" fill="none">
                <path
Severity: Major
Found in src/components/PhoneInput/flags/UnitedKingdom.js and 15 other locations - About 6 hrs to fix
src/components/PhoneInput/flags/Argentina.js on lines 4..27
src/components/PhoneInput/flags/Cameroon.js on lines 4..27
src/components/PhoneInput/flags/Canada.js on lines 4..27
src/components/PhoneInput/flags/Djibouti.js on lines 4..27
src/components/PhoneInput/flags/Eritrea.js on lines 4..27
src/components/PhoneInput/flags/Ghana.js on lines 4..27
src/components/PhoneInput/flags/Kuwait.js on lines 4..27
src/components/PhoneInput/flags/Lesotho.js on lines 4..27
src/components/PhoneInput/flags/Malawi.js on lines 4..27
src/components/PhoneInput/flags/MarshallIsland.js on lines 4..27
src/components/PhoneInput/flags/Mauritius.js on lines 4..27
src/components/PhoneInput/flags/Myanmar.js on lines 4..27
src/components/PhoneInput/flags/Rwanda.js on lines 4..27
src/components/PhoneInput/flags/Sudan.js on lines 4..27
src/components/PhoneInput/flags/VaticanCity.js on lines 4..24

Duplicated Code

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

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

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

Tuning

This issue has a mass of 162.

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

function SvgArgentina({ className, style }) {
    return (
        <svg width={32} height={32} viewBox="0 0 32 32" className={className} style={style}>
            <g fillRule="nonzero" fill="none">
                <path
Severity: Major
Found in src/components/PhoneInput/flags/Argentina.js and 15 other locations - About 6 hrs to fix
src/components/PhoneInput/flags/Cameroon.js on lines 4..27
src/components/PhoneInput/flags/Canada.js on lines 4..27
src/components/PhoneInput/flags/Djibouti.js on lines 4..27
src/components/PhoneInput/flags/Eritrea.js on lines 4..27
src/components/PhoneInput/flags/Ghana.js on lines 4..27
src/components/PhoneInput/flags/Kuwait.js on lines 4..27
src/components/PhoneInput/flags/Lesotho.js on lines 4..27
src/components/PhoneInput/flags/Malawi.js on lines 4..27
src/components/PhoneInput/flags/MarshallIsland.js on lines 4..27
src/components/PhoneInput/flags/Mauritius.js on lines 4..27
src/components/PhoneInput/flags/Myanmar.js on lines 4..27
src/components/PhoneInput/flags/Rwanda.js on lines 4..27
src/components/PhoneInput/flags/Sudan.js on lines 4..27
src/components/PhoneInput/flags/UnitedKingdom.js on lines 4..27
src/components/PhoneInput/flags/VaticanCity.js on lines 4..24

Duplicated Code

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

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

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

Tuning

This issue has a mass of 162.

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