Showing 2,206 of 2,206 total issues

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

      <Grid
        dir={dir}
        columns={{
          group0: 6,
          group1: 6,
Severity: Major
Found in src/app/legacy/psammead/psammead-grid/src/index.stories.jsx and 2 other locations - About 2 hrs to fix
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1618..1685
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1881..2112

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

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

        <Grid
          dir={dir}
          item
          columns={{
            group0: 2,
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 604..618
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 619..633
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 634..648
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 649..663
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 964..978
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 979..993
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 994..1008
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1009..1023
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1024..1038
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1039..1053
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1054..1068
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1069..1083
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1084..1098
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1126..1140
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1141..1155
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1171..1185
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1186..1200
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1201..1215
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1216..1230
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1231..1245

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

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

        <Grid
          dir={dir}
          item
          columns={{
            group0: 2,
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 604..618
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 619..633
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 634..648
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 649..663
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 964..978
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 979..993
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1009..1023
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1024..1038
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1039..1053
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1054..1068
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1069..1083
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1084..1098
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1126..1140
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1141..1155
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1156..1170
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1171..1185
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1186..1200
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1201..1215
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1216..1230
src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1231..1245

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

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

          if (paragraphBlock) {
            const descriptionHtml = pathOr({}, ['text'], paragraphBlock);
            // strip html from the description, so we get description as plain text
            const elem = document.createElement('div');
            elem.innerHTML = descriptionHtml;
Severity: Major
Found in cypress/e2e/pages/storyPage/tests.js and 1 other location - About 2 hrs to fix
cypress/e2e/pages/storyPage/tests.js on lines 47..54

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

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

    const { getByText, container } = render(
      <ServiceContextProvider service="mundo">
        <CpsOnwardJourney
          labelId="heading-label"
          promoListComponent={promoListComponent}
Severity: Major
Found in src/app/legacy/containers/CpsOnwardJourney/index.test.jsx and 1 other location - About 2 hrs to fix
src/app/legacy/containers/CpsOnwardJourney/index.test.jsx on lines 90..100

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

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

          if (descriptionBlock) {
            const descriptionHtml = pathOr({}, ['text'], descriptionBlock);
            // strip html from the description, so we get description as plain text
            const elem = document.createElement('div');
            elem.innerHTML = descriptionHtml;
Severity: Major
Found in cypress/e2e/pages/storyPage/tests.js and 1 other location - About 2 hrs to fix
cypress/e2e/pages/storyPage/tests.js on lines 68..75

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

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

    const { getByText, container } = render(
      <ServiceContextProvider service="mundo">
        <CpsOnwardJourney
          labelId="heading-label"
          promoListComponent={promoListComponent}
Severity: Major
Found in src/app/legacy/containers/CpsOnwardJourney/index.test.jsx and 1 other location - About 2 hrs to fix
src/app/legacy/containers/CpsOnwardJourney/index.test.jsx on lines 66..76

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

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 index.jsx has 262 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { useContext } from 'react';
import styled from '@emotion/styled';
import GRID from '#psammead/psammead-grid/src';
import {
  GEL_GROUP_2_SCREEN_WIDTH_MAX,
Severity: Minor
Found in src/app/legacy/components/Grid/index.jsx - About 2 hrs to fix

    File index.test.tsx has 262 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React from 'react';
    import { RequestContextProvider } from '../../contexts/RequestContext';
    import { ToggleContextProvider } from '../../contexts/ToggleContext';
    import { data as pidginMostReadData } from '../../../../data/pidgin/mostRead/index.json';
    import serbianLatMostReadData from '../../../../data/serbian/mostRead/lat.json';
    Severity: Minor
    Found in src/app/components/MostRead/index.test.tsx - About 2 hrs to fix

      Function 372 has 57 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  372: function(e) {
                      "use strict";
                      function t(e) {
                          return "function" == typeof e
                      }
      Severity: Major
      Found in public/vendor/cwr.js - About 2 hrs to fix

        Function test has 57 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                it('should be displayed if the toggle is on, and shows the expected number of items', function test() {
                  cy.fixture(`toggles/${service}.json`).then(toggles => {
                    const recentEpisodesEnabled = path(
                      ['recentVideoEpisodes', 'enabled'],
                      toggles,
        Severity: Major
        Found in cypress/e2e/pages/onDemandTV/tests.js - About 2 hrs to fix

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

            it('should return a variation of null when the client is ready but has timed out', () => {
              useDecisionSpy.mockReturnValue([{ variationKey: null }, true, true]);
          
              const { result } = renderHook(() =>
                useOptimizelyVariation('correct_experiment_id', {}, isClientSide),
          Severity: Major
          Found in src/app/hooks/useOptimizelyVariation/index.test.jsx and 2 other locations - About 2 hrs to fix
          src/app/hooks/useOptimizelyVariation/index.test.jsx on lines 23..31
          src/app/hooks/useOptimizelyVariation/index.test.jsx on lines 43..51

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

          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

              const { container } = render(
                <Brand
                  product="Default Brand Name"
                  serviceLocalisedName="Service"
                  svgHeight={24}
          Severity: Major
          Found in src/app/legacy/psammead/psammead-brand/src/index.test.jsx and 1 other location - About 2 hrs to fix
          src/app/legacy/psammead/psammead-brand/src/index.test.jsx on lines 91..103

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

          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

          const getObserverInstance = element => {
            try {
              const [instance] = Array.from(observers).find(([, item]) =>
                item.elements.has(element),
              );
          Severity: Major
          Found in src/app/hooks/useViewTracker/index.test.jsx and 1 other location - About 2 hrs to fix
          src/app/legacy/containers/OptimizelyArticleCompleteTracking/index.test.jsx on lines 42..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 80.

          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

            it('should return a variation of null when a decision is not made', () => {
              useDecisionSpy.mockReturnValue([{ variationKey: null }, true, false]);
          
              const { result } = renderHook(() =>
                useOptimizelyVariation('wrong_experiment_id', {}, isClientSide),
          Severity: Major
          Found in src/app/hooks/useOptimizelyVariation/index.test.jsx and 2 other locations - About 2 hrs to fix
          src/app/hooks/useOptimizelyVariation/index.test.jsx on lines 23..31
          src/app/hooks/useOptimizelyVariation/index.test.jsx on lines 33..41

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

          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

          const getObserverInstance = element => {
            try {
              const [instance] = Array.from(observers).find(([, item]) =>
                item.elements.has(element),
              );
          src/app/hooks/useViewTracker/index.test.jsx on lines 43..53

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

          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

                const { container } = render(
                  <Brand
                    product="Default Brand Name"
                    serviceLocalisedName="Service"
                    svgHeight={24}
          Severity: Major
          Found in src/app/legacy/psammead/psammead-brand/src/index.test.jsx and 1 other location - About 2 hrs to fix
          src/app/legacy/psammead/psammead-brand/src/index.test.jsx on lines 25..37

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

          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

            it('should return a variation of null when the client is not ready and not timed out', () => {
              useDecisionSpy.mockReturnValue([{ variationKey: null }, false, false]);
          
              const { result } = renderHook(() =>
                useOptimizelyVariation('correct_experiment_id', {}, isClientSide),
          Severity: Major
          Found in src/app/hooks/useOptimizelyVariation/index.test.jsx and 2 other locations - About 2 hrs to fix
          src/app/hooks/useOptimizelyVariation/index.test.jsx on lines 33..41
          src/app/hooks/useOptimizelyVariation/index.test.jsx on lines 43..51

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

          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

            it(`should add mvt experiment header names to vary if they are enabled`, async () => {
              mockRouteProps({
                dataResponse: successDataResponse,
              });
              getMvtVaryHeaders.mockReturnValue('mvt-simorgh_dark_mode');
          Severity: Major
          Found in src/server/index.test.jsx and 1 other location - About 2 hrs to fix
          src/server/index.test.jsx on lines 1470..1479

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

          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

            it(`should not add mvt experiment header names to vary if they are not enabled`, async () => {
              mockRouteProps({
                dataResponse: successDataResponse,
              });
              getMvtVaryHeaders.mockReturnValue('');
          Severity: Major
          Found in src/server/index.test.jsx and 1 other location - About 2 hrs to fix
          src/server/index.test.jsx on lines 1457..1468

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

          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