Showing 2,206 of 2,206 total issues

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

test('from', () => {
  const start = moment([2007, 1, 28]);
  assert.equal(
    start.from(moment([2007, 1, 28]).add({ s: 44 }), true),
    'unos segundos',
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 152..294
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 136..278
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 141..283
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 140..282
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 142..284
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 139..281
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 143..285
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 141..283
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 173..315
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 139..281
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 140..282
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 146..288
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 141..283
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 141..283
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 136..278
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 197..339
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 105..247
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 110..252
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 143..285
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 143..285

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

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

test('from', () => {
  const start = moment([2007, 1, 28]);
  assert.equal(
    start.from(moment([2007, 1, 28]).add({ s: 44 }), true),
    'фурсат',
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 152..294
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 136..278
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 140..282
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 141..283
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 140..282
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 142..284
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 139..281
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 143..285
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 141..283
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 173..315
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 139..281
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 140..282
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 146..288
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 141..283
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 141..283
src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 136..278
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 197..339
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 105..247
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 110..252
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 143..285

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

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

test('from', () => {
  const start = moment([2007, 1, 28]);
  assert.equal(
    start.from(moment([2007, 1, 28]).add({ s: 44 }), true),
    'hivi punde',
src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 152..294
src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 136..278
src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 140..282
src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 141..283
src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 140..282
src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 142..284
src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 139..281
src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 143..285
src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 141..283
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 173..315
src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 139..281
src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 140..282
src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 146..288
src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 141..283
src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 141..283
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 197..339
src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 105..247
src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 110..252
src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 143..285
src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 143..285

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

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

test('from', () => {
  const start = moment([2007, 1, 28]);
  assert.equal(
    start.from(moment([2007, 1, 28]).add({ s: 44 }), true),
    'bir neçə saniyə',
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/az.test.js and 2 other locations - About 1 wk to fix
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 45..182
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 145..282

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

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

test('from', () => {
  const start = moment([2007, 1, 28]);
  assert.equal(
    start.from(moment([2007, 1, 28]).add({ s: 44 }), true),
    'কয়েক সেকেন্ড',
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/bn.test.js and 2 other locations - About 1 wk to fix
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 155..292
src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 145..282

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

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

  describe('from', () => {
    const start = moment([2007, 1, 28]);
    assert.equal(
      start.from(moment([2007, 1, 28]).add({ s: 45 }), true),
      '1 分鐘',
src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 155..292
src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 45..182

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

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

export const RelatedContentData = [
  {
    type: 'link',
    model: {
      locator: 'urn:bbc:cps:curie:asset:0f35c912-afc7-1a4b-9518-7853401c1149',
Severity: Major
Found in src/app/components/RelatedContentSection/fixture/index.ts - About 1 wk to fix

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

    import React from 'react';
    import { storiesOf } from '@storybook/react';
    import { withKnobs } from '@storybook/addon-knobs';
    import {
      withServicesKnob,
    Severity: Major
    Found in src/app/legacy/psammead/psammead-grid/src/index.stories.jsx - About 6 days to fix

      File fixtureData.ts has 2281 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import {
        Article,
        OptimoBylineContributorBlock,
      } from '#app/models/types/optimo';
      import {
      Severity: Major
      Found in src/app/pages/ArticlePage/fixtureData.ts - About 6 days to fix

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

          describe('format ordinal', () => {
            assert.equal(moment([2011, 0, 1]).format('DDDo'), '1日', '1日');
            assert.equal(moment([2011, 0, 2]).format('DDDo'), '2日', '2日');
            assert.equal(moment([2011, 0, 3]).format('DDDo'), '3日', '3日');
            assert.equal(moment([2011, 0, 4]).format('DDDo'), '4日', '4日');
        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 91..126
        src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 88..123
        src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 8..43
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 75..110
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 108..143
        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 63..98
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 76..111

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

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

        test('format ordinal', () => {
          assert.equal(moment([2011, 0, 1]).format('DDDo'), 'ọjọ́ 1', 'ọjọ́ 1');
          assert.equal(moment([2011, 0, 2]).format('DDDo'), 'ọjọ́ 2', 'ọjọ́ 2');
          assert.equal(moment([2011, 0, 3]).format('DDDo'), 'ọjọ́ 3', 'ọjọ́ 3');
          assert.equal(moment([2011, 0, 4]).format('DDDo'), 'ọjọ́ 4', 'ọjọ́ 4');
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/yo.test.js and 24 other locations - About 5 days to fix
        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 91..126
        src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 88..123
        src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 8..43
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 75..110
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 108..143
        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 63..98
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 78..113

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

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

        test('format ordinal', () => {
          assert.equal(moment([2011, 0, 1]).format('DDDo'), '1', '1');
          assert.equal(moment([2011, 0, 2]).format('DDDo'), '2', '2');
          assert.equal(moment([2011, 0, 3]).format('DDDo'), '3', '3');
          assert.equal(moment([2011, 0, 4]).format('DDDo'), '4', '4');
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/gu.test.js and 24 other locations - About 5 days to fix
        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 91..126
        src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 88..123
        src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 8..43
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 75..110
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 108..143
        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 63..98
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 78..113

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

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

        test('format ordinal', () => {
          assert.equal(moment([2011, 0, 1]).format('DDDo'), '1-inci', '1st');
          assert.equal(moment([2011, 0, 2]).format('DDDo'), '2-nci', '2nd');
          assert.equal(moment([2011, 0, 3]).format('DDDo'), '3-üncü', '3rd');
          assert.equal(moment([2011, 0, 4]).format('DDDo'), '4-üncü', '4th');
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/az.test.js and 24 other locations - About 5 days to fix
        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 91..126
        src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 8..43
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 75..110
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 108..143
        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 63..98
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 78..113

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

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

        test('format ordinal', () => {
          assert.equal(moment([2011, 0, 1]).format('DDDo'), 'Nke 1', '1st');
          assert.equal(moment([2011, 0, 2]).format('DDDo'), 'Nke 2', '2nd');
          assert.equal(moment([2011, 0, 3]).format('DDDo'), 'Nke 3', '3rd');
          assert.equal(moment([2011, 0, 4]).format('DDDo'), 'Nke 4', '4th');
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/ig.test.js and 24 other locations - About 5 days to fix
        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 91..126
        src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 88..123
        src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 8..43
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 108..143
        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 63..98
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 78..113

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

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

        test('format ordinal', () => {
          assert.equal(moment([2011, 0, 1]).format('DDDo'), '1-чи', '1st');
          assert.equal(moment([2011, 0, 2]).format('DDDo'), '2-чи', '2nd');
          assert.equal(moment([2011, 0, 3]).format('DDDo'), '3-чү', '3rd');
          assert.equal(moment([2011, 0, 4]).format('DDDo'), '4-чү', '4th');
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/ky.test.js and 24 other locations - About 5 days to fix
        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 91..126
        src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 88..123
        src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 8..43
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 75..110
        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 108..143
        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 63..98
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 78..113

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

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

        test('format ordinal', () => {
          assert.equal(moment([2011, 0, 1]).format('DDDo'), '1', '1');
          assert.equal(moment([2011, 0, 2]).format('DDDo'), '2', '2');
          assert.equal(moment([2011, 0, 3]).format('DDDo'), '3', '3');
          assert.equal(moment([2011, 0, 4]).format('DDDo'), '4', '4');
        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 91..126
        src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 88..123
        src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 8..43
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 75..110
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 108..143
        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 63..98
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 78..113

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

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

        test('format ordinal', () => {
          assert.equal(moment([2011, 0, 1]).format('DDDo'), '1', '1');
          assert.equal(moment([2011, 0, 2]).format('DDDo'), '2', '2');
          assert.equal(moment([2011, 0, 3]).format('DDDo'), '3', '3');
          assert.equal(moment([2011, 0, 4]).format('DDDo'), '4', '4');
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/uz.test.js and 24 other locations - About 5 days to fix
        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 91..126
        src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 88..123
        src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 8..43
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 75..110
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 108..143
        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 63..98
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 78..113

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

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

        test('format ordinal', () => {
          assert.equal(moment([2011, 0, 1]).format('DDDo'), '1st', '1st');
          assert.equal(moment([2011, 0, 2]).format('DDDo'), '2nd', '2nd');
          assert.equal(moment([2011, 0, 3]).format('DDDo'), '3rd', '3rd');
          assert.equal(moment([2011, 0, 4]).format('DDDo'), '4th', '4th');
        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 91..126
        src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 88..123
        src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 8..43
        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 75..110
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 108..143
        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 63..98
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 78..113

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

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

        test('format ordinal', () => {
          assert.equal(moment([2011, 0, 1]).format('DDDo'), '1வது', '1');
          assert.equal(moment([2011, 0, 2]).format('DDDo'), '2வது', '2');
          assert.equal(moment([2011, 0, 3]).format('DDDo'), '3வது', '3');
          assert.equal(moment([2011, 0, 4]).format('DDDo'), '4வது', '4');
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/ta.test.js and 24 other locations - About 5 days to fix
        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 91..126
        src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 88..123
        src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 8..43
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 75..110
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 108..143
        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 63..98
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 78..113

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

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

        test('format ordinal', () => {
          assert.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.');
          assert.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.');
          assert.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.');
          assert.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.');
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/sr.test.js and 24 other locations - About 5 days to fix
        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 91..126
        src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 88..123
        src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 8..43
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 75..110
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 72..107
        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 73..108
        src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 108..143
        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 69..104
        src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 74..109
        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 79..114
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 63..98
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 76..111
        src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 78..113

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

        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