Showing 2,650 of 2,650 total issues

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

    describe(
      'Video Player',
      {
        retries: 3,
      },
Severity: Major
Found in cypress/e2e/pages/onDemandTV/tests.js and 1 other location - About 2 days to fix
cypress/e2e/pages/onDemandAudio/tests.js on lines 17..63

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

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 buildParams.test.ts has 1067 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { TOPIC_PAGE } from '#app/routes/utils/pageTypes';
import * as analyticsUtils from '#lib/analyticsUtils';
import { RequestContextProps } from '../../../../contexts/RequestContext';
import { ServiceConfig } from '../../../../models/types/serviceConfig';
import { buildPageATIParams, buildPageATIUrl } from './buildParams';
Severity: Major
Found in src/app/components/ATIAnalytics/params/genericPage/buildParams.test.ts - About 2 days to fix

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

      {
        id: '917068ee',
        type: 'link',
        model: {
          locator: 'urn:bbc:cps:curie:asset:b5c53243-a695-e059-e040-850a02846523',
    src/app/legacy/components/ScrollablePromo/helpers/fixtureData.js on lines 39..147
    src/app/legacy/components/ScrollablePromo/helpers/fixtureData.js on lines 896..1004

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

    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: '9f20a126',
        type: 'link',
        model: {
          locator: 'urn:bbc:content:url-promo:https%3A%2F%2Fwww.bbc.co.uk%2Fpidgin',
    src/app/legacy/components/ScrollablePromo/helpers/fixtureData.js on lines 787..895
    src/app/legacy/components/ScrollablePromo/helpers/fixtureData.js on lines 896..1004

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

    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: 'ba2f138e',
        type: 'link',
        model: {
          locator: 'urn:bbc:content:url-promo:https%3A%2F%2Fwww.bbc.co.uk%2Fmundo',
    src/app/legacy/components/ScrollablePromo/helpers/fixtureData.js on lines 39..147
    src/app/legacy/components/ScrollablePromo/helpers/fixtureData.js on lines 787..895

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

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

    test('from', () => {
      const start = moment([2007, 1, 28]);
      assert.equal(
        start.from(moment([2007, 1, 28]).add({ s: 45 }), true),
        'ከ 1 ደቂቃ',
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/am.test.js and 6 other locations - About 2 days to fix
    src/app/legacy/psammead/psammead-locales/moment/ha.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/om.test.js on lines 23..70
    src/app/legacy/psammead/psammead-locales/moment/ps.test.js on lines 27..74
    src/app/legacy/psammead/psammead-locales/moment/rw.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/so.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/ti.test.js on lines 24..72

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

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

    test('from', () => {
      const start = moment([2007, 1, 28]);
    
      assert.equal(
        start.from(moment([2007, 1, 28]).add({ s: 45 }), true),
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/ti.test.js and 6 other locations - About 2 days to fix
    src/app/legacy/psammead/psammead-locales/moment/am.test.js on lines 23..70
    src/app/legacy/psammead/psammead-locales/moment/ha.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/om.test.js on lines 23..70
    src/app/legacy/psammead/psammead-locales/moment/ps.test.js on lines 27..74
    src/app/legacy/psammead/psammead-locales/moment/rw.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/so.test.js on lines 23..71

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

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

    test('from', () => {
      const start = moment([2007, 1, 28]);
    
      assert.equal(
        start.from(moment([2007, 1, 28]).add({ s: 45 }), true),
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/rw.test.js and 6 other locations - About 2 days to fix
    src/app/legacy/psammead/psammead-locales/moment/am.test.js on lines 23..70
    src/app/legacy/psammead/psammead-locales/moment/ha.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/om.test.js on lines 23..70
    src/app/legacy/psammead/psammead-locales/moment/ps.test.js on lines 27..74
    src/app/legacy/psammead/psammead-locales/moment/so.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/ti.test.js on lines 24..72

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

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

    test('from', () => {
      const start = moment([2007, 1, 28]);
      assert.equal(
        start.from(moment([2007, 1, 28]).add({ s: 45 }), true),
        'Daqiiqaa 1',
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/om.test.js and 6 other locations - About 2 days to fix
    src/app/legacy/psammead/psammead-locales/moment/am.test.js on lines 23..70
    src/app/legacy/psammead/psammead-locales/moment/ha.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/ps.test.js on lines 27..74
    src/app/legacy/psammead/psammead-locales/moment/rw.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/so.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/ti.test.js on lines 24..72

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

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

    test('from', () => {
      const start = moment([2007, 1, 28]);
    
      assert.equal(
        start.from(moment([2007, 1, 28]).add({ s: 45 }), true),
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/ha.test.js and 6 other locations - About 2 days to fix
    src/app/legacy/psammead/psammead-locales/moment/am.test.js on lines 23..70
    src/app/legacy/psammead/psammead-locales/moment/om.test.js on lines 23..70
    src/app/legacy/psammead/psammead-locales/moment/ps.test.js on lines 27..74
    src/app/legacy/psammead/psammead-locales/moment/rw.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/so.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/ti.test.js on lines 24..72

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

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

    test('from', () => {
      const start = moment([2007, 1, 28]);
    
      assert.equal(
        start.from(moment([2007, 1, 28]).add({ s: 45 }), true),
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/so.test.js and 6 other locations - About 2 days to fix
    src/app/legacy/psammead/psammead-locales/moment/am.test.js on lines 23..70
    src/app/legacy/psammead/psammead-locales/moment/ha.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/om.test.js on lines 23..70
    src/app/legacy/psammead/psammead-locales/moment/ps.test.js on lines 27..74
    src/app/legacy/psammead/psammead-locales/moment/rw.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/ti.test.js on lines 24..72

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

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

    test('from', () => {
      const start = moment([2007, 1, 28]);
      assert.equal(
        start.from(moment([2007, 1, 28]).add({ s: 45 }), true),
        '۱ دقیقه',
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/ps.test.js and 6 other locations - About 2 days to fix
    src/app/legacy/psammead/psammead-locales/moment/am.test.js on lines 23..70
    src/app/legacy/psammead/psammead-locales/moment/ha.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/om.test.js on lines 23..70
    src/app/legacy/psammead/psammead-locales/moment/rw.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/so.test.js on lines 23..71
    src/app/legacy/psammead/psammead-locales/moment/ti.test.js on lines 24..72

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

    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.test.tsx has 976 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable no-template-curly-in-string */
    import React from 'react';
    import { articleDataNews } from '#pages/ArticlePage/fixtureData';
    import mapAssetData from '#pages/MediaAssetPage/fixtureData.json';
    import pglAssetData from '#pages/PhotoGalleryPage/fixtureData.json';
    Severity: Major
    Found in src/app/components/ATIAnalytics/index.test.tsx - About 2 days to fix

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

      export default () => {
        it('I can see the brand title', () => {
          const brandTitleEl = document.querySelector('h1 span span:first-child');
      
          expect(brandTitleEl).toBeInTheDocument();
      Severity: Major
      Found in src/integration/pages/podcastPage/commonEpisodeTests.js and 1 other location - About 2 days to fix
      src/integration/pages/onDemandAudioPage/commonEpisodeTests.js on lines 1..45

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

      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

      export default () => {
        it('I can see the brand title', () => {
          const brandTitleEl = document.querySelector('h1 span span:first-child');
      
          expect(brandTitleEl).toBeInTheDocument();
      Severity: Major
      Found in src/integration/pages/onDemandAudioPage/commonEpisodeTests.js and 1 other location - About 2 days to fix
      src/integration/pages/podcastPage/commonEpisodeTests.js on lines 1..45

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

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

      import React from 'react';
      import { BrowserRouter } from 'react-router-dom';
      import { singleTextBlock } from '#models/blocks';
      import { RequestContextProvider } from '#contexts/RequestContext';
      import { ARTICLE_PAGE, LIVE_PAGE } from '#app/routes/utils/pageTypes';
      Severity: Major
      Found in src/app/legacy/containers/MediaPlayer/fixtureData.jsx - About 2 days to fix

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

        import React from 'react';
        import { Helmet } from 'react-helmet';
        import {
          ARTICLE_PAGE,
          FRONT_PAGE,
        Severity: Major
        Found in src/app/components/Metadata/index.test.tsx - About 2 days to fix

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

          export const bylineWithNoAuthor = [
            {
              type: 'contributor',
              model: {
                topicId: '',
          Severity: Major
          Found in src/app/pages/ArticlePage/fixtureData.js and 1 other location - About 2 days to fix
          src/app/pages/ArticlePage/fixtureData.js on lines 732..863

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

          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

          export const bylineWithNoRole = [
            {
              type: 'contributor',
              model: {
                topicId: '',
          Severity: Major
          Found in src/app/pages/ArticlePage/fixtureData.js and 1 other location - About 2 days to fix
          src/app/pages/ArticlePage/fixtureData.js on lines 865..996

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

          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

            describe(`Images`, () => {
              it('should have a picture tag around images', () => {
                cy.get('img').each($img => {
                  const $section = $img.parents('section');
                  if ($section.length > 0) {
          Severity: Major
          Found in cypress/e2e/pages/homePage/testsForCanonicalOnly.js and 1 other location - About 2 days to fix
          cypress/e2e/pages/frontPage/testsForCanonicalOnly.js on lines 6..42

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

          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