nexxtway/react-rainbow

View on GitHub
library/exampleComponents/Icons/expandArrow.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function ExpandArrow has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ExpandArrow = props => {
    const { className, style } = props;
    return (
        <svg
            className={className}
Severity: Major
Found in library/exampleComponents/Icons/expandArrow.js - About 2 hrs to fix

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

                        <g id="Group-134" transform="translate(6.250000, 6.250000)" fillRule="nonzero">
                            <polygon id="Path" fill="#A4A7B5" points="0 0 7.5 0 7.5 7.5 0 7.5" />
                            <path
                                d="M5.32774396,2.09404831 L1.43885507,2.09404831 C1.17038332,2.09404831 0.952743961,2.31168767 0.952743961,2.58015942 C0.952743961,2.84863117 1.17038332,3.06627053 1.43885507,3.06627053 L5.32774396,3.06627053 C5.59621571,3.06627053 5.81385507,2.84863117 5.81385507,2.58015942 C5.81385507,2.31168767 5.59621571,2.09404831 5.32774396,2.09404831 Z"
                                id="Path"
    Severity: Major
    Found in library/exampleComponents/Icons/expandArrow.js and 1 other location - About 1 hr to fix
    library/exampleComponents/Icons/phoneSolid.js on lines 28..44

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

    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

    There are no issues that match your filters.

    Category
    Status