Showing 2,206 of 2,206 total issues

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

  {
    title: 'Trump second impeachment trial don begin',
    type: 'article',
    firstPublished: '2021-02-09T17:17:07.000Z',
    lastPublished: '2022-11-13T13:34:32.000Z',
Severity: Major
Found in src/app/components/Curation/HierarchicalGrid/liveFixtures.js and 3 other locations - About 50 mins to fix
src/app/components/Curation/HierarchicalGrid/liveFixtures.js on lines 16..29
src/app/components/Curation/HierarchicalGrid/liveFixtures.js on lines 30..43
src/app/components/Curation/HierarchicalGrid/mediaFixtures.js on lines 15..27

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

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

export const testsThatFollowSmokeTestConfigForAMPOnly = ({
  service,
  pageType,
}) =>
  describe(`No testsThatFollowSmokeTestConfigForAMPOnly for ${service} ${pageType}`, () => {});
Severity: Major
Found in cypress/e2e/123PlaygroundForTests/testsForAMPOnly.js and 2 other locations - About 50 mins to fix
cypress/e2e/123PlaygroundForTests/tests.js on lines 7..8
cypress/e2e/123PlaygroundForTests/testsForCanonicalOnly.js on lines 7..11

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

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.each`
    service      | variant  | isBff    | expected
    ${'hausa'}   | ${null}  | ${false} | ${'/hausa/mostread.json'}
    ${'hausa'}   | ${null}  | ${true}  | ${'/fd/simorgh-bff?pageType=mostRead&service=hausa'}
    ${'serbian'} | ${'lat'} | ${false} | ${'/serbian/mostread/lat.json'}
src/app/legacy/components/ScrollablePromo/PromoList/index.jsx on lines 45..68
src/app/legacy/psammead/psammead-consent-banner/src/index.jsx on lines 146..216

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

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

      expect(
        container.getElementsByTagName('amp-img')[0].getAttribute('src'),
      ).toEqual(
        `https://ichef.bbci.co.uk/ace/ws/660${cpsItem.indexImage.path}.webp`,
      );
Severity: Minor
Found in src/app/legacy/containers/StoryPromo/index.test.jsx and 1 other location - About 50 mins to fix
src/app/legacy/containers/StoryPromo/index.test.jsx on lines 267..271

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

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

      expect(
        container.getElementsByTagName('img')[0].getAttribute('src'),
      ).toEqual(
        `https://ichef.bbci.co.uk/ace/ws/660${cpsItem.indexImage.path}.webp`,
      );
