nexxtway/react-rainbow

View on GitHub
library/styleguideComponents/ProjectSelector/rightArrow.js

Summary

Maintainability
B
4 hrs
Test Coverage

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

            <g id="examples" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
                <g id="angle-down" transform="translate(-7.000000, -9.000000)" fillRule="nonzero">
                    <rect id="shape" x="0" y="0" width="24" height="24" />
                    <path d="M7.21962617,10.9797508 C6.92679128,10.6869159 6.92679128,10.2133956 7.21962617,9.92367601 L7.92367601,9.21962617 C8.2165109,8.92679128 8.69003115,8.92679128 8.97975078,9.21962617 L11.982866,12.2227414 L14.9859813,9.21962617 C15.2788162,8.92679128 15.7523364,8.92679128 16.0420561,9.21962617 L16.7461059,9.92367601 C17.0389408,10.2165109 17.0389408,10.6900312 16.7461059,10.9797508 L12.5093458,15.2165109 C12.2227414,15.5093458 11.7492212,15.5093458 11.4563863,15.2165109 L7.21962617,10.9797508 Z" id="arrow" fill="#01B6F5" />
                </g>
Severity: Major
Found in library/styleguideComponents/ProjectSelector/rightArrow.js and 1 other location - About 4 hrs to fix
src/components/VerticalSectionOverflow/rightArrow.js on lines 15..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 121.

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