Showing 2,206 of 2,206 total issues

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

test('calendar day', () => {
  const a = moment().hours(12).minutes(0).seconds(0);

  assert.equal(
    moment(a).calendar(),
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ky.test.js and 22 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 318..351
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 316..349
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 206..239
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 306..339
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 312..341
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 339..372
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 298..331
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 322..354
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 367..392
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 271..304
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 276..305
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 313..346
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 306..339

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

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

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

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

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

Refactorings

Further Reading

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

test('calendar day', () => {
  const calendarTime = moment().hours(12).minutes(0).seconds(0);

  assert.equal(
    moment(calendarTime).calendar(),
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/sr.test.js and 22 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 318..351
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 316..349
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 206..239
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 306..339
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 312..341
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 305..338
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 339..372
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 298..331
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 322..354
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 367..392
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 271..304
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 276..305
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 313..346
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 306..339

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

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

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

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

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

Refactorings

Further Reading

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

test('calendar day', () => {
  const a = moment().hours(12).minutes(0).seconds(0);

  assert.equal(
    moment(a).calendar(),
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 318..351
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 316..349
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 206..239
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 306..339
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 312..341
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 305..338
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 339..372
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 298..331
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 322..354
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 367..392
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 271..304
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 276..305
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 313..346
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 306..339

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

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

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

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

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

Refactorings

Further Reading

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

test('calendar day', () => {
  const a = moment().hours(12).minutes(0).seconds(0);

  assert.equal(moment(a).calendar(), 'Taa na 12:00', 'today at the same time');
  assert.equal(
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ig.test.js and 22 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 318..351
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 316..349
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 206..239
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 306..339
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 305..338
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 339..372
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 298..331
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 322..354
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 367..392
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 271..304
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 276..305
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 313..346
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 306..339

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

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

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

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

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

Refactorings

Further Reading

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

  describe('calendar day', () => {
    const calendarTime = moment().hours(12).minutes(0).seconds(0);

    assert.equal(
      moment(calendarTime).calendar(),
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 318..351
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 316..349
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 206..239
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 306..339
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 312..341
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 305..338
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 339..372
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 298..331
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 322..354
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 367..392
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 271..304
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 276..305
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 313..346
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 309..342

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

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

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

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

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

Refactorings

Further Reading

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

test('calendar day', () => {
  const a = moment().hours(12).minutes(0).seconds(0);

  assert.equal(
    moment(a).calendar(),
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/si.test.js and 22 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 318..351
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 316..349
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 206..239
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 306..339
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 312..341
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 305..338
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 339..372
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 298..331
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 322..354
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 367..392
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 271..304
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 276..305
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 313..346
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 306..339

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

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

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

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

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

Refactorings

Further Reading

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

test('calendar day', () => {
  const a = moment().hours(12).minutes(0).seconds(0);

  assert.equal(
    moment(a).calendar(),
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/bn.test.js and 22 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 318..351
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 316..349
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 306..339
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 312..341
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 305..338
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 339..372
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 298..331
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 322..354
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 367..392
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 271..304
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 276..305
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 313..346
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 306..339

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

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

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

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

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

Refactorings

Further Reading

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

test('calendar day', () => {
  const a = moment().hours(12).minutes(0).seconds(0);

  assert.equal(
    moment(a).calendar(),
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/uz.test.js and 22 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 318..351
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 316..349
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 206..239
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 306..339
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 312..341
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 305..338
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 339..372
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 298..331
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 322..354
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 367..392
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 271..304
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 276..305
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 306..339

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

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

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

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

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

Refactorings

Further Reading

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

test('calendar day', () => {
  const a = moment().hours(12).minutes(0).seconds(0);

  assert.equal(moment(a).calendar(), 'இன்று 12:00', 'இன்று 12:00');
  assert.equal(
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ta.test.js and 22 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 318..351
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 316..349
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 206..239
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 306..339
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 312..341
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 305..338
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 339..372
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 298..331
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 322..354
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 271..304
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 276..305
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 313..346
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 306..339

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

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

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

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

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

Refactorings

Further Reading

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

test('calendar day', () => {
  const a = moment().hours(12).minutes(0).seconds(0);

  assert.equal(moment(a).calendar(), 'آج بوقت 12:00', 'today at the same time');
  assert.equal(
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ur.test.js and 22 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 318..351
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 316..349
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 206..239
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 306..339
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 312..341
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 305..338
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 339..372
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 298..331
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 322..354
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 367..392
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 271..304
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 313..346
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 306..339

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

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

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

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

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

Refactorings

Further Reading

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

test('calendar day', () => {
  const a = moment().hours(12).minutes(0).seconds(0);

  assert.equal(
    moment(a).calendar(),
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ar.test.js and 22 other locations - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 316..349
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 206..239
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 306..339
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 312..341
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 305..338
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 303..336
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 339..372
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 298..331
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 312..345
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 307..340
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 322..354
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 367..392
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 271..304
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 276..305
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 313..346
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 309..342
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 306..339

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

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

            xn = function() {
                var e = function(t, n) {
                    return e = Object.setPrototypeOf || {
                        __proto__: []
                    } instanceof Array && function(e, t) {
Severity: Major
Found in public/vendor/cwr.js and 2 other locations - About 1 day to fix
public/vendor/cwr.js on lines 4266..4286
public/vendor/cwr.js on lines 4446..4466

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

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('format meridiem', () => {
  assert.equal(moment([2012, 11, 28, 0, 0]).format('A'), 'ночі', 'night');
  assert.equal(moment([2012, 11, 28, 3, 59]).format('A'), 'ночі', 'night');
  assert.equal(moment([2012, 11, 28, 4, 0]).format('A'), 'ранку', 'morning');
  assert.equal(moment([2012, 11, 28, 11, 59]).format('A'), 'ранку', 'morning');
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/uk.test.js and 1 other location - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 97..106

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

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

            Sn = function() {
                var e = function(t, n) {
                    return e = Object.setPrototypeOf || {
                        __proto__: []
                    } instanceof Array && function(e, t) {
Severity: Major
Found in public/vendor/cwr.js and 2 other locations - About 1 day to fix
public/vendor/cwr.js on lines 4266..4286
public/vendor/cwr.js on lines 4580..4600

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

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

            mn = function() {
                var e = function(t, n) {
                    return e = Object.setPrototypeOf || {
                        __proto__: []
                    } instanceof Array && function(e, t) {
Severity: Major
Found in public/vendor/cwr.js and 2 other locations - About 1 day to fix
public/vendor/cwr.js on lines 4446..4466
public/vendor/cwr.js on lines 4580..4600

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

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('format meridiem', () => {
  assert.equal(moment([2012, 11, 28, 0, 0]).format('A'), 'ночи', 'night');
  assert.equal(moment([2012, 11, 28, 3, 59]).format('A'), 'ночи', 'night');
  assert.equal(moment([2012, 11, 28, 4, 0]).format('A'), 'утра', 'morning');
  assert.equal(moment([2012, 11, 28, 11, 59]).format('A'), 'утра', 'morning');
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ru.test.js and 1 other location - About 1 day to fix
src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 68..77

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

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/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

  describe('calendar next 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/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 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 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/gu.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/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

Severity
Category
Status
Source
Language