Showing 2,206 of 2,206 total issues

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

afterEach(() => {
  jest.runOnlyPendingTimers();
  jest.useRealTimers();
  console.error = error;
  observers.clear();
src/app/hooks/useViewTracker/index.test.jsx on lines 70..75

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

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 return with query string when passed service & radioService', () => {
      expect(
        getRadioScheduleEndpoint({
          service: 'persian',
          radioService: 'dari',
src/app/lib/utilities/getUrlHelpers/getRecommendationsUrl/index.test.js on lines 40..51

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

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

export const isValidDateTime = dateTime => {
  // eslint-disable-next-line no-restricted-globals
  if (isNaN(dateTime) || dateTime === null) {
    return false;
  }
src/app/legacy/containers/ArticleTimestamp/helpers.js on lines 35..41

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

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 StandardScrollPromo = styled.ul`
  list-style: none;
  ${({ dir }) => `padding-${dir === 'ltr' ? 'left' : 'right'}: 0;`}
  margin: 0;
  display: flex;
Severity: Minor
Found in src/app/legacy/components/ScrollablePromo/PromoList/index.jsx and 1 other location - About 55 mins to fix
src/app/legacy/components/ScrollablePromo/PromoList/index.jsx on lines 34..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 53.

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 not render when the service does not support recommendations', () => {
    const toggleEnabled = true;

    const { container } = renderContainer(
      ltrRecommendationsData,
Severity: Minor
Found in src/app/legacy/containers/CpsRecommendations/index.test.jsx and 1 other location - About 55 mins to fix
src/app/legacy/containers/CpsRecommendations/index.test.jsx on lines 51..60

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

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 return portuguese experimentation endpoint with engine and engine variant', () => {
        expect(
          getRecommendationsUrl({
            assetUri: '/portuguese/brasil-59876053',
            service: 'portuguese',
src/app/lib/utilities/getUrlHelpers/getRadioSchedulesUrls/index.test.jsx on lines 47..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 53.

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

afterEach(() => {
  jest.runOnlyPendingTimers();
  jest.useRealTimers();
  console.error = error;
  observers.clear();
Severity: Minor
Found in src/app/hooks/useViewTracker/index.test.jsx and 1 other location - About 55 mins to fix
src/app/legacy/containers/OptimizelyArticleCompleteTracking/index.test.jsx on lines 82..87

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

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 a 404 for an article page when "Key/Summary Points" tagging is set', () => {
    const result = shouldRender(
      articleDataWithKeySummaryPointsTagging,
      service,
      pathname,
src/app/legacy/containers/PageHandlers/withData/shouldRender/index.test.js on lines 284..296

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

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 return id of promo-link with contentType and URI if contentType exists for a "Top Stories" promo', () => {
    expect(
      buildUniquePromoId({
        sectionType: 'top-stories',
        promoGroupId: labelId,
Severity: Minor
Found in src/app/legacy/containers/StoryPromo/utilities/index.test.js and 1 other location - About 55 mins to fix
src/app/legacy/containers/StoryPromo/utilities/index.test.js on lines 142..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 53.

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 OperaScrollPromo = styled.ul`
  list-style: none;
  ${({ dir }) => `padding-${dir === 'ltr' ? 'left' : 'right'}: 0;`}
  margin: 0;
`;
Severity: Minor
Found in src/app/legacy/components/ScrollablePromo/PromoList/index.jsx and 1 other location - About 55 mins to fix
src/app/legacy/components/ScrollablePromo/PromoList/index.jsx on lines 16..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 53.

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 u has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function u(t, r, n, o, e, i, u) {
Severity: Major
Found in src/app/hooks/useImageColour/colorthief.js - About 50 mins to fix

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

        it('OG type', () => {
          const metaTagContent = getMetaTagContent('meta[property="og:type"]');
    
          expect(metaTagContent).toBeTruthy();
          expect(metaTagContent).toMatchSnapshot();
    Severity: Major
    Found in src/integration/common/SEO.js and 15 other locations - About 50 mins to fix
    src/integration/common/SEO.js on lines 47..52
    src/integration/common/SEO.js on lines 54..59
    src/integration/common/SEO.js on lines 61..66
    src/integration/common/SEO.js on lines 68..73
    src/integration/common/SEO.js on lines 82..87
    src/integration/common/SEO.js on lines 89..94
    src/integration/common/SEO.js on lines 96..101
    src/integration/common/SEO.js on lines 103..108
    src/integration/common/SEO.js on lines 110..117
    src/integration/common/SEO.js on lines 119..126
    src/integration/common/SEO.js on lines 128..133
    src/integration/common/SEO.js on lines 135..142
    src/integration/common/SEO.js on lines 144..149
    src/integration/common/SEO.js on lines 151..158
    src/integration/common/SEO.js on lines 160..165

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

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

        it('Twitter creator', () => {
          const metaTagContent = getMetaTagContent('meta[name="twitter:creator"]');
    
          expect(metaTagContent).toBeTruthy();
          expect(metaTagContent).toMatchSnapshot();
    Severity: Major
    Found in src/integration/common/SEO.js and 15 other locations - About 50 mins to fix
    src/integration/common/SEO.js on lines 47..52
    src/integration/common/SEO.js on lines 54..59
    src/integration/common/SEO.js on lines 61..66
    src/integration/common/SEO.js on lines 68..73
    src/integration/common/SEO.js on lines 75..80
    src/integration/common/SEO.js on lines 82..87
    src/integration/common/SEO.js on lines 89..94
    src/integration/common/SEO.js on lines 96..101
    src/integration/common/SEO.js on lines 110..117
    src/integration/common/SEO.js on lines 119..126
    src/integration/common/SEO.js on lines 128..133
    src/integration/common/SEO.js on lines 135..142
    src/integration/common/SEO.js on lines 144..149
    src/integration/common/SEO.js on lines 151..158
    src/integration/common/SEO.js on lines 160..165

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

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

        it('OG title', () => {
          const metaTagContent = getMetaTagContent('meta[property="og:title"]');
    
          expect(metaTagContent).toBeTruthy();
          expect(metaTagContent).toMatchSnapshot();
    Severity: Major
    Found in src/integration/common/SEO.js and 15 other locations - About 50 mins to fix
    src/integration/common/SEO.js on lines 47..52
    src/integration/common/SEO.js on lines 54..59
    src/integration/common/SEO.js on lines 61..66
    src/integration/common/SEO.js on lines 68..73
    src/integration/common/SEO.js on lines 75..80
    src/integration/common/SEO.js on lines 82..87
    src/integration/common/SEO.js on lines 89..94
    src/integration/common/SEO.js on lines 96..101
    src/integration/common/SEO.js on lines 103..108
    src/integration/common/SEO.js on lines 110..117
    src/integration/common/SEO.js on lines 119..126
    src/integration/common/SEO.js on lines 128..133
    src/integration/common/SEO.js on lines 135..142
    src/integration/common/SEO.js on lines 151..158
    src/integration/common/SEO.js on lines 160..165

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

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

        it('OG locale', () => {
          const metaTagContent = getMetaTagContent('meta[property="og:locale"]');
    
          expect(metaTagContent).toBeTruthy();
          expect(metaTagContent).toMatchSnapshot();
    Severity: Major
    Found in src/integration/common/SEO.js and 15 other locations - About 50 mins to fix
    src/integration/common/SEO.js on lines 47..52
    src/integration/common/SEO.js on lines 54..59
    src/integration/common/SEO.js on lines 61..66
    src/integration/common/SEO.js on lines 75..80
    src/integration/common/SEO.js on lines 82..87
    src/integration/common/SEO.js on lines 89..94
    src/integration/common/SEO.js on lines 96..101
    src/integration/common/SEO.js on lines 103..108
    src/integration/common/SEO.js on lines 110..117
    src/integration/common/SEO.js on lines 119..126
    src/integration/common/SEO.js on lines 128..133
    src/integration/common/SEO.js on lines 135..142
    src/integration/common/SEO.js on lines 144..149
    src/integration/common/SEO.js on lines 151..158
    src/integration/common/SEO.js on lines 160..165

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

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

        it('OG image', () => {
          const metaTagContent = getMetaTagContent('meta[property="og:image"]');
    
          expect(metaTagContent).toBeTruthy();
          expect(metaTagContent).toMatchSnapshot();
    Severity: Major
    Found in src/integration/common/SEO.js and 15 other locations - About 50 mins to fix
    src/integration/common/SEO.js on lines 47..52
    src/integration/common/SEO.js on lines 61..66
    src/integration/common/SEO.js on lines 68..73
    src/integration/common/SEO.js on lines 75..80
    src/integration/common/SEO.js on lines 82..87
    src/integration/common/SEO.js on lines 89..94
    src/integration/common/SEO.js on lines 96..101
    src/integration/common/SEO.js on lines 103..108
    src/integration/common/SEO.js on lines 110..117
    src/integration/common/SEO.js on lines 119..126
    src/integration/common/SEO.js on lines 128..133
    src/integration/common/SEO.js on lines 135..142
    src/integration/common/SEO.js on lines 144..149
    src/integration/common/SEO.js on lines 151..158
    src/integration/common/SEO.js on lines 160..165

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

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

        it('Twitter image alt', () => {
          const metaTagContent = getMetaTagContent(
            'meta[name="twitter:image:alt"]',
          );
    
    
    Severity: Major
    Found in src/integration/common/SEO.js and 15 other locations - About 50 mins to fix
    src/integration/common/SEO.js on lines 47..52
    src/integration/common/SEO.js on lines 54..59
    src/integration/common/SEO.js on lines 61..66
    src/integration/common/SEO.js on lines 68..73
    src/integration/common/SEO.js on lines 75..80
    src/integration/common/SEO.js on lines 82..87
    src/integration/common/SEO.js on lines 89..94
    src/integration/common/SEO.js on lines 96..101
    src/integration/common/SEO.js on lines 103..108
    src/integration/common/SEO.js on lines 119..126
    src/integration/common/SEO.js on lines 128..133
    src/integration/common/SEO.js on lines 135..142
    src/integration/common/SEO.js on lines 144..149
    src/integration/common/SEO.js on lines 151..158
    src/integration/common/SEO.js on lines 160..165

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

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

        it('OG description', () => {
          const metaTagContent = getMetaTagContent(
            'meta[property="og:description"]',
          );
    
    
    Severity: Major
    Found in src/integration/common/SEO.js and 15 other locations - About 50 mins to fix
    src/integration/common/SEO.js on lines 47..52
    src/integration/common/SEO.js on lines 54..59
    src/integration/common/SEO.js on lines 61..66
    src/integration/common/SEO.js on lines 68..73
    src/integration/common/SEO.js on lines 75..80
    src/integration/common/SEO.js on lines 82..87
    src/integration/common/SEO.js on lines 89..94
    src/integration/common/SEO.js on lines 96..101
    src/integration/common/SEO.js on lines 103..108
    src/integration/common/SEO.js on lines 110..117
    src/integration/common/SEO.js on lines 119..126
    src/integration/common/SEO.js on lines 128..133
    src/integration/common/SEO.js on lines 144..149
    src/integration/common/SEO.js on lines 151..158
    src/integration/common/SEO.js on lines 160..165

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

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

        it('Twitter card', () => {
          const metaTagContent = getMetaTagContent('meta[name="twitter:card"]');
    
          expect(metaTagContent).toBeTruthy();
          expect(metaTagContent).toMatchSnapshot();
    Severity: Major
    Found in src/integration/common/SEO.js and 15 other locations - About 50 mins to fix
    src/integration/common/SEO.js on lines 47..52
    src/integration/common/SEO.js on lines 54..59
    src/integration/common/SEO.js on lines 61..66
    src/integration/common/SEO.js on lines 68..73
    src/integration/common/SEO.js on lines 75..80
    src/integration/common/SEO.js on lines 82..87
    src/integration/common/SEO.js on lines 89..94
    src/integration/common/SEO.js on lines 103..108
    src/integration/common/SEO.js on lines 110..117
    src/integration/common/SEO.js on lines 119..126
    src/integration/common/SEO.js on lines 128..133
    src/integration/common/SEO.js on lines 135..142
    src/integration/common/SEO.js on lines 144..149
    src/integration/common/SEO.js on lines 151..158
    src/integration/common/SEO.js on lines 160..165

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

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

        it('OG image alt', () => {
          const metaTagContent = getMetaTagContent('meta[property="og:image:alt"]');
    
          expect(metaTagContent).toBeTruthy();
          expect(metaTagContent).toMatchSnapshot();
    Severity: Major
    Found in src/integration/common/SEO.js and 15 other locations - About 50 mins to fix
    src/integration/common/SEO.js on lines 47..52
    src/integration/common/SEO.js on lines 54..59
    src/integration/common/SEO.js on lines 68..73
    src/integration/common/SEO.js on lines 75..80
    src/integration/common/SEO.js on lines 82..87
    src/integration/common/SEO.js on lines 89..94
    src/integration/common/SEO.js on lines 96..101
    src/integration/common/SEO.js on lines 103..108
    src/integration/common/SEO.js on lines 110..117
    src/integration/common/SEO.js on lines 119..126
    src/integration/common/SEO.js on lines 128..133
    src/integration/common/SEO.js on lines 135..142
    src/integration/common/SEO.js on lines 144..149
    src/integration/common/SEO.js on lines 151..158
    src/integration/common/SEO.js on lines 160..165

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

    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