Showing 2,206 of 2,206 total issues

File fixture.ts has 585 lines of code (exceeds 250 allowed). Consider refactoring.
Open

export const samplePost = {
  typeCode: null,
  header: {
    model: {
      blocks: [
Severity: Major
Found in ws-nextjs-app/pages/[service]/live/[id]/Post/fixture.ts - About 1 day to fix

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

    import { Environments, Services } from '#app/models/types/global';
    import getStatsDestination from '.';
    
    describe('getStatsDestination', () => {
      const testScenarios = [
    Severity: Major
    Found in src/app/contexts/RequestContext/getStatsDestination/index.test.ts - About 1 day to fix

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

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

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

        test('format', () => {
          const a = [
            ['dddd, MMMM Do YYYY, h:mm:ss a', 'اتوار، فروری 14 2010، 3:25:50 شام'],
            ['ddd, hA', 'اتوار، 3شام'],
            ['M Mo MM MMMM MMM', '2 2 02 فروری فروری'],
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/ur.test.js and 8 other locations - About 1 day to fix
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 36..67
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 39..73
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 39..70
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 39..70
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 36..67
        src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 39..73
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 43..74
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 43..74

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

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

        test('format', () => {
          const a = [
            ['dddd, MMMM Do YYYY, h:mm:ss a', 'Sunday, February 14th 2010, 3:25:50 pm'],
            ['ddd, hA', 'Sun, 3PM'],
            ['M Mo MM MMMM MMM', '2 2nd 02 February Feb'],
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 39..73
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 39..70
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 39..70
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 36..67
        src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 39..73
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 29..61
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 43..74
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 43..74

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

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

        test('format', () => {
          const a = [
            ['dddd, Do-MMMM YYYY, h:mm:ss', 'Якшанба, 14-феврал 2010, 3:25:50'],
            ['ddd, h:mm', 'Якш, 3:25'],
            ['M Mo MM MMMM MMM', '2 2 02 феврал фев'],
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/uz.test.js and 8 other locations - About 1 day to fix
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 36..67
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 39..73
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 39..70
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 39..70
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 36..67
        src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 39..73
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 29..61
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 43..74

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

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

        test('format', () => {
          const a = [
            ['dddd, MMMM Do YYYY, h:mm:ss a', 'Sunday, February 14th 2010, 3:25:50 pm'],
            ['ddd, hA', 'Sun, 3PM'],
            ['M Mo MM MMMM MMM', '2 2nd 02 February Feb'],
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/pcm.test.js and 8 other locations - About 1 day to fix
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 36..67
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 39..73
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 39..70
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 36..67
        src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 39..73
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 29..61
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 43..74
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 43..74

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

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

        test('format', () => {
          const a = [
            ['dddd, Do MMMM YYYY, HH:mm:ss', 'Жекшемби, 14-чү февраль 2010, 15:25:50'],
            ['ddd, hA', 'Жек, 3PM'],
            ['M Mo MM MMMM MMM', '2 2-чи 02 февраль фев'],
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/ky.test.js and 8 other locations - About 1 day to fix
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 36..67
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 39..73
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 39..70
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 36..67
        src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 39..73
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 29..61
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 43..74
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 43..74

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

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

        test('format', () => {
          const a = [
            [
              'dddd, Do MMMM YYYY, h:mm:ss a',
              'อาทิตย์, 14 กุมภาพันธ์ 2010, 3:25:50 หลังเที่ยง',
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/th.test.js and 8 other locations - About 1 day to fix
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 36..67
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 39..73
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 39..70
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 39..70
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 36..67
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 29..61
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 43..74
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 43..74

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

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

        test('format', () => {
          const a = [
            [
              'dddd, MMMM Do YYYY, h:mm:ss a',
              'Sọnde, Febụwarị Nke 14 2010, 3:25:50 pm',
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/ig.test.js and 8 other locations - About 1 day to fix
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 36..67
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 39..70
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 39..70
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 36..67
        src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 39..73
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 29..61
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 43..74
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 43..74

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

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

        test('format', () => {
          const a = [
            ['dddd, MMMM Do YYYY, h:mm:ss a', 'Àìkú, Èrèlè ọjọ́ 14 2010, 3:25:50 pm'],
            ['ddd, hA', 'Àìk, 3PM'],
            ['M Mo MM MMMM MMM', '2 ọjọ́ 2 02 Èrèlè Èrl'],
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/yo.test.js and 8 other locations - About 1 day to fix
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 36..67
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 39..73
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 39..70
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 39..70
        src/app/legacy/psammead/psammead-locales/moment/sw.test.js on lines 36..67
        src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 39..73
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 29..61
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 43..74

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

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

        test('format', () => {
          const a = [
            ['dddd, MMMM Do YYYY, h:mm:ss a', 'Jumapili, Februari 14 2010, 3:25:50 pm'],
            ['ddd, hA', 'Jpl, 3PM'],
            ['M Mo MM MMMM MMM', '2 2 02 Februari Feb'],
        Severity: Major
        Found in src/app/legacy/psammead/psammead-locales/moment/sw.test.js and 8 other locations - About 1 day to fix
        src/app/legacy/psammead/psammead-locales/moment/en-gb.test.js on lines 36..67
        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 39..73
        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 39..70
        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 39..70
        src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 39..73
        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 29..61
        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 43..74
        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 43..74

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

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

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

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

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

        Refactorings

        Further Reading

        File fixtureData.js has 574 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import {
          blockContainingText,
          singleTextBlock,
          textBlock,
        } from '#models/blocks';
        Severity: Major
        Found in src/app/components/OptimizelyRecommendations/fixtureData.js - About 1 day to fix

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

          test('format', () => {
            const a = [
              [
                'dddd, MMMM Do YYYY, h:mm:ss a',
                'ஞாயிற்றுக்கிழமை, பிப்ரவரி 14வது 2010, 3:25:50  எற்பாடு',
          Severity: Major
          Found in src/app/legacy/psammead/psammead-locales/moment/ta.test.js and 3 other locations - About 1 day to fix
          src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 39..72
          src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 39..72
          src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 39..72

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

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

          test('format', () => {
            const a = [
              [
                'dddd, Do MMMM YYYY, aको h:mm:ss बजे',
                'आइतबार, १४ फेब्रुवरी २०१०, दिउँसोको ३:२५:५० बजे',
          Severity: Major
          Found in src/app/legacy/psammead/psammead-locales/moment/ne.test.js and 3 other locations - About 1 day to fix
          src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 39..72
          src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 39..72
          src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 39..72

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

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

          test('format', () => {
            const a = [
              [
                'dddd, Do MMMM YYYY, a h:mm:ss વાગ્યે',
                'રવિવાર, 14 ફેબ્રુઆરી 2010, બપોર 3:25:50 વાગ્યે',
          Severity: Major
          Found in src/app/legacy/psammead/psammead-locales/moment/gu.test.js and 3 other locations - About 1 day to fix
          src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 39..72
          src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 39..72
          src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 39..72

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

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

          test('format', () => {
            const a = [
              [
                'dddd, Do MMMM YYYY, a h:mm:ss ਵਜੇ',
                'ਐਤਵਾਰ, 14 ਫ਼ਰਵਰੀ 2010, ਦੁਪਹਿਰ 3:25:50 ਵਜੇ',
          src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 39..72
          src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 39..72
          src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 39..72

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

          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

          describe('getAffiliateMarketingString', () => {
            describe('should return the "al" prefix', () => {
              describe('with optional params', () => {
                it.each`
                  expectation                                                             | href                                                                      | expectedValue
          Severity: Major
          Found in src/app/lib/analyticsUtils/index.test.js and 1 other location - About 1 day to fix
          src/app/lib/analyticsUtils/index.test.js on lines 724..752

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

          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

          describe('getDisplayMarketingString', () => {
            describe('should return the "AD" prefix', () => {
              describe('with optional params', () => {
                it.each`
                  expectation                                                                    | href                                                                           | expectedValue
          Severity: Major
          Found in src/app/lib/analyticsUtils/index.test.js and 1 other location - About 1 day to fix
          src/app/lib/analyticsUtils/index.test.js on lines 628..657

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

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

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

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

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

          Refactorings

          Further Reading

          File pa-in.test.js has 558 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

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