bastienrobert/la-ferme

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

Summary

Maintainability
A
0 mins
Test Coverage

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

const Plus: FC<IconProps> = ({ color = 'beige' }) => {
  return (
    <SVG viewBox="0 0 29 29">
      <Path
        d="M11.0918 9.71863C11.1394 10.088 11.1871 10.5034 11.2109 10.9189C7.82991 10.8958 3.97277 10.9882 1.92515 11.0343C1.11563 11.0574 0.496581 11.6807 0.496581 12.4655L0.496581 15.3046C0.496582 16.0433 1.06801 16.6665 1.82991 16.7358C4.25849 16.9435 9.30611 17.3821 11.2109 17.2205C11.1156 19.3441 10.9966 21.3984 10.9252 22.9219C10.9013 23.7298 11.0204 25.5072 11.1394 26.7536C11.2109 27.4923 11.8537 28.0693 12.6156 28.0693L15.9728 28.0693C16.7585 28.0693 17.4252 27.4692 17.449 26.6844C17.5442 24.2838 17.7585 19.3903 17.949 16.8281C19.7823 16.805 21.568 16.8512 23.1632 16.8973C23.9252 16.9204 25.6156 17.0589 26.8775 17.1743C27.7347 17.2436 28.4966 16.5973 28.4966 15.7432L28.4966 13.0656C28.4966 12.3039 27.8775 11.6576 27.068 11.6345C24.949 11.5652 20.949 11.4037 18.1871 11.2421C18.1871 7.98743 18.1156 4.29421 18.0442 2.33218C18.0204 1.54737 17.3775 0.92414 16.568 0.92414L12.2823 0.92414C11.449 0.92414 10.7823 1.57045 10.8061 2.37835C10.8299 4.4327 10.9013 8.14901 11.0918 9.71863Z"
Severity: Major
Found in packages/components/src/icons/native/Plus.tsx and 1 other location - About 2 hrs to fix
packages/components/src/icons/native/Camera.tsx on lines 8..17

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

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