Function ExperiencesIcon
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ExperiencesIcon = props => {
const { className } = props;
return (
<svg className={className} width="23px" height="18px" viewBox="0 0 23 18" version="1.1">
<g id="pages" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
Similar blocks of code found in 2 locations. Consider refactoring. Open
<g id="Group-26">
<path
d="M20.9516828,0.0082334918 L1.07434649,0.0082334918 C0.4810545,0.0082334918 2.84217094e-13,0.513358782 2.84217094e-13,1.13660734 L2.84217094e-13,13.5468318 C2.84217094e-13,14.1700804 0.4810545,14.6752057 1.07434649,14.6752057 L20.9516828,14.6752057 C21.5452316,14.6752057 22.0262861,14.1700804 22.0262861,13.5468318 L22.0262861,1.13660734 C22.0262861,0.513358782 21.5452316,0.0082334918 20.9516828,0.0082334918"
id="Fill-4"
fill="#CED0D9"
- Read upRead up
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 63.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76