Showing 2,206 of 2,206 total issues

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

    <BadgeWrapper>
      <ImageWrapper>
        <Image src={imageUrl} alt="" data-testid="topic-badge" />
      </ImageWrapper>
    </BadgeWrapper>
Severity: Minor
Found in src/app/pages/TopicPage/TopicImage/index.jsx and 1 other location - About 45 mins to fix
src/app/pages/MostReadPage/MostReadPage.jsx on lines 106..110

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

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

        <IndexPageContainer>
          <MostReadWrapper>
            <MostRead data={pageData} columnLayout="oneColumn" size="default" />
          </MostReadWrapper>
        </IndexPageContainer>
Severity: Minor
Found in src/app/pages/MostReadPage/MostReadPage.jsx and 1 other location - About 45 mins to fix
src/app/pages/TopicPage/TopicImage/index.jsx on lines 44..48

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

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('AMP', () => {
  describe(pageType, () => {
    runGistTests();
    runMediaPlayerCaptionTests();
    runMediaPlayerPlaceholderTests();
Severity: Minor
Found in src/integration/pages/articles/afrique/amp.test.js and 1 other location - About 45 mins to fix
src/integration/pages/articles/portuguese/canonical.test.js on lines 11..18

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

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

      srcset={imageSizes
        .map(size => `${imageSrc.replace('[WIDTH]', size)}.webp ${size}w`)
        .join(', ')}
src/app/legacy/psammead/psammead-bulletin/src/index.stories.jsx on lines 34..36
src/app/legacy/psammead/psammead-bulletin/src/index.test.jsx on lines 34..36
src/app/legacy/psammead/psammead-bulletin/src/index.test.jsx on lines 37..39
src/app/legacy/psammead/psammead-grid/src/testHelpers.jsx on lines 45..47
src/app/legacy/psammead/psammead-grid/src/testHelpers.jsx on lines 48..50
src/app/legacy/psammead/psammead-story-promo/src/index.stories.jsx on lines 27..29
src/app/legacy/psammead/psammead-story-promo/src/index.stories.jsx on lines 30..32

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

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

      fallbackSrcset={imageSizes
        .map(size => `${imageSrc.replace('[WIDTH]', size)} ${size}w`)
        .join(', ')}
Severity: Major
Found in src/app/legacy/psammead/psammead-bulletin/src/index.test.jsx and 7 other locations - About 40 mins to fix
src/app/legacy/psammead/psammead-bulletin/src/index.stories.jsx on lines 31..33
src/app/legacy/psammead/psammead-bulletin/src/index.stories.jsx on lines 34..36
src/app/legacy/psammead/psammead-bulletin/src/index.test.jsx on lines 34..36
src/app/legacy/psammead/psammead-grid/src/testHelpers.jsx on lines 45..47
src/app/legacy/psammead/psammead-grid/src/testHelpers.jsx on lines 48..50
src/app/legacy/psammead/psammead-story-promo/src/index.stories.jsx on lines 27..29
src/app/legacy/psammead/psammead-story-promo/src/index.stories.jsx on lines 30..32

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

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

      const {
        json: { radioScheduleData, foo },
        ...rest
      } = await withRadioSchedule({
        pageDataPromise,
Severity: Major
Found in src/app/routes/utils/withRadioSchedule/index.test.js and 2 other locations - About 40 mins to fix
src/app/routes/utils/withRadioSchedule/index.test.js on lines 47..50
src/app/routes/utils/withRadioSchedule/index.test.js on lines 95..102

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

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

        const {
          json: { radioScheduleData, foo },
          ...rest
        } = await withRadioSchedule({
          pageDataPromise,
Severity: Major
Found in src/app/routes/utils/withRadioSchedule/index.test.js and 2 other locations - About 40 mins to fix
src/app/routes/utils/withRadioSchedule/index.test.js on lines 28..35
src/app/routes/utils/withRadioSchedule/index.test.js on lines 47..50

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

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

      fallbackSrcset={imageSizes
        .map(size => `${imageSrc.replace('[WIDTH]', size)} ${size}w`)
        .join(', ')}
src/app/legacy/psammead/psammead-bulletin/src/index.stories.jsx on lines 31..33
src/app/legacy/psammead/psammead-bulletin/src/index.test.jsx on lines 34..36
src/app/legacy/psammead/psammead-bulletin/src/index.test.jsx on lines 37..39
src/app/legacy/psammead/psammead-grid/src/testHelpers.jsx on lines 45..47
src/app/legacy/psammead/psammead-grid/src/testHelpers.jsx on lines 48..50
src/app/legacy/psammead/psammead-story-promo/src/index.stories.jsx on lines 27..29
src/app/legacy/psammead/psammead-story-promo/src/index.stories.jsx on lines 30..32

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

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

      fallbackSrcset={imageSizes
        .map(size => `${imageSrc.replace('[WIDTH]', size)} ${size}w`)
        .join(', ')}
src/app/legacy/psammead/psammead-bulletin/src/index.stories.jsx on lines 31..33
src/app/legacy/psammead/psammead-bulletin/src/index.stories.jsx on lines 34..36
src/app/legacy/psammead/psammead-bulletin/src/index.test.jsx on lines 34..36
src/app/legacy/psammead/psammead-bulletin/src/index.test.jsx on lines 37..39
src/app/legacy/psammead/psammead-grid/src/testHelpers.jsx on lines 45..47
src/app/legacy/psammead/psammead-grid/src/testHelpers.jsx on lines 48..50
src/app/legacy/psammead/psammead-story-promo/src/index.stories.jsx on lines 27..29

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

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

      srcset={imageSizes
        .map(size => `${imageSrc.replace('[WIDTH]', size)}.webp ${size}w`)
        .join(', ')}
Severity: Major
Found in src/app/legacy/psammead/psammead-bulletin/src/index.test.jsx and 7 other locations - About 40 mins to fix
src/app/legacy/psammead/psammead-bulletin/src/index.stories.jsx on lines 31..33
src/app/legacy/psammead/psammead-bulletin/src/index.stories.jsx on lines 34..36
src/app/legacy/psammead/psammead-bulletin/src/index.test.jsx on lines 37..39
src/app/legacy/psammead/psammead-grid/src/testHelpers.jsx on lines 45..47
src/app/legacy/psammead/psammead-grid/src/testHelpers.jsx on lines 48..50
src/app/legacy/psammead/psammead-story-promo/src/index.stories.jsx on lines 27..29
src/app/legacy/psammead/psammead-story-promo/src/index.stories.jsx on lines 30..32

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

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

      const {
        json: { radioScheduleData, foo },
        ...rest
      } = await withRadioSchedule({ pageDataPromise, service, path });
Severity: Major
Found in src/app/routes/utils/withRadioSchedule/index.test.js and 2 other locations - About 40 mins to fix
src/app/routes/utils/withRadioSchedule/index.test.js on lines 28..35
src/app/routes/utils/withRadioSchedule/index.test.js on lines 95..102

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

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

        srcset={imageSizes
          .map(size => `${imageSrc.replace('[WIDTH]', size)}.webp ${size}w`)
          .join(', ')}
Severity: Major
Found in src/app/legacy/psammead/psammead-grid/src/testHelpers.jsx and 7 other locations - About 40 mins to fix
src/app/legacy/psammead/psammead-bulletin/src/index.stories.jsx on lines 31..33
src/app/legacy/psammead/psammead-bulletin/src/index.stories.jsx on lines 34..36
src/app/legacy/psammead/psammead-bulletin/src/index.test.jsx on lines 34..36
src/app/legacy/psammead/psammead-bulletin/src/index.test.jsx on lines 37..39
src/app/legacy/psammead/psammead-grid/src/testHelpers.jsx on lines 48..50
src/app/legacy/psammead/psammead-story-promo/src/index.stories.jsx on lines 27..29
src/app/legacy/psammead/psammead-story-promo/src/index.stories.jsx on lines 30..32

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

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

        fallbackSrcset={imageSizes
          .map(size => `${imageSrc.replace('[WIDTH]', size)} ${size}w`)
          .join(', ')}
Severity: Major
Found in src/app/legacy/psammead/psammead-grid/src/testHelpers.jsx and 7 other locations - About 40 mins to fix
src/app/legacy/psammead/psammead-bulletin/src/index.stories.jsx on lines 31..33
src/app/legacy/psammead/psammead-bulletin/src/index.stories.jsx on lines 34..36
src/app/legacy/psammead/psammead-bulletin/src/index.test.jsx on lines 34..36
src/app/legacy/psammead/psammead-bulletin/src/index.test.jsx on lines 37..39
src/app/legacy/psammead/psammead-grid/src/testHelpers.jsx on lines 45..47
src/app/legacy/psammead/psammead-story-promo/src/index.stories.jsx on lines 27..29
src/app/legacy/psammead/psammead-story-promo/src/index.stories.jsx on lines 30..32

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

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

      srcset={imageSizes
        .map(size => `${imageSrc.replace('[WIDTH]', size)}.webp ${size}w`)
        .join(', ')}
src/app/legacy/psammead/psammead-bulletin/src/index.stories.jsx on lines 31..33
src/app/legacy/psammead/psammead-bulletin/src/index.stories.jsx on lines 34..36
src/app/legacy/psammead/psammead-bulletin/src/index.test.jsx on lines 34..36
src/app/legacy/psammead/psammead-bulletin/src/index.test.jsx on lines 37..39
src/app/legacy/psammead/psammead-grid/src/testHelpers.jsx on lines 45..47
src/app/legacy/psammead/psammead-grid/src/testHelpers.jsx on lines 48..50
src/app/legacy/psammead/psammead-story-promo/src/index.stories.jsx on lines 30..32

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

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

    <Grid
      columns={{
        group0: 8,
        group1: 8,
        group2: 8,
src/app/legacy/components/Grid/index.jsx on lines 95..108
src/app/legacy/psammead/psammead-story-promo/src/index.stories.jsx on lines 180..233

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

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

const programGridProps = {
  item: true,
  columns: {
    group0: 4,
    group1: 4,
Severity: Major
Found in src/app/legacy/components/RadioSchedule/index.jsx and 2 other locations - About 40 mins to fix
src/app/legacy/components/Grid/index.stories.jsx on lines 16..26
src/app/legacy/components/Grid/index.test.jsx on lines 16..26

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

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

const gridItemProps = {
  item: true,
  columns: {
    group0: 2,
    group1: 2,
Severity: Major
Found in src/app/legacy/components/Grid/index.test.jsx and 2 other locations - About 40 mins to fix
src/app/legacy/components/Grid/index.stories.jsx on lines 16..26
src/app/legacy/components/RadioSchedule/index.jsx on lines 55..65

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

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

                }, e.prototype.disable = function() {
                    this.enabled && (this.removeListeners(), this.enabled = !1)
                }, e.prototype.getPluginId = function() {
Severity: Major
Found in public/vendor/cwr.js and 3 other locations - About 40 mins to fix
public/vendor/cwr.js on lines 2059..2061
public/vendor/cwr.js on lines 2178..2180
public/vendor/cwr.js on lines 2180..2182

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

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

    ).resolves.toHaveProperty('pageData.metadata', {
      type: 'Topic',
      analytics: {
        name: 'pidgin.topics.c95y35941vrt.page',
        producer: 'PIDGIN',
Severity: Minor
Found in src/app/routes/topic/getInitialData/index.test.js and 1 other location - About 40 mins to fix
src/app/routes/topic/getInitialData/index.test.js on lines 33..45

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

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

          <Pagination
            activePage={activePage}
            pageCount={pageCount}
            pageXOfY={pageXOfY}
            previousPage={previousPage}
Severity: Major
Found in src/app/pages/TopicPage/TopicPage.jsx and 2 other locations - About 40 mins to fix
src/app/legacy/components/RadioSchedule/StartTime/index.jsx on lines 93..100
src/app/legacy/containers/Navigation/index.jsx on lines 118..125

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

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