bastienrobert/la-ferme

View on GitHub
packages/components/src/icons/native/End.tsx

Summary

Maintainability
A
0 mins
Test Coverage

Similar blocks of code found in 5 locations. Consider refactoring.
Invalid

const Plus: FC<IconProps> = ({ color = 'red' }) => {
  return (
    <SVG viewBox="0 0 32 16" fill="none">
      <Path
        d="M9.8024 2.70585L9.85794 3.43033C9.92013 4.14116 9.96513 4.77506 9.99295 5.33205C9.39043 5.43704 8.56254 5.53562 7.50927 5.62777L5.71213 5.79284L5.73188 6.01854L5.77623 6.70478C5.79212 6.88638 5.81533 7.06211 5.84588 7.23197C7.13348 7.00953 8.08858 6.87107 8.71121 6.8166C9.33902 6.76167 9.72705 6.77478 9.87531 6.85591L10.1034 9.46314C10.1184 9.63436 10.0947 9.75146 10.0322 9.81443C9.96974 9.87741 9.86847 9.91502 9.72838 9.92728L9.6272 9.93613L9.20557 9.95734C8.28137 10.0905 7.25485 10.2195 6.12602 10.3444L6.4515 13.4372L6.46687 13.7025L6.53088 14.434C6.54449 14.5897 6.50506 14.6768 6.41258 14.6954L1.96423 15.1237C1.95113 15.0935 1.90609 15.0269 1.82911 14.9238C1.77839 14.5832 1.7426 14.2935 1.72172 14.0549L0.821275 3.22496C0.815374 3.15751 1.16524 3.09291 1.87088 3.03118L2.06613 3.02194L2.59536 2.97564L6.35103 2.60785L9.02325 2.40543L9.28786 2.38228L9.40392 2.36428C9.5492 2.35157 9.64814 2.3769 9.70074 2.44026C9.75807 2.49798 9.79196 2.58651 9.8024 2.70585ZM12.1338 13.1361C12.0416 12.0828 12.0061 11.3488 12.0274 10.9339C11.8299 8.67686 11.662 6.39898 11.5236 4.10021C11.4794 3.77469 11.4428 3.4459 11.4138 3.11384L11.3913 2.85701C11.3565 2.69798 11.3336 2.5562 11.3227 2.43168C11.3118 2.30715 11.3178 2.2256 11.3405 2.18701C12.4568 2.15731 13.4326 2.10593 14.2679 2.03284C15.1033 1.95976 15.6752 1.89403 15.9838 1.83567C15.9956 1.85032 16.0072 1.89375 16.0188 1.96593L15.9643 1.9707L16.2108 4.78806L16.8195 11.1185C16.8236 11.1652 16.8348 11.2034 16.8531 11.2332L16.8544 11.2487C16.8727 11.2785 16.8834 11.3115 16.8866 11.3479L17.147 13.6072C17.1261 13.6666 17.0832 13.7147 17.0185 13.7518L16.7539 13.7749L12.4017 14.2263C12.3475 14.2049 12.2767 14.1719 12.1891 14.1272L12.1853 13.9942L12.1338 13.1361ZM30.7816 6.85412L30.8194 7.37624L31.0714 10.2559L31.2068 11.6243L31.2408 12.0134L31.2806 12.3785C31.2531 12.4228 31.1278 12.4546 30.9047 12.4741L30.7023 12.4919L28.2613 12.7368C27.2236 12.8276 26.4502 12.8926 25.9413 12.9319C25.8562 12.8557 25.5074 12.1255 24.8949 10.7413L23.0631 6.92553L22.7864 6.98896L22.848 7.78348L23.0325 9.89261L23.2482 11.999L23.3245 12.8707C23.3449 13.1042 23.3037 13.2306 23.2008 13.2501C22.6858 13.2795 22.1948 13.3146 21.7278 13.3554L21.4866 13.3766L20.3141 13.5105L20.1584 13.5241L19.5994 13.5887L19.5747 13.5752C19.3894 13.4293 19.2936 13.3201 19.2872 13.2474L19.275 13.1073L19.2692 12.951L19.0425 9.91232C18.7511 6.58129 18.5618 4.05954 18.4748 2.34708L18.4338 1.69974C18.4297 1.65305 20.2135 1.45516 23.7852 1.10608C23.8182 1.12411 23.8749 1.23417 23.9553 1.43626L23.9532 1.41291L24.0136 1.56448C24.4937 2.63086 25.0712 3.85341 25.7461 5.23213C26.4204 6.60567 26.7642 7.30755 26.7773 7.33777L27.0405 7.29905L26.5167 0.953371C26.5131 0.911863 26.89 0.857972 27.6475 0.791697L29.6044 0.659704L30.1803 0.609317C30.3669 2.32354 30.5673 4.40514 30.7816 6.85412Z"
Severity: Major
Found in packages/components/src/icons/native/End.tsx and 4 other locations - About 2 hrs to fix
packages/components/src/icons/native/Cross.tsx on lines 8..17
packages/components/src/icons/native/Lightning.tsx on lines 8..17
packages/components/src/icons/web/Cross.tsx on lines 7..16
packages/components/src/icons/web/Lightning.tsx on lines 7..16

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

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