Vizzuality/landgriffon

View on GitHub
marketing/src/containers/methodology/data-providers/component.tsx

Summary

Maintainability
F
5 days
Test Coverage

Function DataProviders has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const DataProviders: FC = () => {
  const [slide, setSlide] = useState(0);
  return (
    <section className="bg-white py-12 space-y-1 bg-cover md:space-y-64 md:py-36">
      <Wrapper>
Severity: Major
Found in marketing/src/containers/methodology/data-providers/component.tsx - About 3 hrs to fix

    File component.tsx has 255 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { FC, useState } from 'react';
    import cx from 'classnames';
    import Image from 'next/image';
    import FadeIn from 'components/fade';
    
    
    Severity: Minor
    Found in marketing/src/containers/methodology/data-providers/component.tsx - About 2 hrs to fix

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

        {
          id: '4',
          content: (
            <div className="w-full">
              <div className="space-y-5">
      marketing/src/containers/methodology/data-providers/component.tsx on lines 107..150

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

      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

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

        {
          id: '3',
          content: (
            <div className="w-full">
              <div className="space-y-5">
      marketing/src/containers/methodology/data-providers/component.tsx on lines 151..186

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

      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

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

                    <div>
                      <Carousel
                        slide={slide}
                        slides={SLIDES}
                        onChange={(i) => {
      marketing/src/containers/testimonials/component.tsx on lines 115..150

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

      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

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

                  <li className="flex items-center justify-center">
                    <a
                      href="https://www.globalforestwatch.org/"
                      target="_blank"
                      rel="noopener noreferrer"
      marketing/src/containers/methodology/data-providers/component.tsx on lines 35..50
      marketing/src/containers/methodology/data-providers/component.tsx on lines 64..75
      marketing/src/containers/methodology/data-providers/component.tsx on lines 77..88
      marketing/src/containers/methodology/data-providers/component.tsx on lines 90..101

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

      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

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

                  <li className="flex items-center justify-center">
                    <a href="https://www.mapspam.info/" target="_blank" rel="noopener noreferrer">
                      <Image
                        layout="intrinsic"
                        priority
      marketing/src/containers/methodology/data-providers/component.tsx on lines 18..33
      marketing/src/containers/methodology/data-providers/component.tsx on lines 35..50
      marketing/src/containers/methodology/data-providers/component.tsx on lines 64..75
      marketing/src/containers/methodology/data-providers/component.tsx on lines 90..101

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

      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

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

                  <li className="flex items-center justify-center">
                    <a href="https://www.fao.org/faostat/en/" target="_blank" rel="noopener noreferrer">
                      <Image
                        layout="intrinsic"
                        priority
      marketing/src/containers/methodology/data-providers/component.tsx on lines 18..33
      marketing/src/containers/methodology/data-providers/component.tsx on lines 35..50
      marketing/src/containers/methodology/data-providers/component.tsx on lines 64..75
      marketing/src/containers/methodology/data-providers/component.tsx on lines 77..88

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

      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

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

                  <li className="flex items-center justify-center">
                    <a href="http://www.earthstat.org/" target="_blank" rel="noopener noreferrer">
                      <Image
                        layout="intrinsic"
                        priority
      marketing/src/containers/methodology/data-providers/component.tsx on lines 18..33
      marketing/src/containers/methodology/data-providers/component.tsx on lines 35..50
      marketing/src/containers/methodology/data-providers/component.tsx on lines 77..88
      marketing/src/containers/methodology/data-providers/component.tsx on lines 90..101

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

      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

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

                  <li className="flex items-center justify-center">
                    <a
                      href="https://land.copernicus.eu/global/index.html"
                      target="_blank"
                      rel="noopener noreferrer"
      marketing/src/containers/methodology/data-providers/component.tsx on lines 18..33
      marketing/src/containers/methodology/data-providers/component.tsx on lines 64..75
      marketing/src/containers/methodology/data-providers/component.tsx on lines 77..88
      marketing/src/containers/methodology/data-providers/component.tsx on lines 90..101

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

      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