Showing 2,206 of 2,206 total issues

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

test('format month', () => {
  const expected =
    'มกราคม ม.ค._กุมภาพันธ์ ก.พ._มีนาคม มี.ค._เมษายน เม.ย._พฤษภาคม พ.ค._มิถุนายน มิ.ย._กรกฎาคม ก.ค._สิงหาคม ส.ค._กันยายน ก.ย._ตุลาคม ต.ค._พฤศจิกายน พ.ย._ธันวาคม ธ.ค.'.split(
      '_'
    );
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/th.test.js and 21 other locations - About 3 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

test('format month', () => {
  const expected =
    'January Jan_February Feb_March Mar_April Apr_May May_June Jun_July Jul_August Aug_September Sep_October Oct_November Nov_December Dec'.split(
      '_'
    );
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

test('format month', () => {
  const expected =
    'ਜਨਵਰੀ ਜਨਵਰੀ_ਫ਼ਰਵਰੀ ਫ਼ਰਵਰੀ_ਮਾਰਚ ਮਾਰਚ_ਅਪ੍ਰੈਲ ਅਪ੍ਰੈਲ_ਮਈ ਮਈ_ਜੂਨ ਜੂਨ_ਜੁਲਾਈ ਜੁਲਾਈ_ਅਗਸਤ ਅਗਸਤ_ਸਤੰਬਰ ਸਤੰਬਰ_ਅਕਤੂਬਰ ਅਕਤੂਬਰ_ਨਵੰਬਰ ਨਵੰਬਰ_ਦਸੰਬਰ ਦਸੰਬਰ'.split(
      '_'
    );
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

test('format month', () => {
  const expected =
    'январ янв_феврал фев_март мар_апрел апр_май май_июн июн_июл июл_август авг_сентябр сен_октябр окт_ноябр ноя_декабр дек'.split(
      '_'
    );
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/uz.test.js and 21 other locations - About 3 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

test('format month', () => {
  const expected =
    'січень січ_лютий лют_березень бер_квітень квіт_травень трав_червень черв_липень лип_серпень серп_вересень вер_жовтень жовт_листопад лист_грудень груд'.split(
      '_'
    );
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/uk.test.js and 21 other locations - About 3 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

test('format month', () => {
  const expected =
    'januar jan._februar feb._mart mar._april apr._maj maj_jun jun_jul jul_avgust avg._septembar sep._oktobar okt._novembar nov._decembar dec.'.split(
      '_'
    );
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/sr.test.js and 21 other locations - About 3 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

test('format month', () => {
  const expected =
    'જાન્યુઆરી જાન્યુ._ફેબ્રુઆરી ફેબ્રુ._માર્ચ માર્ચ_એપ્રિલ એપ્રિ._મે મે_જૂન જૂન_જુલાઈ જુલા._ઓગસ્ટ ઑગ._સપ્ટેમ્બર સપ્ટે._ઑક્ટોબર ઑક્ટ્._નવેમ્બર નવે._ડિસેમ્બર ડિસે.'.split(
      '_'
    );
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/gu.test.js and 21 other locations - About 3 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

test('format month', () => {
  const expected =
    'जानेवारी जाने._फेब्रुवारी फेब्रु._मार्च मार्च._एप्रिल एप्रि._मे मे._जून जून._जुलै जुलै._ऑगस्ट ऑग._सप्टेंबर सप्टें._ऑक्टोबर ऑक्टो._नोव्हेंबर नोव्हें._डिसेंबर डिसें.'.split(
      '_'
    );
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/mr.test.js and 21 other locations - About 3 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

  describe('format month', () => {
    const expected =
      '一月 1月_二月 2月_三月 3月_四月 4月_五月 5月_六月 6月_七月 7月_八月 8月_九月 9月_十月 10月_十一月 11月_十二月 12月'.split(
        '_'
      );
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126

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

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

test('format month', () => {
  const expected =
    'ජනවාරි ජන_පෙබරවාරි පෙබ_මාර්තු මාර්_අප්‍රේල් අප්_මැයි මැයි_ජූනි ජූනි_ජූලි ජූලි_අගෝස්තු අගෝ_සැප්තැම්බර් සැප්_ඔක්තෝබර් ඔක්_නොවැම්බර් නොවැ_දෙසැම්බර් දෙසැ'.split(
      '_'
    );
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/si.test.js and 21 other locations - About 3 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

test('format month', () => {
  const expected =
    'январь янв_февраль фев_март март_апрель апр_май май_июнь июнь_июль июль_август авг_сентябрь сен_октябрь окт_ноябрь ноя_декабрь дек'.split(
      '_'
    );
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ky.test.js and 21 other locations - About 3 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

test('format month', () => {
  const expected =
    'Jenụwarị Jen_Febụwarị Feb_Maachị Maa_Eprel Epr_Mee Mee_Juun Juu_Julaị Jul_Ọgọọst Ọgọ_Septemba Sep_Ọktọba Ọkt_Nọvemba Nov_Disemba Dis'.split(
      '_'
    );
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ig.test.js and 21 other locations - About 3 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 145..158
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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

test('format month', () => {
  const expected =
    'января янв._февраля февр._марта март_апреля апр._мая май_июня июнь_июля июль_августа авг._сентября сент._октября окт._ноября нояб._декабря дек.'.split(
      '_'
    );
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ru.test.js and 21 other locations - About 3 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 125..138
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 112..125
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 143..156
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 109..122
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 110..123
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 111..124
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 106..119
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 167..180
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 75..88
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 116..129
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 113..126
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 115..128

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

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 standardLinkItem = {
  name: 'Standard promo with summary',
  summary: 'Summary text',
  indexImage: {
    id: 63692548,
Severity: Major
Found in src/app/legacy/containers/StoryPromo/helpers/fixtureData.js and 2 other locations - About 3 hrs to fix
src/app/legacy/containers/StoryPromo/helpers/fixtureData.js on lines 144..163
src/app/legacy/containers/StoryPromo/helpers/fixtureData.js on lines 175..194

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

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 featureLinkItem = {
  name: 'Feature promo with summary',
  summary: 'Summary text for feature Promo',
  indexImage: {
    id: 63692548,
Severity: Major
Found in src/app/legacy/containers/StoryPromo/helpers/fixtureData.js and 2 other locations - About 3 hrs to fix
src/app/legacy/containers/StoryPromo/helpers/fixtureData.js on lines 123..142
src/app/legacy/containers/StoryPromo/helpers/fixtureData.js on lines 175..194

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

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 guideLinkItem = {
  name: 'Story Promo of type Guide',
  summary: 'Guide promo',
  indexImage: {
    id: 63692548,
Severity: Major
Found in src/app/legacy/containers/StoryPromo/helpers/fixtureData.js and 2 other locations - About 3 hrs to fix
src/app/legacy/containers/StoryPromo/helpers/fixtureData.js on lines 123..142
src/app/legacy/containers/StoryPromo/helpers/fixtureData.js on lines 144..163

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    it('should not render Facebook for CPS pages', async () => {
      render(facebookSocialEmbed, {
        pageType: STORY_PAGE,
      });
      expect(
src/app/legacy/psammead/psammead-social-embed/src/index.test.jsx on lines 94..110

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

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 the links', async () => {
    const links = await getPodcastExternalLinks(
      'hausa',
      'p08mlgcb',
      'default',
src/app/routes/onDemandAudio/tempData/podcastExternalLinks/index.test.js on lines 62..84

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    it('should not render Facebook for Correspondent pages', async () => {
      render(facebookSocialEmbed, {
        pageType: CORRESPONDENT_STORY_PAGE,
      });
      expect(
src/app/legacy/psammead/psammead-social-embed/src/index.test.jsx on lines 76..92

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

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 the links with variants', async () => {
    const links = await getPodcastExternalLinks(
      'zhongwen',
      'p02pc9xp',
      'simp',
src/app/routes/onDemandAudio/tempData/podcastExternalLinks/index.test.js on lines 6..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 97.

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