Showing 2,206 of 2,206 total issues

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

test('weeks year starting thursday', () => {
  assert.equal(
    moment([2008, 11, 28]).week(),
    1,
    'Dec 28 2008 should be week 1'
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 447..458
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 460..471
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 473..484
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 499..510
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 467..478
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 480..491
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 493..504
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 506..517
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 519..530

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

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

test('weeks year starting tuesday', () => {
  assert.equal(
    moment([2007, 11, 29]).week(),
    52,
    'Dec 29 2007 should be week 52'
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ta.test.js and 9 other locations - About 7 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 447..458
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 460..471
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 473..484
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 486..497
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 499..510
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 467..478
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 493..504
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 506..517
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 519..530

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

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

test('weeks year starting wednesday', () => {
  assert.equal(
    moment([2002, 11, 29]).week(),
    1,
    'Dec 29 2002 should be week 1'
Severity: Major
Found in src/app/legacy/psammead/psammead-locales/moment/ta.test.js and 9 other locations - About 7 hrs to fix
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 447..458
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 460..471
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 473..484
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 486..497
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 499..510
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 467..478
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 480..491
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 506..517
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 519..530

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

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

test('weeks year starting wednesday', () => {
  assert.equal(
    moment([2002, 11, 29]).week(),
    1,
    'Dec 29 2002 should be week 1'
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 447..458
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 460..471
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 486..497
src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 499..510
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 467..478
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 480..491
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 493..504
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 506..517
src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 519..530

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

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

    <Navigation script={script} service={service} dir={dir}>
      <ScrollableNavigation dir={dir}>
        <DropdownUl>
          {navData.map((item, index) => {
            const { title, url } = item;
src/app/legacy/psammead/psammead-navigation/src/index.stories.jsx on lines 176..199

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

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

    <Navigation script={script} service={service} dir={dir}>
      <ScrollableNavigation dir={dir}>
        <NavigationUl>
          {navData.map((item, index) => {
            const { title, url } = item;
src/app/legacy/psammead/psammead-navigation/src/index.stories.jsx on lines 137..160

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

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 ar.test.js has 463 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import moment from 'moment';
import './ar';

moment.locale('ar');

Severity: Minor
Found in src/app/legacy/psammead/psammead-locales/moment/ar.test.js - About 7 hrs to fix

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

    describe('sport home story page', () => {
      beforeEach(() => {
        jest.clearAllMocks();
      });
    
    
    src/app/legacy/containers/PageHandlers/withData/shouldRender/index.test.js on lines 209..235

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

    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('sport home article', () => {
      beforeEach(() => {
        jest.clearAllMocks();
      });
    
    
    src/app/legacy/containers/PageHandlers/withData/shouldRender/index.test.js on lines 237..273

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

    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

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

      describe(`Related Content`, () => {
        const relatedContentLinks = document.querySelectorAll(
          '[data-e2e="related-content-heading"] a',
        );
    
    
    Severity: Major
    Found in src/integration/pages/mediaAssetPage/crossPlatformTests.js and 1 other location - About 7 hrs to fix
    src/integration/pages/mediaArticlePage/crossPlatformTests.js on lines 7..33

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

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

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

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

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

    Refactorings

    Further Reading

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

          it('should log, and propogate the status code as 500', async () => {
            fetch.mockResponse('Error', { status: 500 });
    
            return fetchPageData({ path: requestedPathname, pageType }).catch(
              ({ message, status }) => {
    Severity: Major
    Found in src/app/routes/utils/fetchPageData/index.test.js and 2 other locations - About 7 hrs to fix
    src/app/routes/utils/fetchPageData/index.test.js on lines 298..317
    src/app/routes/utils/fetchPageData/index.test.js on lines 319..337

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

    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

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

      describe(`Related Content`, () => {
        const relatedContentLinks = document.querySelectorAll(
          '[data-e2e="related-content-heading"] a',
        );
    
    
    Severity: Major
    Found in src/integration/pages/mediaArticlePage/crossPlatformTests.js and 1 other location - About 7 hrs to fix
    src/integration/pages/mediaAssetPage/crossPlatformTests.js on lines 30..56

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should log, and propogate the status code as 502', async () => {
          fetch.mockResponse('Internal server error', { status: 500 });
          return fetchPageData({ path: requestedPathname, pageType }).catch(
            ({ message, status }) => {
              expect(loggerMock.error).toBeCalledWith(DATA_FETCH_ERROR, {
    Severity: Major
    Found in src/app/routes/utils/fetchPageData/index.test.js and 2 other locations - About 7 hrs to fix
    src/app/routes/utils/fetchPageData/index.test.js on lines 270..289
    src/app/routes/utils/fetchPageData/index.test.js on lines 298..317

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

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

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

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

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

    Refactorings

    Further Reading

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

        it('should log, and return the status code as 502', async () => {
          fetch.mockResponse("I'm a teapot", { status: 418 });
    
          return fetchPageData({ path: requestedPathname, pageType }).catch(
            ({ message, status }) => {
    Severity: Major
    Found in src/app/routes/utils/fetchPageData/index.test.js and 2 other locations - About 7 hrs to fix
    src/app/routes/utils/fetchPageData/index.test.js on lines 270..289
    src/app/routes/utils/fetchPageData/index.test.js on lines 319..337

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

    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

        it('should route to and render the podcast page', async () => {
          const pathname = '/arabic/podcasts/p02pc9qc';
          fetch.mockResponseOnce(JSON.stringify(podcastPageJson));
    
          const { getInitialData, pageType } = getMatchingRoute(pathname);
    Severity: Major
    Found in src/app/routes/index.test.jsx and 1 other location - About 6 hrs to fix
    src/app/routes/index.test.jsx on lines 195..219

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

    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

        it('should route to and render the onDemand Radio page', async () => {
          const pathname = '/indonesia/bbc_indonesian_radio/w172xh267fpn19l';
          fetch.mockResponseOnce(JSON.stringify(onDemandRadioPageJson));
    
          const { getInitialData, pageType } = getMatchingRoute(pathname);
    Severity: Major
    Found in src/app/routes/index.test.jsx and 1 other location - About 6 hrs to fix
    src/app/routes/index.test.jsx on lines 127..151

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

    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 uk.test.js has 456 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import moment from 'moment';
    import './uk';
    
    moment.locale('uk');
    
    
    Severity: Minor
    Found in src/app/legacy/psammead/psammead-locales/moment/uk.test.js - About 6 hrs to fix

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

      test('lenient day of month ordinal parsing', () => {
        let i;
        let ordinalStr;
        let testMoment;
        for (i = 1; i <= 31; i += 1) {
      Severity: Major
      Found in src/app/legacy/psammead/psammead-locales/moment/ta.test.js and 1 other location - About 6 hrs to fix
      src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 552..575

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

      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

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

      test('lenient day of month ordinal parsing', () => {
        let i;
        let ordinalStr;
        let testMoment;
        for (i = 1; i <= 31; i += 1) {
      src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 572..595

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

      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

            <Grid
              dir={dir}
              columns={{
                group0: 6,
                group1: 6,
      Severity: Major
      Found in src/app/legacy/psammead/psammead-grid/src/index.stories.jsx and 1 other location - About 6 hrs to fix
      src/app/legacy/psammead/psammead-grid/src/index.stories.jsx on lines 1447..1496

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

      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