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

        trigger.rightUpAnchor.x - trigger.width / 2 - content.width / 2 >= 0 &&
        trigger.leftUpAnchor.x + trigger.width / 2 + content.width / 2 <= viewport.width &&
        trigger.rightUpAnchor.y - margin - content.height >= 0
Severity: Major
Found in src/components/InternalOverlay/helpers/resolverUpCenter.js and 1 other location - About 2 hrs to fix
src/components/InternalOverlay/helpers/resolverBottomCenter.js on lines 4..6

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

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

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

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

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

Refactorings

Further Reading

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

    it('should not call google.maps.Marker when longitude is not passed', () => {
        const component = mount(<MapMarker latitude={10} />);
        // this actually is context not props
        component.setProps(newContext);
        expect(global.google.maps.Marker).not.toHaveBeenCalled();
Severity: Major
Found in src/components/MapMarker/__test__/mapMarker.spec.js and 1 other location - About 2 hrs to fix
src/components/MapMarker/__test__/mapMarker.spec.js on lines 48..53

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

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 {
            style,
            className,
            value,
            onChange,
Severity: Major
Found in src/components/PrimitiveCheckbox/index.js and 1 other location - About 2 hrs to fix
src/components/AvatarMenu/avatarButton.js on lines 45..60

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

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

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

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

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

Refactorings

Further Reading

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

    it('should not call google.maps.Marker when latitude is not passed', () => {
        const component = mount(<MapMarker longitude={10} />);
        // this actually is context not props
        component.setProps(newContext);
        expect(global.google.maps.Marker).not.toHaveBeenCalled();
Severity: Major
Found in src/components/MapMarker/__test__/mapMarker.spec.js and 1 other location - About 2 hrs to fix
src/components/MapMarker/__test__/mapMarker.spec.js on lines 54..59

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

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

        trigger.rightBottomAnchor.x - trigger.width / 2 - content.width / 2 >= 0 &&
        trigger.leftBottomAnchor.x + trigger.width / 2 + content.width / 2 <= viewport.width &&
        trigger.leftBottomAnchor.y + margin + content.height <= viewport.height
src/components/InternalOverlay/helpers/resolverUpCenter.js on lines 4..6

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

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

    render() {
        const {
            label,
            value,
            name,
Severity: Major
Found in src/components/Slider/index.js - About 2 hrs to fix

    Function Row has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function Row(props) {
        const { rowData, columns, isSelected, ...rest } = props;
    
        const cells = columns.map((column, index) => {
            const {
    Severity: Major
    Found in src/components/Table/body/row.js - About 2 hrs to fix

      Function RibbonRenderer has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function RibbonRenderer() {
          return (
              <StyledHeading>
                  <UniversalSearch />
                  <StyledContainer>
      Severity: Major
      Found in library/styleguideComponents/RibbonRenderer/index.js - About 2 hrs to fix

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

        function isPointWithinRect(point, rect) {
            const { x, y } = point;
            const { left, top, right, bottom } = rect;
            return x >= left && y >= top && x <= right && y <= bottom;
        }
        Severity: Major
        Found in src/components/PicklistOption/pageObject/index.js and 1 other location - About 2 hrs to fix
        src/components/Option/pageObject/index.js on lines 8..12

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

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

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

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

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

        Refactorings

        Further Reading

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

            data: PropTypes.arrayOf(
                PropTypes.shape({
                    label: PropTypes.node,
                    icon: PropTypes.node,
                    isExpanded: PropTypes.bool,
        Severity: Major
        Found in src/components/Tree/index.js and 1 other location - About 2 hrs to fix
        src/components/Tree/treeChildren.js on lines 40..49

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 81.

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

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

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

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

        Refactorings

        Further Reading

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

            data: PropTypes.arrayOf(
                PropTypes.shape({
                    label: PropTypes.node,
                    icon: PropTypes.node,
                    isExpanded: PropTypes.bool,
        Severity: Major
        Found in src/components/Tree/treeChildren.js and 1 other location - About 2 hrs to fix
        src/components/Tree/index.js on lines 79..88

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

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

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

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

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

        Refactorings

        Further Reading

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

        async function isPointWithinRect(point, rect) {
            const { x, y } = point;
            const { left, top, right, bottom } = rect;
            return x >= left && y >= top && x <= right && y <= bottom;
        }
        Severity: Major
        Found in src/components/Option/pageObject/index.js and 1 other location - About 2 hrs to fix
        src/components/PicklistOption/pageObject/index.js on lines 7..11

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

        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 StyledArrowButton = attachThemeAttrs(styled(ButtonIcon))`
            color: ${props => props.palette.brand.main};
            ${props =>
                props.disabled &&
                `
        Severity: Major
        Found in src/components/WeeklyCalendar/styled/arrowButton.js and 2 other locations - About 2 hrs to fix
        src/components/Calendar/styled/arrowButton.js on lines 5..12
        src/components/MonthlyCalendar/styled/arrowButton.js on lines 5..21

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

        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 StyledArrowButton = attachThemeAttrs(styled(ButtonIcon))`
            color: ${props => props.palette.brand.main};
            ${props =>
                props.disabled &&
                `
        Severity: Major
        Found in src/components/Calendar/styled/arrowButton.js and 2 other locations - About 2 hrs to fix
        src/components/MonthlyCalendar/styled/arrowButton.js on lines 5..21
        src/components/WeeklyCalendar/styled/arrowButton.js on lines 5..21

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

        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 StyledArrowButton = attachThemeAttrs(styled(ButtonIcon))`
            color: ${props => props.palette.brand.main};
            ${props =>
                props.disabled &&
                `
        Severity: Major
        Found in src/components/MonthlyCalendar/styled/arrowButton.js and 2 other locations - About 2 hrs to fix
        src/components/Calendar/styled/arrowButton.js on lines 5..12
        src/components/WeeklyCalendar/styled/arrowButton.js on lines 5..21

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

        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 collapse the node when it is expand and its button icon is clicked', async () => {
                const tree = new PageTree(TREE);
                const node = await tree.getNode([2]);
                await node.clickExpandButton();
                await expect(await node.isExpanded()).toBe(false);
        Severity: Major
        Found in integration/specs/Tree/tree-1.spec.js and 1 other location - About 2 hrs to fix
        integration/specs/Tree/tree-1.spec.js on lines 16..21

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

        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 StyledButtonContent = attachThemeAttrs(styled.button)`
            border: none;
            border-radius: 12px;
            outline: 0;
            padding: 0.5rem 0;
        Severity: Major
        Found in src/components/SidebarItem/styled/buttonContent.js and 1 other location - About 2 hrs to fix
        src/components/SidebarItem/styled/anchorContent.js on lines 4..34

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

        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 {
                    header,
                    component,
                    field,
                    sortable,
        Severity: Major
        Found in src/components/Table/body/row.js and 1 other location - About 2 hrs to fix
        src/components/ButtonMenu/index.js on lines 10..26

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

        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="user" transform="translate(-4.000000, -5.000000)" fillRule="nonzero">
                            <rect id="Rectangle" x="0" y="0" width="24" height="24" />
                            <path
                                d="M12.2082506,13.2387566 C10.001703,13.2387566 8.20692791,11.4439814 8.20692791,9.23743386 C8.20692791,7.03088625 10.001703,5.23611111 12.2082506,5.23611111 C14.4147983,5.23611111 16.2095734,7.03088625 16.2095734,9.23743386 C16.2095734,11.4439814 14.4147983,13.2387566 12.2082506,13.2387566 Z M12.2082506,5.96362434 C10.4032903,5.96362434 8.93444114,7.43247355 8.93444114,9.23743386 C8.93444114,11.0423942 10.4032903,12.5112434 12.2082506,12.5112434 C14.013211,12.5112434 15.4820602,11.0423942 15.4820602,9.23743386 C15.4820602,7.43247355 14.013211,5.96362434 12.2082506,5.96362434 Z"
                                id="Shape"
        Severity: Major
        Found in library/exampleComponents/Icons/userAvatar.js and 1 other location - About 2 hrs to fix
        src/components/ImportRecordsFlow/icons/cancel.js on lines 36..57

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

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

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

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

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

        Refactorings

        Further Reading

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

            options: PropTypes.arrayOf(
                PropTypes.shape({
                    label: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
                    description: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
                    icon: PropTypes.node,
        Severity: Major
        Found in src/components/Lookup/index.js and 1 other location - About 2 hrs to fix
        src/components/Select/index.js on lines 142..148

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

        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