Showing 2,206 of 2,206 total issues

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

test('calendar next week', () => {
  let i;
  let m;
  for (i = 2; i < 7; i += 1) {
    m = moment().add({ d: i });
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/bn.test.js and 38 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 353..376
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 378..401
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 351..374
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 376..399
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 266..290
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 363..387
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 343..366
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 368..392
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 340..363
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 365..389
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 363..386
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 374..397
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 399..423
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 333..356
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 356..379
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 381..405
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 394..417
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 419..443
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 306..329
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 331..354
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 307..330
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 332..356
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 348..371
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 373..397
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 344..368
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 370..394
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 341..365
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 367..391

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

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

test('calendar next week', () => {
  let i;
  let m;
  for (i = 2; i < 7; i += 1) {
    m = moment().add({ d: i });
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/uz.test.js and 38 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 353..376
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 378..401
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 351..374
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 376..399
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 241..264
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 266..290
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 363..387
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 343..366
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 368..392
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 340..363
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 365..389
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 363..386
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 374..397
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 399..423
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 333..356
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 356..379
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 381..405
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 394..417
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 419..443
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 306..329
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 331..354
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 307..330
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 332..356
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 373..397
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 344..368
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 370..394
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 341..365
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 367..391

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

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

test('calendar last week', () => {
  let i;
  let m;

  for (i = 2; i < 7; i += 1) {
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/sw.test.js and 38 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 353..376
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 378..401
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 351..374
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 376..399
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 241..264
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 266..290
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 363..387
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 343..366
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 368..392
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 340..363
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 365..389
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 363..386
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 374..397
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 399..423
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 333..356
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 356..379
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 394..417
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 419..443
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 306..329
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 331..354
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 307..330
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 332..356
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 348..371
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 373..397
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 344..368
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 370..394
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 341..365
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 367..391

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

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

test('calendar next week', () => {
  let i;
  let m;
  for (i = 2; i < 7; i += 1) {
    m = moment().add({ d: i });
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ig.test.js and 38 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 353..376
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 378..401
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 351..374
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 376..399
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 241..264
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 266..290
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 363..387
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 368..392
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 340..363
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 365..389
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 363..386
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 374..397
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 399..423
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 333..356
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 356..379
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 381..405
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 394..417
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 419..443
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 306..329
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 331..354
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 307..330
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 332..356
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 348..371
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 373..397
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 344..368
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 370..394
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 341..365
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 367..391

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

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

test('calendar last week', () => {
  let i;
  let m;

  for (i = 2; i < 7; i += 1) {
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/si.test.js and 38 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 353..376
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 378..401
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 351..374
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 376..399
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 241..264
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 266..290
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 363..387
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 343..366
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 368..392
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 340..363
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 365..389
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 363..386
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 374..397
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 399..423
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 333..356
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 356..379
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 381..405
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 394..417
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 419..443
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 306..329
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 331..354
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 307..330
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 332..356
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 348..371
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 373..397
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 344..368
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 370..394
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 341..365
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 367..391

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

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

test('calendar last week', () => {
  let i;
  let m;

  for (i = 2; i < 7; i += 1) {
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ur.test.js and 38 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 353..376
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 378..401
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 351..374
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 376..399
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 241..264
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 266..290
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 363..387
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 343..366
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 368..392
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 340..363
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 365..389
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 363..386
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 374..397
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 399..423
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 333..356
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 356..379
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 381..405
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 394..417
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 419..443
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 306..329
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 331..354
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 307..330
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 348..371
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 373..397
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 344..368
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 370..394
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 341..365
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 367..391

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

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

test('calendar next week', () => {
  let i;
  let m;
  for (i = 2; i < 7; i += 1) {
    m = moment().add({ d: i });
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ta.test.js and 38 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 353..376
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 378..401
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 351..374
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 376..399
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 241..264
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 266..290
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 363..387
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 343..366
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 368..392
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 340..363
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 365..389
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 363..386
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 374..397
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 399..423
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 333..356
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 356..379
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 381..405
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 419..443
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 306..329
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 331..354
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 307..330
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 332..356
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 348..371
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 373..397
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 344..368
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 370..394
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 341..365
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 367..391

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

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

test('calendar last week', () => {
  let i;
  let m;

  for (i = 2; i < 7; i += 1) {
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 353..376
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 378..401
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 351..374
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 376..399
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 241..264
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 266..290
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 363..387
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 343..366
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 368..392
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 340..363
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 365..389
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 363..386
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 374..397
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 399..423
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 333..356
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 356..379
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 381..405
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 394..417
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 419..443
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 306..329
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 331..354
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 307..330
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 332..356
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 348..371
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 373..397
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 344..368
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 370..394
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 341..365
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 367..391

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

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

test('calendar next week', () => {
  let i;
  let m;
  for (i = 2; i < 7; i += 1) {
    m = moment().add({ d: i });
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/az.test.js and 38 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 353..376
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 378..401
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 376..399
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 241..264
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 266..290
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 363..387
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 343..366
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 368..392
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 340..363
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 365..389
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 363..386
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 374..397
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 399..423
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 333..356
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 356..379
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 381..405
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 394..417
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 419..443
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 306..329
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 331..354
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 307..330
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 332..356
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 348..371
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 373..397
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 344..368
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 370..394
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 341..365
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 367..391

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

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

test('calendar next week', () => {
  let i;
  let m;
  for (i = 2; i < 7; i += 1) {
    m = moment().add({ d: i });
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 353..376
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 378..401
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 351..374
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 376..399
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 241..264
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 266..290
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 363..387
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 343..366
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 368..392
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 340..363
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 365..389
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 363..386
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 374..397
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 399..423
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 333..356
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 356..379
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 381..405
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 394..417
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 419..443
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 306..329
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 331..354
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 307..330
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 332..356
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 348..371
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 373..397
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 344..368
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 370..394
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 341..365
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 367..391

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

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

test('calendar next week', () => {
  let i;
  let m;
  for (i = 2; i < 7; i += 1) {
    m = moment().add({ d: i });
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/th.test.js and 38 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 353..376
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 378..401
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 351..374
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 376..399
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 241..264
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 266..290
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 363..387
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 343..366
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 368..392
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 340..363
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 365..389
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 363..386
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 374..397
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 399..423
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 333..356
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 356..379
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 381..405
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 394..417
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 419..443
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 331..354
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 307..330
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 332..356
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 348..371
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 373..397
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 344..368
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 370..394
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 341..365
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 367..391

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

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

test('calendar last week', () => {
  let i;
  let m;
  for (i = 2; i < 7; i += 1) {
    m = moment().subtract({ d: i });
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ar.test.js and 38 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 353..376
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 351..374
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 376..399
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 241..264
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 266..290
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 363..387
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 343..366
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 368..392
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 340..363
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 365..389
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 363..386
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 374..397
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 399..423
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 333..356
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 356..379
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 381..405
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 394..417
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 419..443
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 306..329
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 331..354
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 307..330
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 332..356
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 348..371
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 373..397
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 344..368
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 370..394
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 341..365
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 367..391

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

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

test('calendar last week', () => {
  let i;
  let m;

  for (i = 2; i < 7; i += 1) {
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/uz.test.js and 38 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 353..376
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 378..401
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 351..374
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 376..399
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 241..264
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 266..290
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 363..387
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 343..366
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 368..392
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 340..363
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 365..389
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 363..386
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 374..397
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 399..423
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 333..356
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 356..379
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 381..405
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 394..417
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 419..443
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 306..329
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 331..354
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 307..330
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 332..356
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 348..371
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 344..368
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 370..394
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 341..365
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 367..391

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

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

test('calendar next week', () => {
  let i;
  let m;
  for (i = 2; i < 7; i += 1) {
    m = moment().add({ d: i });
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ky.test.js and 38 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 353..376
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 378..401
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 351..374
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 376..399
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 241..264
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 266..290
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 363..387
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 343..366
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 368..392
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 365..389
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 363..386
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 374..397
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 399..423
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 333..356
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 356..379
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 381..405
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 394..417
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 419..443
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 306..329
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 331..354
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 307..330
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 332..356
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 348..371
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 373..397
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 344..368
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 370..394
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 341..365
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 367..391

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

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

test('calendar last week', () => {
  let i;
  let m;

  for (i = 2; i < 7; i += 1) {
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ky.test.js and 38 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 353..376
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 378..401
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 351..374
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 376..399
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 241..264
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 266..290
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 363..387
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 343..366
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 368..392
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 340..363
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 338..361
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 363..386
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 374..397
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 399..423
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 344..367
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 369..393
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 333..356
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 347..370
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 372..396
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 356..379
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 381..405
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 394..417
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 419..443
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 306..329
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 331..354
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 307..330
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 332..356
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 348..371
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 373..397
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 344..368
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 370..394
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 341..365
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 367..391

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

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

const chartEmbedImages = {
  blocks: [
    {
      type: 'image',
      model: {
Severity: Major
Found in src/app/components/Embeds/EmbedImages/fixtures.ts - About 1 day to fix

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

    test('calendar next week', () => {
      var i, m;
      for (i = 2; i < 7; i += 1) {
        m = moment().add({ d: i });
        assert.equal(
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/hi.test.js and 1 other location - About 1 day to fix
    src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 365..388

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

    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

    test('calendar last week', () => {
      var i, m;
    
      for (i = 2; i < 7; i += 1) {
        m = moment().subtract({ d: i });
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/hi.test.js and 1 other location - About 1 day to fix
    src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 341..363

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

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

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

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

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

    Refactorings

    Further Reading

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

    /* eslint-disable no-console */
    
    import React from 'react';
    import {
      renderHook,
    Severity: Major
    Found in src/app/hooks/useViewTracker/index.test.jsx - About 1 day to fix

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

      storiesOf('Components/StoryPromo/StoryPromoListBase', module)
        .addDecorator(withKnobs)
        .add(
          'default',
          () => (
      src/app/legacy/psammead/psammead-story-promo-list/src/index.stories.jsx on lines 48..80

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

      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