bastienrobert/la-ferme

View on GitHub
packages/components/src/icons/web/Cross.tsx

Summary

Maintainability
A
0 mins
Test Coverage

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

const Plus: FC<IconProps> = ({ color = 'beige' }) => {
  return (
    <SVG viewBox="0 0 24 24" fill="none">
      <path
        d="M12.6132 6.11914C12.3824 6.42867 12.1284 6.73819 11.8515 7.07152C9.54319 4.66676 6.84251 2.00009 5.41139 0.595331C4.8574 0.047712 3.95718 0.0477121 3.4032 0.619141L1.41809 2.66676C0.887185 3.21438 0.864101 4.07152 1.32575 4.66676C2.82613 6.54771 5.98846 10.4287 7.41958 11.643C5.84996 13.143 4.30342 14.5477 3.19545 15.5953C2.61839 16.1668 1.44117 17.5715 0.633274 18.5477C0.148538 19.143 0.194704 20.0001 0.702523 20.5477L3.01079 22.9287C3.56477 23.5001 4.44192 23.5001 4.9959 22.9763C6.75019 21.2858 10.3511 17.8572 12.3131 16.143C13.5827 17.4287 14.783 18.7382 15.8448 19.9049C16.3526 20.4763 17.3913 21.762 18.1992 22.7144C18.7301 23.3811 19.7226 23.4287 20.3228 22.8096L22.1694 20.8572C22.7234 20.2858 22.7234 19.3811 22.2156 18.8096C20.8306 17.262 18.1761 14.3096 16.3987 12.2382C18.707 9.88105 21.2692 7.11914 22.608 5.64295C23.1389 5.07152 23.1389 4.14295 22.5849 3.57152L19.6534 0.547712C19.0994 -0.0237166 18.1761 -0.0237166 17.6221 0.547712C16.1679 2.07152 13.6057 4.83343 12.6132 6.11914Z"
Severity: Major
Found in packages/components/src/icons/web/Cross.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/End.tsx on lines 8..17
packages/components/src/icons/native/Lightning.tsx on lines 8..17
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