Severity: Minor
Found in src/app/legacy/containers/StoryPromo/index.test.jsx and 1 other location - About 50 mins to fix
src/app/legacy/containers/StoryPromo/index.test.jsx on lines 284..288

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

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 withIds = {
  content: {
    groups: [
      {
        items: [
src/app/routes/utils/sharedDataTransformers/addIdsToGroups/index.test.js on lines 52..69

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

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 expected = {
      content: {
        groups: [
          {
            items: [
src/app/routes/utils/sharedDataTransformers/addIdsToGroups/index.test.js on lines 24..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 52.

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('should return location href', () => {
    setWindowValue('location', {
      href: 'https://href.com',
    });

Severity: Major
Found in src/app/lib/analyticsUtils/index.test.js and 3 other locations - About 50 mins to fix
src/app/lib/analyticsUtils/index.test.js on lines 255..263
src/app/lib/analyticsUtils/index.test.js on lines 350..356
src/app/lib/analyticsUtils/index.test.js on lines 581..589

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

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 return null if langage isnt set', () => {
    setWindowValue('navigator', {
      language: null,
    });

Severity: Minor
Found in src/app/lib/analyticsUtils/index.test.js and 1 other location - About 50 mins to fix
src/app/lib/analyticsUtils/index.test.js on lines 340..348

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

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 return null if href isnt set', () => {
    setWindowValue('location', {
      href: null,
    });

Severity: Minor
Found in src/app/lib/analyticsUtils/index.test.js and 1 other location - About 50 mins to fix
src/app/lib/analyticsUtils/index.test.js on lines 265..273

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

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 legacyScripts = (
    <>
      <script src="legacy.main.js" />
      <script src="legacy.vendor.js" />
      <script src="legacy.igbo.js" />
Severity: Minor
Found in src/server/Document/component.test.jsx and 1 other location - About 50 mins to fix
src/server/Document/component.test.jsx on lines 19..25

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

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

  describe(`Chartbeat analytics`, () => {
    it('should have a script with src value set to chartbeat source', () => {
      cy.hasScriptWithChartbeatSrc();
    });
    it('should have chartbeat config set to window object', () => {
Severity: Minor
Found in cypress/e2e/pages/homePage/testsForCanonicalOnly.js and 1 other location - About 50 mins to fix
cypress/e2e/pages/mediaAssetPage/testsForCanonicalOnly.js on lines 12..19

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

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 { pageData } = await getInitialData({
      path: 'mock-on-demand-tv-path',
      pageType: MEDIA_PAGE,
      toggles: {
        recentVideoEpisodes: { enabled: false, value: 4 },
Severity: Minor
Found in src/app/routes/onDemandTV/getInitialData/index.test.js and 1 other location - About 50 mins to fix
src/app/routes/onDemandTV/getInitialData/index.test.js on lines 69..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 52.

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 modernScripts = (
    <>
      <script src="modern.main.js" />
      <script src="modern.vendor.js" />
      <script src="modern.igbo.js" />
Severity: Minor
Found in src/server/Document/component.test.jsx and 1 other location - About 50 mins to fix
src/server/Document/component.test.jsx on lines 12..18

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

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 { pageData } = await getInitialData({
      path: 'mock-on-demand-tv-path',
      pageType: MEDIA_PAGE,
      toggles: {
        recentVideoEpisodes: { enabled: true, value: 3 },
Severity: Minor
Found in src/app/routes/onDemandTV/getInitialData/index.test.js and 1 other location - About 50 mins to fix
src/app/routes/onDemandTV/getInitialData/index.test.js on lines 22..28

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

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

  indonesia: {
    articles: 'Sept 2019',
    frontPage: '26th Feb 2020',
    liveRadio: '30th Sept 2019',
    mediaAssetPage: '5th March 2020',
Severity: Major
Found in scripts/releaseInfo/launchDates.js and 10 other locations - About 50 mins to fix
scripts/releaseInfo/launchDates.js on lines 2..12
scripts/releaseInfo/launchDates.js on lines 25..35
scripts/releaseInfo/launchDates.js on lines 36..46
scripts/releaseInfo/launchDates.js on lines 57..67
scripts/releaseInfo/launchDates.js on lines 84..94
scripts/releaseInfo/launchDates.js on lines 117..127
scripts/releaseInfo/launchDates.js on lines 157..167
scripts/releaseInfo/launchDates.js on lines 203..213
scripts/releaseInfo/launchDates.js on lines 300..310
scripts/releaseInfo/launchDates.js on lines 370..380

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

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

  tigrinya: {
    articles: 'Sept 2019',
    frontPage: '5th Feb 2020',
    liveRadio: '30th Sept 2019',
    mediaAssetPage: '6th Feb 2020',
Severity: Major
Found in scripts/releaseInfo/launchDates.js and 10 other locations - About 50 mins to fix
scripts/releaseInfo/launchDates.js on lines 2..12
scripts/releaseInfo/launchDates.js on lines 25..35
scripts/releaseInfo/launchDates.js on lines 36..46
scripts/releaseInfo/launchDates.js on lines 57..67
scripts/releaseInfo/launchDates.js on lines 84..94
scripts/releaseInfo/launchDates.js on lines 117..127
scripts/releaseInfo/launchDates.js on lines 137..147
scripts/releaseInfo/launchDates.js on lines 157..167
scripts/releaseInfo/launchDates.js on lines 203..213
scripts/releaseInfo/launchDates.js on lines 300..310

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

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

  afaanoromoo: {
    articles: 'Sept 2019',
    frontPage: '5th Feb 2020',
    liveRadio: '30th Sept 2019',
    mediaAssetPage: '6th Feb 2020',
Severity: Major
Found in scripts/releaseInfo/launchDates.js and 10 other locations - About 50 mins to fix
scripts/releaseInfo/launchDates.js on lines 25..35
scripts/releaseInfo/launchDates.js on lines 36..46
scripts/releaseInfo/launchDates.js on lines 57..67
scripts/releaseInfo/launchDates.js on lines 84..94
scripts/releaseInfo/launchDates.js on lines 117..127
scripts/releaseInfo/launchDates.js on lines 137..147
scripts/releaseInfo/launchDates.js on lines 157..167
scripts/releaseInfo/launchDates.js on lines 203..213
scripts/releaseInfo/launchDates.js on lines 300..310
scripts/releaseInfo/launchDates.js on lines 370..380

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

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

  hindi: {
    articles: 'Sept 2019',
    frontPage: '2nd April 2020',
    liveRadio: '4th Feb 2020',
    mediaAssetPage: '',
Severity: Major
Found in scripts/releaseInfo/launchDates.js and 10 other locations - About 50 mins to fix
scripts/releaseInfo/launchDates.js on lines 2..12
scripts/releaseInfo/launchDates.js on lines 25..35
scripts/releaseInfo/launchDates.js on lines 36..46
scripts/releaseInfo/launchDates.js on lines 57..67
scripts/releaseInfo/launchDates.js on lines 84..94
scripts/releaseInfo/launchDates.js on lines 137..147
scripts/releaseInfo/launchDates.js on lines 157..167
scripts/releaseInfo/launchDates.js on lines 203..213
scripts/releaseInfo/launchDates.js on lines 300..310
scripts/releaseInfo/launchDates.js on lines 370..380

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

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

  nepali: {
    articles: 'Sept 2019',
    frontPage: '5th Feb 2020',
    liveRadio: '14th Jan 2020',
    mediaAssetPage: '5th March 2020',
Severity: Major
Found in scripts/releaseInfo/launchDates.js and 10 other locations - About 50 mins to fix
scripts/releaseInfo/launchDates.js on lines 2..12
scripts/releaseInfo/launchDates.js on lines 25..35
scripts/releaseInfo/launchDates.js on lines 36..46
scripts/releaseInfo/launchDates.js on lines 57..67
scripts/releaseInfo/launchDates.js on lines 84..94
scripts/releaseInfo/launchDates.js on lines 117..127
scripts/releaseInfo/launchDates.js on lines 137..147
scripts/releaseInfo/launchDates.js on lines 157..167
scripts/releaseInfo/launchDates.js on lines 300..310
scripts/releaseInfo/launchDates.js on lines 370..380

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

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