Showing 2,206 of 2,206 total issues

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

    it('should return endpoint with query string on test', () => {
      expect(
        getRadioScheduleEndpoint({
          service: 'hausa',
          queryString: '?renderer_env=live',
src/app/lib/utilities/getUrlHelpers/getRadioSchedulesUrls/index.test.jsx on lines 20..28
src/app/lib/utilities/getUrlHelpers/getRadioSchedulesUrls/index.test.jsx on lines 38..46
src/app/lib/utilities/getUrlHelpers/getRecommendationsUrl/index.test.js on lines 28..38

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

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('and maps token to key correctly when detokenised', () => {
      expect(
        detokenise(
          'Duration %duration%',
          durationDictionary({ duration: 'PT1H30M', locale: 'en-gb' }),
Severity: Minor
Found in src/app/legacy/components/RadioSchedule/utilities/index.test.js and 1 other location - About 40 mins to fix
src/app/legacy/components/RadioSchedule/utilities/index.test.js on lines 33..40

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

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 render correctly for IDX', () => {
      const { container } = render(IndexHeadingWithContext('ukrainian'));
      expect(container).toMatchSnapshot();
    });
Severity: Minor
Found in src/app/legacy/containers/IndexHeading/index.test.jsx and 1 other location - About 40 mins to fix
src/app/legacy/containers/IndexHeading/index.test.jsx on lines 19..22

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

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

const StyledPromoWrapper = styled.div`
  position: relative;
  padding: ${GEL_SPACING};
  margin-top: ${GEL_SPACING};
  background-color: ${props => props.theme.palette.GHOST};
src/app/legacy/psammead/psammead-navigation/src/index.jsx on lines 126..132

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

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

        <EmbedConsentBannerAmp provider={provider} id={id}>
          <AmpElement id={id} source={source} />
        </EmbedConsentBannerAmp>
Severity: Minor
Found in src/app/legacy/psammead/psammead-social-embed/src/index.jsx and 1 other location - About 40 mins to fix
src/app/legacy/psammead/psammead-social-embed/src/index.jsx on lines 146..148

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

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

            ({
              visualProminence,
              summaries,
              curationId,
              title: curationTitle,
Severity: Minor
Found in src/app/pages/TopicPage/TopicPage.jsx and 1 other location - About 40 mins to fix
scripts/bundleSize/index.js on lines 88..115

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

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

const StyledSpan = styled.span`
  &::after {
    ${ListItemBorder}
    border-bottom: ${GEL_SPACING_HLF} solid ${props =>
      props.theme.palette.POSTBOX};
Severity: Minor
Found in src/app/legacy/psammead/psammead-navigation/src/index.jsx and 1 other location - About 40 mins to fix
src/app/legacy/containers/CpsRecommendations/RecommendationsPromo/index.jsx on lines 22..27

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

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 render rtl correctly for IDX', () => {
      const { container } = render(IndexHeadingWithContext('arabic'));
      expect(container).toMatchSnapshot();
    });
Severity: Minor
Found in src/app/legacy/containers/IndexHeading/index.test.jsx and 1 other location - About 40 mins to fix
src/app/legacy/containers/IndexHeading/index.test.jsx on lines 14..17

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

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('but sets duration as 00,00 when a duration string is invalid', () => {
      expect(
        detokenise(
          'Duration %duration%',
          durationDictionary({ duration: '3minutes', locale: 'en-gb' }),
Severity: Minor
Found in src/app/legacy/components/RadioSchedule/utilities/index.test.js and 1 other location - About 40 mins to fix
src/app/legacy/components/RadioSchedule/utilities/index.test.js on lines 13..20

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

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

    gridStartOffset && gridStartOffsetGroup < columnsGroup
      ? `margin-${dir === 'ltr' ? 'left' : 'right'}: ${startOffsetPercentage(
          columnsGroup,
          gridStartOffsetGroup,
        )}`
Severity: Minor
Found in src/app/legacy/psammead/psammead-grid/src/index.jsx and 1 other location - About 40 mins to fix
src/app/legacy/psammead/psammead-grid/src/index.jsx on lines 182..187

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

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

    gridStartOffsetGroup && gridStartOffsetGroup < parentColumnsGroup
      ? `margin-${dir === 'ltr' ? 'left' : 'right'}: ${startOffsetPercentage(
          parentColumnsGroup,
          gridStartOffsetGroup,
        )};`
Severity: Minor
Found in src/app/legacy/psammead/psammead-grid/src/index.jsx and 1 other location - About 40 mins to fix
src/app/legacy/psammead/psammead-grid/src/index.jsx on lines 206..211

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

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

Function J has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

            J = function(e, t, n, r, o) {
Severity: Minor
Found in public/vendor/cwr.js - About 35 mins to fix

    Function fetch has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

                        }, n.fetch = function(e, t, r, o, i) {
    Severity: Minor
    Found in public/vendor/cwr.js - About 35 mins to fix

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

          if (serviceLaunch.storyPage && serviceLaunch.storyPage !== '') {
            output.push(`__STY__: ${serviceLaunch.storyPage}`);
          }
      Severity: Major
      Found in scripts/releaseInfo/index.js and 9 other locations - About 35 mins to fix
      scripts/releaseInfo/index.js on lines 96..98
      scripts/releaseInfo/index.js on lines 100..102
      scripts/releaseInfo/index.js on lines 104..106
      scripts/releaseInfo/index.js on lines 108..110
      scripts/releaseInfo/index.js on lines 112..117
      scripts/releaseInfo/index.js on lines 123..125
      scripts/releaseInfo/index.js on lines 127..129
      scripts/releaseInfo/index.js on lines 131..133
      scripts/releaseInfo/index.js on lines 135..140

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

      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

          if (
            serviceLaunch.featureIndexPage &&
            serviceLaunch.featureIndexPage !== ''
          ) {
            output.push(`__FIX__: ${serviceLaunch.featureIndexPage}`);
      Severity: Major
      Found in scripts/releaseInfo/index.js and 9 other locations - About 35 mins to fix
      scripts/releaseInfo/index.js on lines 96..98
      scripts/releaseInfo/index.js on lines 100..102
      scripts/releaseInfo/index.js on lines 104..106
      scripts/releaseInfo/index.js on lines 108..110
      scripts/releaseInfo/index.js on lines 112..117
      scripts/releaseInfo/index.js on lines 119..121
      scripts/releaseInfo/index.js on lines 123..125
      scripts/releaseInfo/index.js on lines 127..129
      scripts/releaseInfo/index.js on lines 131..133

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

      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

          if (serviceLaunch.mostReadPage && serviceLaunch.mostReadPage !== '') {
            output.push(`__Most Read__: ${serviceLaunch.mostReadPage}`);
          }
      Severity: Major
      Found in scripts/releaseInfo/index.js and 9 other locations - About 35 mins to fix
      scripts/releaseInfo/index.js on lines 96..98
      scripts/releaseInfo/index.js on lines 100..102
      scripts/releaseInfo/index.js on lines 104..106
      scripts/releaseInfo/index.js on lines 108..110
      scripts/releaseInfo/index.js on lines 112..117
      scripts/releaseInfo/index.js on lines 119..121
      scripts/releaseInfo/index.js on lines 127..129
      scripts/releaseInfo/index.js on lines 131..133
      scripts/releaseInfo/index.js on lines 135..140

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

      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

          if (serviceLaunch.frontPage && serviceLaunch.frontPage !== '') {
            output.push(`__Home__: ${serviceLaunch.frontPage}`);
          }
      Severity: Major
      Found in scripts/releaseInfo/index.js and 9 other locations - About 35 mins to fix
      scripts/releaseInfo/index.js on lines 100..102
      scripts/releaseInfo/index.js on lines 104..106
      scripts/releaseInfo/index.js on lines 108..110
      scripts/releaseInfo/index.js on lines 112..117
      scripts/releaseInfo/index.js on lines 119..121
      scripts/releaseInfo/index.js on lines 123..125
      scripts/releaseInfo/index.js on lines 127..129
      scripts/releaseInfo/index.js on lines 131..133
      scripts/releaseInfo/index.js on lines 135..140

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

      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

          if (serviceLaunch.articles && serviceLaunch.articles !== '') {
            output.push(`__Articles__: ${serviceLaunch.articles}`);
          }
      Severity: Major
      Found in scripts/releaseInfo/index.js and 9 other locations - About 35 mins to fix
      scripts/releaseInfo/index.js on lines 96..98
      scripts/releaseInfo/index.js on lines 104..106
      scripts/releaseInfo/index.js on lines 108..110
      scripts/releaseInfo/index.js on lines 112..117
      scripts/releaseInfo/index.js on lines 119..121
      scripts/releaseInfo/index.js on lines 123..125
      scripts/releaseInfo/index.js on lines 127..129
      scripts/releaseInfo/index.js on lines 131..133
      scripts/releaseInfo/index.js on lines 135..140

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

      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

          if (
            serviceLaunch.photoGalleryPage &&
            serviceLaunch.photoGalleryPage !== ''
          ) {
            output.push(`__PGL__: ${serviceLaunch.photoGalleryPage}`);
      Severity: Major
      Found in scripts/releaseInfo/index.js and 9 other locations - About 35 mins to fix
      scripts/releaseInfo/index.js on lines 96..98
      scripts/releaseInfo/index.js on lines 100..102
      scripts/releaseInfo/index.js on lines 104..106
      scripts/releaseInfo/index.js on lines 108..110
      scripts/releaseInfo/index.js on lines 119..121
      scripts/releaseInfo/index.js on lines 123..125
      scripts/releaseInfo/index.js on lines 127..129
      scripts/releaseInfo/index.js on lines 131..133
      scripts/releaseInfo/index.js on lines 135..140

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

      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

          if (serviceLaunch.mediaAssetPage && serviceLaunch.mediaAssetPage !== '') {
            output.push(`__MAP__: ${serviceLaunch.mediaAssetPage}`);
          }
      Severity: Major
      Found in scripts/releaseInfo/index.js and 9 other locations - About 35 mins to fix
      scripts/releaseInfo/index.js on lines 96..98
      scripts/releaseInfo/index.js on lines 100..102
      scripts/releaseInfo/index.js on lines 104..106
      scripts/releaseInfo/index.js on lines 112..117
      scripts/releaseInfo/index.js on lines 119..121
      scripts/releaseInfo/index.js on lines 123..125
      scripts/releaseInfo/index.js on lines 127..129
      scripts/releaseInfo/index.js on lines 131..133
      scripts/releaseInfo/index.js on lines 135..140

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

      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