Showing 2,206 of 2,206 total issues

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

import React from 'react';
import { render } from '@testing-library/react';
import { ToggleContextProvider } from '#contexts/ToggleContext';
import * as SectionLabel from '#psammead/psammead-section-label/src';
import { shouldMatchSnapshot } from '#psammead/psammead-test-helpers/src';
Severity: Major
Found in src/app/legacy/containers/IndexPageSection/index.test.jsx - About 1 day to fix

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

      describe('calendar all else', () => {
        let weeksAgo = moment().subtract({ w: 1 });
        let weeksFromNow = moment().add({ w: 1 });
    
        assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/az.test.js and 24 other locations - About 1 day to fix
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/yo.test.js and 24 other locations - About 1 day to fix
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/gu.test.js and 24 other locations - About 1 day to fix
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/ig.test.js and 24 other locations - About 1 day to fix
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/uk.test.js and 24 other locations - About 1 day to fix
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/sr.test.js and 24 other locations - About 1 day to fix
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/ru.test.js and 24 other locations - About 1 day to fix
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/ar.test.js and 24 other locations - About 1 day to fix
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/ne.test.js and 24 other locations - About 1 day to fix
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/es.test.js and 24 other locations - About 1 day to fix
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/th.test.js and 24 other locations - About 1 day to fix
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/ur.test.js and 24 other locations - About 1 day to fix
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/bn.test.js and 24 other locations - About 1 day to fix
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    Severity: Major
    Found in src/app/legacy/psammead/psammead-locales/moment/mr.test.js and 24 other locations - About 1 day to fix
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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('calendar all else', () => {
      let weeksAgo = moment().subtract({ w: 1 });
      let weeksFromNow = moment().add({ w: 1 });
    
      assert.equal(weeksAgo.calendar(), weeksAgo.format('L'), '1 week ago');
    src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 403..415
    src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 401..413
    src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 292..304
    src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 389..401
    src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 394..406
    src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 391..403
    src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 388..400
    src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 425..437
    src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 395..407
    src/app/legacy/psammead/psammead-locales/moment/ru.test.js on lines 670..682
    src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 398..410
    src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 426..438
    src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 407..419
    src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 445..457
    src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 356..368
    src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 448..460
    src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 358..370
    src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 399..411
    src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 396..408
    src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 393..413

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

    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