Vizzuality/landgriffon

View on GitHub
marketing/src/containers/testimonials/component.tsx

Summary

Maintainability
D
2 days
Test Coverage

Function Testimonials has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const Testimonials: React.FC = () => {
  const [slide, setSlide] = useState(0);

  return (
    <section className="relative py-12 bg-blue-600 md:py-32">
Severity: Major
Found in marketing/src/containers/testimonials/component.tsx - About 2 hrs to fix

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

                <FadeIn>
                  <Carousel
                    slide={slide}
                    slides={SLIDES}
                    onChange={(i) => {
    Severity: Major
    Found in marketing/src/containers/testimonials/component.tsx and 1 other location - About 1 day to fix
    marketing/src/containers/methodology/data-providers/component.tsx on lines 206..241

    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 3 locations. Consider refactoring.
    Open

      {
        id: '1',
        content: (
          <div className="w-full">
            <div className="space-y-10">
    Severity: Major
    Found in marketing/src/containers/testimonials/component.tsx and 2 other locations - About 2 hrs to fix
    marketing/src/containers/testimonials/component.tsx on lines 34..52
    marketing/src/containers/testimonials/component.tsx on lines 53..70

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

    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 3 locations. Consider refactoring.
    Open

      {
        id: '3',
        content: (
          <div className="w-full">
            <div className="space-y-10">
    Severity: Major
    Found in marketing/src/containers/testimonials/component.tsx and 2 other locations - About 2 hrs to fix
    marketing/src/containers/testimonials/component.tsx on lines 15..33
    marketing/src/containers/testimonials/component.tsx on lines 34..52

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

    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 3 locations. Consider refactoring.
    Open

      {
        id: '2',
        content: (
          <div className="w-full">
            <div className="space-y-10">
    Severity: Major
    Found in marketing/src/containers/testimonials/component.tsx and 2 other locations - About 2 hrs to fix
    marketing/src/containers/testimonials/component.tsx on lines 15..33
    marketing/src/containers/testimonials/component.tsx on lines 53..70

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

    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 className="mt-5 md:mt-40">
                    <Link href="/about">
                      <a className="flex items-center space-x-5 font-semibold text-orange-500">
                        <span>Know more about us</span>
                        <Icon icon={ARROW_RIGHT_SVG} className="w-12 h-12 fill-orange-500" />
    Severity: Major
    Found in marketing/src/containers/testimonials/component.tsx and 1 other location - About 1 hr to fix
    marketing/src/containers/about/how/component.tsx on lines 27..34

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

    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

          <div className="w-full">
            <div className="space-y-10">
              <p className="text-2xl text-white">
                Let the platform do the work, so the people can focus on the essentials; decision
                making.
    Severity: Major
    Found in marketing/src/containers/testimonials/component.tsx and 4 other locations - About 55 mins to fix
    client/src/containers/admin/edit-target-modal/component.tsx on lines 87..91
    client/src/containers/targets/item/component.tsx on lines 17..23
    marketing/src/containers/faqs/component.tsx on lines 11..17
    marketing/src/containers/privacy-policy/component.tsx on lines 307..313

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

    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