Vizzuality/landgriffon

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

Summary

Maintainability
C
7 hrs
Test Coverage

Function FAQs has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const FAQs: React.FC = () => {
  return (
    <section className="bg-white">
      <div className="relative z-10">
        <Wrapper>
Severity: Minor
Found in marketing/src/containers/faqs/component.tsx - About 1 hr to fix

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

            <Wrapper>
              <div className="relative z-10 px-5 py-20 mt-20 bg-orange-500 md:py-32">
                <div className="w-full">
                  <div className="space-y-10 text-center">
                    <h2 className="text-3xl font-medium font-display">Still have a question?</h2>
    Severity: Major
    Found in marketing/src/containers/faqs/component.tsx and 1 other location - About 5 hrs to fix
    marketing/src/containers/privacy-policy/component.tsx on lines 647..663

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

    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="flex flex-col justify-between space-y-10 md:flex-row md:space-x-20 md:space-y-0">
                  <div className="space-y-10 md:w-8/12">
                    <h2 className="text-5xl font-black uppercase md:text-7xl font-display">
                      FREQUENTLY ASKED QUESTIONS.
                    </h2>
    Severity: Major
    Found in marketing/src/containers/faqs/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/privacy-policy/component.tsx on lines 307..313
    marketing/src/containers/testimonials/component.tsx on lines 74..81

    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