nexxtway/react-rainbow

View on GitHub
src/components/PhoneInput/flags/Liberia.js

Summary

Maintainability
A
1 hr
Test Coverage

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

                <g fill="#F0F0F0">
                    <circle cx={16} cy={16} r={16} />
                    <path d="M3.657 5.818h24.686A16.088 16.088 0 0025.2 2.91H6.8a16.084 16.084 0 00-3.143 2.91zM0 16c0 .49.023.975.067 1.455h31.866a16.197 16.197 0 000-2.91H.067C.023 15.026 0 15.51 0 16zM1.745 23.273h28.51c.471-.922.856-1.895 1.143-2.91H.602a15.892 15.892 0 001.143 2.91zM6.8 29.09h18.4a16.088 16.088 0 003.143-2.908H3.657A16.094 16.094 0 006.8 29.09zM.602 11.636h30.796a15.891 15.891 0 00-1.143-2.909H1.745a15.895 15.895 0 00-1.143 2.91z" />
                </g>
Severity: Major
Found in src/components/PhoneInput/flags/Liberia.js and 1 other location - About 1 hr to fix
src/components/PhoneInput/flags/Pakistan.js on lines 8..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 59.

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