Showing 2,206 of 2,206 total issues

File index.js has 678 lines of code (exceeds 250 allowed). Consider refactoring.
Open

export const contentBlockWithByline = {
  content: {
    model: {
      blocks: [
        {

    Function r has 303 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var r = (function () {
        var r = 5,
          n = 8 - r,
          o = 1e3;
        function e(t, n, o) {
    Severity: Major
    Found in src/app/hooks/useImageColour/colorthief.js - About 1 day to fix

      File fixtures.ts has 669 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      export const uploader = [
        {
          id: '2488a6c7',
          type: 'aresUploader',
          model: {
      Severity: Major
      Found in src/app/components/Embeds/Uploader/fixtures.ts - About 1 day to fix

        File ru.test.js has 668 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import moment from 'moment';
        import './ru';
        
        moment.locale('ru');
        
        
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/ru.test.js - About 1 day to fix

          File preview.tsx has 668 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import React, { useEffect } from 'react';
          import { Global } from '@emotion/react';
          import isChromatic from 'chromatic/isChromatic';
          import { forceVisible } from 'react-lazyload';
          import { Preview } from '@storybook/react';
          Severity: Major
          Found in .storybook/preview.tsx - About 1 day to fix

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

            const pidginPageData = {
              content: {
                model: {
                  blocks: [
                    {
            Severity: Major
            Found in src/app/pages/MediaArticlePage/fixtureData.ts - About 1 day to fix

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

              (async () => {
                const promises = [];
              
                services
                  .filter(service => !badServices.includes(service))
              Severity: Major
              Found in scripts/mostReadCollectionTimes.js and 1 other location - About 1 day to fix
              scripts/mostReadAndWatchedCollectionData.js on lines 114..147

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

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

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

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

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

              Refactorings

              Further Reading

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

              (async () => {
                const promises = [];
              
                services
                  .filter(service => !badServices.includes(service))
              Severity: Major
              Found in scripts/mostReadAndWatchedCollectionData.js and 1 other location - About 1 day to fix
              scripts/mostReadCollectionTimes.js on lines 129..162

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

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

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

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

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

              Refactorings

              Further Reading

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

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

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 261.

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

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

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

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

              Refactorings

              Further Reading

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

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

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 261.

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

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

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

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

              Refactorings

              Further Reading

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

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

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 261.

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

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

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

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

              Refactorings

              Further Reading

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

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

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 261.

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

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

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

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

              Refactorings

              Further Reading

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

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

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 261.

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

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

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

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

              Refactorings

              Further Reading

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

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

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 261.

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

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

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

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

              Refactorings

              Further Reading

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

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

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 261.

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

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

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

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

              Refactorings

              Further Reading

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

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

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 261.

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

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

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

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

              Refactorings

              Further Reading

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

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

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 261.

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

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

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

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

              Refactorings

              Further Reading

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

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

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 261.

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

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

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

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

              Refactorings

              Further Reading

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

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

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 261.

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

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

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

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

              Refactorings

              Further Reading

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

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

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 261.

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

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

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

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

              Refactorings

              Further Reading

              Severity
              Category
              Status
              Source
              Language