Showing 2,206 of 2,206 total issues

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

  it('should hit the correct outside UK and UK cookie oven endpoints when on the test environment', () => {
    window.location = new URL('https://www.test.bbc.com');

    setCookieOven('value');

src/app/legacy/containers/ConsentBanner/useConsentBanners/setCookieOven.test.js on lines 41..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 102.

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

import React, { useContext } from 'react';
import {
  Global,
  ThemeProvider as EmotionThemeProvider,
  Theme,
Severity: Minor
Found in src/app/components/ThemeProvider/withThemeProvider.tsx - About 3 hrs to fix

    Function getTranslations has 83 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const getTranslations = (
      provider: ConsentBannerProviders,
      translations: Translations,
      externalLinkText: string,
    ) => {
    Severity: Major
    Found in src/app/components/EmbedConsentBanner/ConsentBanner.tsx - About 3 hrs to fix

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

      test('format week', () => {
        const expected =
          'ਐਤਵਾਰ ਐਤ ਐਤ_ਸੋਮਵਾਰ ਸੋਮ ਸੋਮ_ਮੰਗਲਵਾਰ ਮੰਗਲ ਮੰਗਲ_ਬੁਧਵਾਰ ਬੁਧ ਬੁਧ_ਵੀਰਵਾਰ ਵੀਰ ਵੀਰ_ਸ਼ੁੱਕਰਵਾਰ ਸ਼ੁਕਰ ਸ਼ੁਕਰ_ਸ਼ਨੀਚਰਵਾਰ ਸ਼ਨੀ ਸ਼ਨੀ'.split(
            '_'
          );
      src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
      src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
      src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
      src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
      src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..143

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

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

      test('format week', () => {
        const expected =
          'ஞாயிற்றுக்கிழமை ஞாயிறு ஞா_திங்கட்கிழமை திங்கள் தி_செவ்வாய்கிழமை செவ்வாய் செ_புதன்கிழமை புதன் பு_வியாழக்கிழமை வியாழன் வி_வெள்ளிக்கிழமை வெள்ளி வெ_சனிக்கிழமை சனி ச'.split(
            '_'
          );
      Severity: Major
      Found in src/app/legacy/psammead/psammead-locales/moment/ta.test.js and 22 other locations - About 3 hrs to fix
      src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
      src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
      src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
      src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
      src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..143

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

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

      test('format week', () => {
        const expected =
          'อาทิตย์ อาทิตย์ อา._จันทร์ จันทร์ จ._อังคาร อังคาร อ._พุธ พุธ พ._พฤหัสบดี พฤหัส พฤ._ศุกร์ ศุกร์ ศ._เสาร์ เสาร์ ส.'.split(
            '_'
          );
      Severity: Major
      Found in src/app/legacy/psammead/psammead-locales/moment/th.test.js and 22 other locations - About 3 hrs to fix
      src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
      src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
      src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
      src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
      src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..143

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

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

      test('format week', () => {
        const expected =
          'nedelja ned. ne_ponedeljak pon. po_utorak uto. ut_sreda sre. sr_četvrtak čet. če_petak pet. pe_subota sub. su'.split(
            '_'
          );
      Severity: Major
      Found in src/app/legacy/psammead/psammead-locales/moment/sr.test.js and 22 other locations - About 3 hrs to fix
      src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
      src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
      src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
      src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
      src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
      src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..143

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

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

      test('format week', () => {
        const expected =
          'રવિવાર રવિ ર_સોમવાર સોમ સો_મંગળવાર મંગળ મં_બુધ્વાર બુધ્ બુ_ગુરુવાર ગુરુ ગુ_શુક્રવાર શુક્ર શુ_શનિવાર શનિ શ'.split(
            '_'
          );
      Severity: Major
      Found in src/app/legacy/psammead/psammead-locales/moment/gu.test.js and 22 other locations - About 3 hrs to fix
      src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
      src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
      src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
      src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
      src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
      src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..143

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

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

      test('format week', () => {
        const expected =
          'Sunday Sun Su_Monday Mon Mo_Tuesday Tue Tu_Wednesday Wed We_Thursday Thu Th_Friday Fri Fr_Saturday Sat Sa'.split(
            '_'
          );
      src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
      src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
      src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
      src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
      src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
      src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..143

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

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

      test('format week', () => {
        const expected =
          'Àìkú Àìk Àì_Ajé Ajé Aj_Ìsẹ́gun Ìsẹ́ Ìs_Ọjọ́rú Ọjr Ọr_Ọjọ́bọ Ọjb Ọb_Ẹtì Ẹtì Ẹt_Àbámẹ́ta Àbá Àb'.split(
            '_'
          );
      Severity: Major
      Found in src/app/legacy/psammead/psammead-locales/moment/yo.test.js and 22 other locations - About 3 hrs to fix
      src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
      src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
      src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
      src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
      src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
      src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..143

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

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

      test('format week', () => {
        const expected =
          'रविवार रवि र_सोमवार सोम सो_मंगळवार मंगळ मं_बुधवार बुध बु_गुरूवार गुरू गु_शुक्रवार शुक्र शु_शनिवार शनि श'.split(
            '_'
          );
      Severity: Major
      Found in src/app/legacy/psammead/psammead-locales/moment/mr.test.js and 22 other locations - About 3 hrs to fix
      src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
      src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
      src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
      src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
      src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
      src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..143

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

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

      test('format week', () => {
        const expected =
          'неділя нд нд_понеділок пн пн_вівторок вт вт_середа ср ср_четвер чт чт_п’ятниця пт пт_субота сб сб'.split(
            '_'
          );
      Severity: Major
      Found in src/app/legacy/psammead/psammead-locales/moment/uk.test.js and 22 other locations - About 3 hrs to fix
      src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
      src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
      src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
      src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
      src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..143

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

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

      test('format week', () => {
        const expected =
          'Sunday Sun Su_Monday Mon Mo_Tuesday Tue Tu_Wednesday Wed We_Thursday Thu Th_Friday Fri Fr_Saturday Sat Sa'.split(
            '_'
          );
      src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
      src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
      src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
      src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
      src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
      src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..143

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

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

      test('format week', () => {
        const expected =
          'domingo dom do_segunda-feira seg 2ª_terça-feira ter 3ª_quarta-feira qua 4ª_quinta-feira qui 5ª_sexta-feira sex 6ª_sábado sáb sá'.split(
            '_'
          );
      src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
      src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
      src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
      src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
      src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
      src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..143

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

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

      test('format week', () => {
        const expected =
          'недеља нед. не_понедељак пон. по_уторак уто. ут_среда сре. ср_четвртак чет. че_петак пет. пе_субота суб. су'.split(
            '_'
          );
      src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
      src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
      src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
      src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
      src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
      src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..143

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

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

        describe('format week', () => {
          const expected =
            '星期日 週日 日_星期一 週一 一_星期二 週二 二_星期三 週三 三_星期四 週四 四_星期五 週五 五_星期六 週六 六'.split(
              '_'
            );
      src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
      src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
      src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
      src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
      src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
      src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141

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

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

      test('format week', () => {
        const expected =
          'Bazar Baz Bz_Bazar ertəsi BzE BE_Çərşənbə axşamı ÇAx ÇA_Çərşənbə Çər Çə_Cümə axşamı CAx CA_Cümə Cüm Cü_Şənbə Şən Şə'.split(
            '_'
          );
      Severity: Major
      Found in src/app/legacy/psammead/psammead-locales/moment/az.test.js and 22 other locations - About 3 hrs to fix
      src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
      src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
      src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
      src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
      src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..143

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

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

      test('format week', () => {
        const expected =
          'الأحد أحد ح_الإثنين إثنين ن_الثلاثاء ثلاثاء ث_الأربعاء أربعاء ر_الخميس خميس خ_الجمعة جمعة ج_السبت سبت س'.split(
            '_'
          );
      Severity: Major
      Found in src/app/legacy/psammead/psammead-locales/moment/ar.test.js and 22 other locations - About 3 hrs to fix
      src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
      src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
      src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
      src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
      src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..143

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

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

      test('format week', () => {
        const expected =
          'आइतबार आइत. आ._सोमबार सोम. सो._मङ्गलबार मङ्गल. मं._बुधबार बुध. बु._बिहिबार बिहि. बि._शुक्रबार शुक्र. शु._शनिबार शनि. श.'.split(
            '_'
          );
      Severity: Major
      Found in src/app/legacy/psammead/psammead-locales/moment/ne.test.js and 22 other locations - About 3 hrs to fix
      src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
      src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
      src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
      src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
      src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
      src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..143

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

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

      test('format week', () => {
        const expected =
          'domingo dom. do_lunes lun. lu_martes mar. ma_miércoles mié. mi_jueves jue. ju_viernes vie. vi_sábado sáb. sá'.split(
            '_'
          );
      Severity: Major
      Found in src/app/legacy/psammead/psammead-locales/moment/es.test.js and 22 other locations - About 3 hrs to fix
      src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 137..150
      src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 140..153
      src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 127..140
      src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 158..171
      src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 124..137
      src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 125..138
      src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 284..297
      src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 131..144
      src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 126..139
      src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 121..134
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 182..195
      src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 90..103
      src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 157..170
      src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 128..141
      src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 130..143

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

      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