Vizzuality/landgriffon

View on GitHub

Showing 1,408 of 1,408 total issues

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

  updateState({ props, oldProps, changeFlags }: Record<string, any>): void {
    super.updateState({ props, oldProps, changeFlags });

    if (changeFlags.extensionsChanged) {
      const { gl } = this.context;
cookie-traceability/src/lib/flowmap/layers/FlowLinesLayer/FlowLinesLayer.ts on lines 119..130

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

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

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

  updateState({ props, oldProps, changeFlags }: Record<string, any>): void {
    super.updateState({ props, oldProps, changeFlags });

    if (changeFlags.extensionsChanged) {
      const { gl } = this.context;
cookie-traceability/src/lib/flowmap/layers/AnimatedFlowLinesLayer/AnimatedFlowLinesLayer.ts on lines 137..148

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

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

  @ApiOperation({
    description: 'Find all API events',
  })
  @ApiOkResponse({
    type: ApiEventResult,
Severity: Major
Found in api/src/modules/api-events/api-events.controller.ts and 1 other location - About 6 hrs to fix
api/src/modules/scenario-interventions/scenario-interventions.controller.ts on lines 51..74

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

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

  @ApiOperation({
    description: 'Find all scenarios',
  })
  @ApiOkResponse({
    type: ScenarioIntervention,
api/src/modules/api-events/api-events.controller.ts on lines 43..61

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

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

Function SuppliersStackedBar has 167 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const SuppliersStackedBar = () => {
  const {
    viewBy,
    totalSuppliers,
    filters: { dates, suppliers, origins, materials },

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

      it('filter by a producer', () => {
        cy.get('[data-testid="more-filters-button"]').click();
        cy.wait('@fetchProducers').then((interception) => {
          const firstItem = interception.response.body?.data[0];
          cy.get('[data-testid="tree-select-producers-filter"]').find('div[role="combobox"]').click();
    Severity: Major
    Found in client/cypress/e2e/analysis/filters-map.cy.ts and 3 other locations - About 6 hrs to fix
    client/cypress/e2e/analysis/filters-map.cy.ts on lines 62..74
    client/cypress/e2e/analysis/filters-map.cy.ts on lines 77..89
    client/cypress/e2e/analysis/filters-map.cy.ts on lines 92..106

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

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

      it('filter by a T1 supplier', () => {
        cy.get('[data-testid="more-filters-button"]').click();
        cy.wait('@fetchT1Suppliers').then((interception) => {
          const firstItem = interception.response.body?.data[0];
          cy.get('[data-testid="tree-select-t1-suppliers-filter"]')
    Severity: Major
    Found in client/cypress/e2e/analysis/filters-map.cy.ts and 3 other locations - About 6 hrs to fix
    client/cypress/e2e/analysis/filters-map.cy.ts on lines 62..74
    client/cypress/e2e/analysis/filters-map.cy.ts on lines 77..89
    client/cypress/e2e/analysis/filters-map.cy.ts on lines 109..121

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

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

      it('filter by an origin and/or some of them', () => {
        cy.get('[data-testid="more-filters-button"]').click();
        cy.wait('@fetchOriginsTrees').then((interception) => {
          const firstItem = interception.response.body?.data[0];
          cy.get('[data-testid="tree-select-origins-filter"]').find('div[role="combobox"]').click();
    Severity: Major
    Found in client/cypress/e2e/analysis/filters-map.cy.ts and 3 other locations - About 6 hrs to fix
    client/cypress/e2e/analysis/filters-map.cy.ts on lines 62..74
    client/cypress/e2e/analysis/filters-map.cy.ts on lines 92..106
    client/cypress/e2e/analysis/filters-map.cy.ts on lines 109..121

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

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

      it('filter by a material and/or some of them', () => {
        cy.get('[data-testid="more-filters-button"]').click();
        cy.wait('@fetchMaterialsTrees').then((interception) => {
          const firstItem = interception.response.body?.data[0];
          cy.get('[data-testid="tree-select-materials-filter"]').find('div[role="combobox"]').click();
    Severity: Major
    Found in client/cypress/e2e/analysis/filters-map.cy.ts and 3 other locations - About 6 hrs to fix
    client/cypress/e2e/analysis/filters-map.cy.ts on lines 77..89
    client/cypress/e2e/analysis/filters-map.cy.ts on lines 92..106
    client/cypress/e2e/analysis/filters-map.cy.ts on lines 109..121

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

    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

                    <a
                      href="https://bit.ly/3ONp1MJ"
                      rel="noreferrer noopener"
                      target="_blank"
                      className="flex-1 p-5 border-2 border-black group hover:bg-orange-500"
    Severity: Major
    Found in marketing/src/containers/methodology/hero/component.tsx and 1 other location - About 6 hrs to fix
    marketing/src/containers/methodology/hero/component.tsx on lines 79..102

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

    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

              {multiple && showSearch && (
                <div className="flex gap-2">
                  <SearchInput
                    value={searchTerm}
                    placeholder={selected === null ? placeholder : null}
    Severity: Major
    Found in client/src/components/tree-select/component.tsx and 1 other location - About 6 hrs to fix
    client/src/components/tree-select/component.tsx on lines 466..488

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

    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

                    <a
                      href="https://bit.ly/3gIJq9n"
                      rel="noreferrer noopener"
                      target="_blank"
                      className="flex-1 p-5 border-2 border-black group hover:bg-orange-500"
    Severity: Major
    Found in marketing/src/containers/methodology/hero/component.tsx and 1 other location - About 6 hrs to fix
    marketing/src/containers/methodology/hero/component.tsx on lines 55..78

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

    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

                  {!selected && (
                    <div className="flex gap-2">
                      <SearchInput
                        value={searchTerm}
                        placeholder={selected === null ? placeholder : null}
    Severity: Major
    Found in client/src/components/tree-select/component.tsx and 1 other location - About 6 hrs to fix
    client/src/components/tree-select/component.tsx on lines 496..518

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

    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

    File scenario-vs-scenario.service.ts has 438 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { Injectable, Logger } from '@nestjs/common';
    import {
      GetActualVsScenarioImpactTableDto,
      GetScenarioVsScenarioImpactTableDto,
      GROUP_BY_VALUES,
    Severity: Minor
    Found in api/src/modules/impact/comparison/scenario-vs-scenario.service.ts - About 6 hrs to fix

      Function Rason has 160 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const Rason: React.FC = () => {
        return (
          <section className="relative py-12 space-y-12 bg-blue-600 bg-cover md:space-y-64 md:py-64">
            <Wrapper>
              <div className="space-y-10 text-white md:space-y-20">
      Severity: Major
      Found in marketing/src/containers/about/reason/component.tsx - About 6 hrs to fix

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

          const originTemplate = useMemo(
            () =>
              !!origins.length && (
                <span>
                  {originArticle}{' '}
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 69..91
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 115..137
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 138..160
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 161..183

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

        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

          const supplierTemplate = useMemo(
            () =>
              !!t1Suppliers.length && (
                <span>
                  {supplierArticle}{' '}
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 69..91
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 92..114
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 138..160
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 161..183

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

        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

          const locationTypeTemplate = useMemo(
            () =>
              !!locationTypes.length && (
                <span>
                  {locationTypeArticle}{' '}
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 69..91
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 92..114
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 115..137
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 138..160

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

        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

          const materialTemplate = useMemo(
            () =>
              !!materials.length && (
                <span>
                  {materialArticle}{' '}
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 92..114
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 115..137
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 138..160
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 161..183

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

        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

          const producerTemplate = useMemo(
            () =>
              !!producers.length && (
                <span>
                  {producerArticle}{' '}
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 69..91
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 92..114
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 115..137
        client/src/containers/analysis-visualization/analysis-dynamic-metadata/component.tsx on lines 161..183

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

        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

        Severity
        Category
        Status
        Source
        Language