nexxtway/react-rainbow

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

Summary

Maintainability
A
3 hrs
Test Coverage

Function Messages has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const Messages = props => {
    const { className, style } = props;
    return (
        <svg
            className={className}
Severity: Minor
Found in library/exampleComponents/Icons/messages.js - About 1 hr to fix

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

                        <g id="Group-31" transform="translate(124.000000, 458.000000)">
                            <g id="messages" transform="translate(32.000000, 279.000000)">
                                <path
                                    d="M5.87378516,0.00566761364 C2.70058594,0.0730397727 0.103382812,2.6209517 0.00309375,5.76703125 C-0.04675,7.3300142 0.510984375,8.76315341 1.45960547,9.85193182 C1.88684375,10.3422443 2.00878906,11.0254688 1.78900391,11.635696 L1.39394922,12.7326989 C1.26547266,13.0895028 1.68214062,13.3944886 1.98807812,13.167571 L3.38924609,12.1283097 C3.80617187,11.8190625 4.33558984,11.7040483 4.84640234,11.8038494 C5.3783125,11.9077841 5.93527344,11.9421307 6.50808984,11.8951705 C9.52178906,11.6478409 11.8985195,9.17607955 12.0068008,6.17893466 C12.1309375,2.74619318 9.32430469,-0.0675852273 5.87378516,0.00566761364 Z"
                                    id="Shape"
    Severity: Major
    Found in library/exampleComponents/Icons/messages.js and 1 other location - About 1 hr to fix
    library/exampleComponents/Icons/infoFilled.js on lines 16..33

    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