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

function SvgCuracao({ className, style }) {
    return (
        <svg width={32} height={32} viewBox="0 0 32 32" className={className} style={style}>
            <g fillRule="nonzero" fill="none">
                <circle fill="#FFDA44" cx={16} cy={16} r={16} />
Severity: Major
Found in src/components/PhoneInput/flags/Curacao.js and 1 other location - About 7 hrs to fix
src/components/PhoneInput/flags/Martinique.js on lines 4..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 186.

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 to the previous year when ALT + PAGEUP keys are pressed', async () => {
        const calendar = await PageCalendar(CALENDAR);
        await calendar.clickLeftMonthDay(11);
        await browser.keys(['Alt', 'PageUp']);
        await expect(await calendar.isLeftMonthDayFocused(11)).toBe(true);
Severity: Major
Found in integration/specs/Calendar/calendar-9.spec.js and 1 other location - About 7 hrs to fix
integration/specs/Calendar/calendar-9.spec.js on lines 162..171

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

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('<SelectOptions />', () => {
    it('should return the right amount of option items', () => {
        const component = mount(<Options options={options} />);

        expect(component.children().length).toBe(3);
Severity: Major
Found in src/components/Select/__test__/options.spec.js and 1 other location - About 7 hrs to fix
src/components/Calendar/doubleCalendar/yearSelect/__test__/options.spec.js on lines 11..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 184.

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('YearSelect:Options', () => {
    it('should return the right amount of option items', () => {
        const component = mount(<Options options={options} />);

        expect(component.children().length).toBe(3);
src/components/Select/__test__/options.spec.js on lines 11..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 184.

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

function ImportRecordsFlow(props) {
    const {
        className,
        style,
        isOpen,
Severity: Major
Found in src/components/ImportRecordsFlow/index.js - About 7 hrs to fix

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

                <StyledCalendar>
                    <Provider
                        value={{
                            useAutoFocus: enableNavKeys,
                            focusedDate,
    Severity: Major
    Found in src/components/Calendar/doubleCalendar/index.js and 1 other location - About 7 hrs to fix
    src/components/Calendar/doubleCalendar/index.js on lines 266..295

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

    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

                <StyledCalendar>
                    <Provider
                        value={{
                            useAutoFocus: enableNavKeys,
                            focusedDate,
    Severity: Major
    Found in src/components/Calendar/doubleCalendar/index.js and 1 other location - About 7 hrs to fix
    src/components/Calendar/doubleCalendar/index.js on lines 236..265

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

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

    const FileSelector = React.forwardRef((props, ref) => {
        const {
            className,
            style,
            id,
    Severity: Major
    Found in src/components/FileSelector/index.js - About 7 hrs to fix

      File timeSelect.js has 470 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* eslint-disable react/sort-comp */
      import React, { Component } from 'react';
      import PropTypes from 'prop-types';
      import ButtonIcon from '../ButtonIcon';
      import AmPmSelect from './ampmSelect';
      Severity: Minor
      Found in src/components/TimePicker/timeSelect.js - About 7 hrs to fix

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

            it('should render the right day when is minDate is greater than date', () => {
                const date = new Date('04/24/2019');
                const firstDayMonth = new Date('04/01/2019');
                const minDate = new Date('04/25/2019');
                const component = mount(
        Severity: Major
        Found in src/components/MonthlyCalendar/__test__/day.spec.js and 1 other location - About 7 hrs to fix
        src/components/MonthlyCalendar/__test__/day.spec.js on lines 49..65

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

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

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

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

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

        Refactorings

        Further Reading

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

            it('should render the right day when is maxDate is less than date', () => {
                const date = new Date('04/24/2019');
                const firstDayMonth = new Date('04/01/2019');
                const maxDate = new Date('04/23/2019');
                const component = mount(
        Severity: Major
        Found in src/components/MonthlyCalendar/__test__/day.spec.js and 1 other location - About 7 hrs to fix
        src/components/MonthlyCalendar/__test__/day.spec.js on lines 66..82

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

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

        function SvgSlovenia({ className, style }) {
            return (
                <svg width={32} height={32} viewBox="0 0 32 32" className={className} style={style}>
                    <g fillRule="nonzero" fill="none">
                        <circle fill="#F0F0F0" cx={16} cy={16} r={16} />
        Severity: Major
        Found in src/components/PhoneInput/flags/Slovenia.js and 9 other locations - About 7 hrs to fix
        src/components/PhoneInput/flags/Chile.js on lines 4..21
        src/components/PhoneInput/flags/Egypt.js on lines 4..24
        src/components/PhoneInput/flags/Gambia.js on lines 4..24
        src/components/PhoneInput/flags/Jersey.js on lines 4..24
        src/components/PhoneInput/flags/Kazakhstan.js on lines 4..21
        src/components/PhoneInput/flags/Palestine.js on lines 4..24
        src/components/PhoneInput/flags/SouthKorea.js on lines 4..21
        src/components/PhoneInput/flags/Tanzania.js on lines 4..24
        src/components/PhoneInput/flags/TimorLeste.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 178.

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

        function SvgKazakhstan({ className, style }) {
            return (
                <svg width={32} height={32} viewBox="0 0 32 32" className={className} style={style}>
                    <g fillRule="nonzero" fill="none">
                        <circle fill="#338AF3" cx={16} cy={16} r={16} />
        Severity: Major
        Found in src/components/PhoneInput/flags/Kazakhstan.js and 9 other locations - About 7 hrs to fix
        src/components/PhoneInput/flags/Chile.js on lines 4..21
        src/components/PhoneInput/flags/Egypt.js on lines 4..24
        src/components/PhoneInput/flags/Gambia.js on lines 4..24
        src/components/PhoneInput/flags/Jersey.js on lines 4..24
        src/components/PhoneInput/flags/Palestine.js on lines 4..24
        src/components/PhoneInput/flags/Slovenia.js on lines 4..24
        src/components/PhoneInput/flags/SouthKorea.js on lines 4..21
        src/components/PhoneInput/flags/Tanzania.js on lines 4..24
        src/components/PhoneInput/flags/TimorLeste.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 178.

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

        function SvgChile({ className, style }) {
            return (
                <svg width={32} height={32} viewBox="0 0 32 32" className={className} style={style}>
                    <g fillRule="nonzero" fill="none">
                        <circle fill="#F0F0F0" cx={16} cy={16} r={16} />
        Severity: Major
        Found in src/components/PhoneInput/flags/Chile.js and 9 other locations - About 7 hrs to fix
        src/components/PhoneInput/flags/Egypt.js on lines 4..24
        src/components/PhoneInput/flags/Gambia.js on lines 4..24
        src/components/PhoneInput/flags/Jersey.js on lines 4..24
        src/components/PhoneInput/flags/Kazakhstan.js on lines 4..21
        src/components/PhoneInput/flags/Palestine.js on lines 4..24
        src/components/PhoneInput/flags/Slovenia.js on lines 4..24
        src/components/PhoneInput/flags/SouthKorea.js on lines 4..21
        src/components/PhoneInput/flags/Tanzania.js on lines 4..24
        src/components/PhoneInput/flags/TimorLeste.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 178.

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

        function SvgEgypt({ className, style }) {
            return (
                <svg width={32} height={32} viewBox="0 0 32 32" className={className} style={style}>
                    <g fillRule="nonzero" fill="none">
                        <circle fill="#F0F0F0" cx={16} cy={16} r={16} />
        Severity: Major
        Found in src/components/PhoneInput/flags/Egypt.js and 9 other locations - About 7 hrs to fix
        src/components/PhoneInput/flags/Chile.js on lines 4..21
        src/components/PhoneInput/flags/Gambia.js on lines 4..24
        src/components/PhoneInput/flags/Jersey.js on lines 4..24
        src/components/PhoneInput/flags/Kazakhstan.js on lines 4..21
        src/components/PhoneInput/flags/Palestine.js on lines 4..24
        src/components/PhoneInput/flags/Slovenia.js on lines 4..24
        src/components/PhoneInput/flags/SouthKorea.js on lines 4..21
        src/components/PhoneInput/flags/Tanzania.js on lines 4..24
        src/components/PhoneInput/flags/TimorLeste.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 178.

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

        function SvgSouthKorea({ className, style }) {
            return (
                <svg width={32} height={32} viewBox="0 0 32 32" className={className} style={style}>
                    <g fillRule="nonzero" fill="none">
                        <circle fill="#F0F0F0" cx={16} cy={16} r={16} />
        Severity: Major
        Found in src/components/PhoneInput/flags/SouthKorea.js and 9 other locations - About 7 hrs to fix
        src/components/PhoneInput/flags/Chile.js on lines 4..21
        src/components/PhoneInput/flags/Egypt.js on lines 4..24
        src/components/PhoneInput/flags/Gambia.js on lines 4..24
        src/components/PhoneInput/flags/Jersey.js on lines 4..24
        src/components/PhoneInput/flags/Kazakhstan.js on lines 4..21
        src/components/PhoneInput/flags/Palestine.js on lines 4..24
        src/components/PhoneInput/flags/Slovenia.js on lines 4..24
        src/components/PhoneInput/flags/Tanzania.js on lines 4..24
        src/components/PhoneInput/flags/TimorLeste.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 178.

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

        function SvgPalestine({ className, style }) {
            return (
                <svg width={32} height={32} viewBox="0 0 32 32" className={className} style={style}>
                    <g fillRule="nonzero" fill="none">
                        <circle fill="#F0F0F0" cx={16.031} cy={15.969} r={15.969} />
        Severity: Major
        Found in src/components/PhoneInput/flags/Palestine.js and 9 other locations - About 7 hrs to fix
        src/components/PhoneInput/flags/Chile.js on lines 4..21
        src/components/PhoneInput/flags/Egypt.js on lines 4..24
        src/components/PhoneInput/flags/Gambia.js on lines 4..24
        src/components/PhoneInput/flags/Jersey.js on lines 4..24
        src/components/PhoneInput/flags/Kazakhstan.js on lines 4..21
        src/components/PhoneInput/flags/Slovenia.js on lines 4..24
        src/components/PhoneInput/flags/SouthKorea.js on lines 4..21
        src/components/PhoneInput/flags/Tanzania.js on lines 4..24
        src/components/PhoneInput/flags/TimorLeste.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 178.

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

        function SvgGambia({ className, style }) {
            return (
                <svg width={32} height={32} viewBox="0 0 32 32" className={className} style={style}>
                    <g fillRule="nonzero" fill="none">
                        <circle fill="#F0F0F0" cx={16} cy={16} r={16} />
        Severity: Major
        Found in src/components/PhoneInput/flags/Gambia.js and 9 other locations - About 7 hrs to fix
        src/components/PhoneInput/flags/Chile.js on lines 4..21
        src/components/PhoneInput/flags/Egypt.js on lines 4..24
        src/components/PhoneInput/flags/Jersey.js on lines 4..24
        src/components/PhoneInput/flags/Kazakhstan.js on lines 4..21
        src/components/PhoneInput/flags/Palestine.js on lines 4..24
        src/components/PhoneInput/flags/Slovenia.js on lines 4..24
        src/components/PhoneInput/flags/SouthKorea.js on lines 4..21
        src/components/PhoneInput/flags/Tanzania.js on lines 4..24
        src/components/PhoneInput/flags/TimorLeste.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 178.

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

        function SvgTimorLeste({ className, style }) {
            return (
                <svg width={32} height={32} viewBox="0 0 32 32" className={className} style={style}>
                    <g fillRule="nonzero" fill="none">
                        <circle fill="#FFDA44" cx={16.031} cy={15.969} r={15.969} />
        Severity: Major
        Found in src/components/PhoneInput/flags/TimorLeste.js and 9 other locations - About 7 hrs to fix
        src/components/PhoneInput/flags/Chile.js on lines 4..21
        src/components/PhoneInput/flags/Egypt.js on lines 4..24
        src/components/PhoneInput/flags/Gambia.js on lines 4..24
        src/components/PhoneInput/flags/Jersey.js on lines 4..24
        src/components/PhoneInput/flags/Kazakhstan.js on lines 4..21
        src/components/PhoneInput/flags/Palestine.js on lines 4..24
        src/components/PhoneInput/flags/Slovenia.js on lines 4..24
        src/components/PhoneInput/flags/SouthKorea.js on lines 4..21
        src/components/PhoneInput/flags/Tanzania.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 178.

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

        function SvgTanzania({ className, style }) {
            return (
                <svg width={32} height={32} viewBox="0 0 32 32" className={className} style={style}>
                    <g fillRule="nonzero" fill="none">
                        <circle fill="#FFDA44" cx={16} cy={16} r={16} />
        Severity: Major
        Found in src/components/PhoneInput/flags/Tanzania.js and 9 other locations - About 7 hrs to fix
        src/components/PhoneInput/flags/Chile.js on lines 4..21
        src/components/PhoneInput/flags/Egypt.js on lines 4..24
        src/components/PhoneInput/flags/Gambia.js on lines 4..24
        src/components/PhoneInput/flags/Jersey.js on lines 4..24
        src/components/PhoneInput/flags/Kazakhstan.js on lines 4..21
        src/components/PhoneInput/flags/Palestine.js on lines 4..24
        src/components/PhoneInput/flags/Slovenia.js on lines 4..24
        src/components/PhoneInput/flags/SouthKorea.js on lines 4..21
        src/components/PhoneInput/flags/TimorLeste.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 178.

        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