bbc/psammead

View on GitHub

Showing 201 of 201 total issues

File index.stories.jsx has 2284 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs } from '@storybook/addon-knobs';
import {
  withServicesKnob,
Severity: Major
Found in packages/components/psammead-grid/src/index.stories.jsx - About 6 days to fix

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

    const devanagariAndGurmukhiTypography = {
      atlas: {
        groupA: {
          fontSize: '78',
          lineHeight: '84',
    packages/utilities/gel-foundations/src/scripts/latin-and-cyrillic.js on lines 4..215
    packages/utilities/gel-foundations/src/scripts/latin-with-diacritics.js on lines 5..216

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

    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 latinAndCyrillicTypography = {
      atlas: {
        groupA: {
          fontSize: '78',
          lineHeight: '84',
    packages/utilities/gel-foundations/src/scripts/devanagari-and-gurmukhi.js on lines 5..216
    packages/utilities/gel-foundations/src/scripts/latin-with-diacritics.js on lines 5..216

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

    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 latinWithDiacriticsTypography = {
      atlas: {
        groupA: {
          fontSize: '78',
          lineHeight: '84',
    packages/utilities/gel-foundations/src/scripts/devanagari-and-gurmukhi.js on lines 5..216
    packages/utilities/gel-foundations/src/scripts/latin-and-cyrillic.js on lines 4..215

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

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

    const thaiTypography = {
      atlas: {
        groupA: {
          fontSize: '78',
          lineHeight: '84',
    Severity: Major
    Found in packages/utilities/gel-foundations/src/scripts/thai.js and 6 other locations - About 4 days to fix
    packages/utilities/gel-foundations/src/scripts/arabic.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/bengali.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/burmese.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/no-ascenders-or-descenders.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/sinhalese.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/tamil.js on lines 1..212

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

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

    const noAscOrDescTypography = {
      atlas: {
        groupA: {
          fontSize: '78',
          lineHeight: '84',
    packages/utilities/gel-foundations/src/scripts/arabic.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/bengali.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/burmese.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/sinhalese.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/tamil.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/thai.js on lines 1..212

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

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

    const tamilTypography = {
      atlas: {
        groupA: {
          fontSize: '78',
          lineHeight: '84',
    Severity: Major
    Found in packages/utilities/gel-foundations/src/scripts/tamil.js and 6 other locations - About 4 days to fix
    packages/utilities/gel-foundations/src/scripts/arabic.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/bengali.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/burmese.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/no-ascenders-or-descenders.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/sinhalese.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/thai.js on lines 1..212

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

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

    const bengaliTypography = {
      atlas: {
        groupA: {
          fontSize: '78',
          lineHeight: '84',
    Severity: Major
    Found in packages/utilities/gel-foundations/src/scripts/bengali.js and 6 other locations - About 4 days to fix
    packages/utilities/gel-foundations/src/scripts/arabic.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/burmese.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/no-ascenders-or-descenders.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/sinhalese.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/tamil.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/thai.js on lines 1..212

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

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

    const sinhaleseTypography = {
      atlas: {
        groupA: {
          fontSize: '78',
          lineHeight: '84',
    Severity: Major
    Found in packages/utilities/gel-foundations/src/scripts/sinhalese.js and 6 other locations - About 4 days to fix
    packages/utilities/gel-foundations/src/scripts/arabic.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/bengali.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/burmese.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/no-ascenders-or-descenders.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/tamil.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/thai.js on lines 1..212

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

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

    const burmeseTypography = {
      atlas: {
        groupA: {
          fontSize: '78',
          lineHeight: '84',
    Severity: Major
    Found in packages/utilities/gel-foundations/src/scripts/burmese.js and 6 other locations - About 4 days to fix
    packages/utilities/gel-foundations/src/scripts/arabic.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/bengali.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/no-ascenders-or-descenders.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/sinhalese.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/tamil.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/thai.js on lines 1..212

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

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

    const arabicTypography = {
      atlas: {
        groupA: {
          fontSize: '78',
          lineHeight: '84',
    Severity: Major
    Found in packages/utilities/gel-foundations/src/scripts/arabic.js and 6 other locations - About 4 days to fix
    packages/utilities/gel-foundations/src/scripts/bengali.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/burmese.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/no-ascenders-or-descenders.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/sinhalese.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/tamil.js on lines 1..212
    packages/utilities/gel-foundations/src/scripts/thai.js on lines 1..212

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

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

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

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

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

    Refactorings

    Further Reading

    File text-variants.js has 681 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    const DEFAULT_BRAND_BACKGROUND_COLOUR = '#B80000';
    const DEFAULT_BRAND_FOREGROUND_COLOUR = '#FDFDFD';
    const DEFAULT_BRAND_BORDER_COLOUR = '#EAB3B3';
    const DEFAULT_BRAND_HIGHLIGHT_COLOUR = '#FFFFFF';
    
    
    Severity: Major
    Found in packages/utilities/psammead-storybook-helpers/src/text-variants.js - About 1 day to fix

      File candy-xml.test.js has 562 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      const { candyXmlToRichText } = require('../src/index');
      
      const createBody = inner =>
        `<body xmlns="http://www.bbc.co.uk/asset" xml:space="preserve" xml:base="http://www.bbc.co.uk/article/abc123">${inner}</body>`;
      
      

        File index.stories.jsx has 474 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import React from 'react';
        import { storiesOf } from '@storybook/react';
        import styled from '@emotion/styled';
        import {
          color,
        Severity: Minor
        Found in packages/components/psammead-navigation/src/index.stories.jsx - About 7 hrs to fix

          File fonts.js has 461 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          const baseFontUrl = 'https://gel.files.bbci.co.uk/r2.511/';
          
          const baseUrlNotoSerifSinhala =
            'https://ws-downloads.files.bbci.co.uk/fonts/NotoSerifSinhala/v1.00/';
          
          
          Severity: Minor
          Found in packages/utilities/psammead-styles/src/fonts.js - About 7 hrs to fix

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

            export const custom = {
              alt: 'By Elisa Decker, from her series "Sidewalk"',
              attribution: 'Elisa Decker',
              sizes: '100vw',
              src: customImageUrl.replace('[WIDTH]', sizes[0]),
            packages/components/psammead-image/src/testHelpers/fixtureData.js on lines 7..22
            packages/components/psammead-image/src/testHelpers/fixtureData.js on lines 24..40
            packages/components/psammead-image/src/testHelpers/fixtureData.js on lines 42..57

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

            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

            export const square = {
              alt: 'Tracks through the snow',
              attribution: 'BBC',
              sizes: '100vw',
              src: squareImageUrl.replace('[WIDTH]', sizes[0]),
            packages/components/psammead-image/src/testHelpers/fixtureData.js on lines 7..22
            packages/components/psammead-image/src/testHelpers/fixtureData.js on lines 24..40
            packages/components/psammead-image/src/testHelpers/fixtureData.js on lines 59..74

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 158.

            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

            export const landscape = {
              alt: 'Student sitting an exam',
              attribution: '',
              sizes: '100vw',
              src: landscapeImageUrl.replace('[WIDTH]', sizes[0]),
            packages/components/psammead-image/src/testHelpers/fixtureData.js on lines 24..40
            packages/components/psammead-image/src/testHelpers/fixtureData.js on lines 42..57
            packages/components/psammead-image/src/testHelpers/fixtureData.js on lines 59..74

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 158.

            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

            export const portrait = {
              alt:
                'Map of the UK displaying Syrian refugees and asylum seekers per 10000 population. Ranges from 0 to 17.',
              attribution: 'BBC',
              sizes: '100vw',
            packages/components/psammead-image/src/testHelpers/fixtureData.js on lines 7..22
            packages/components/psammead-image/src/testHelpers/fixtureData.js on lines 42..57
            packages/components/psammead-image/src/testHelpers/fixtureData.js on lines 59..74

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 158.

            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 korean = {
              group: (
                <g
                  fillRule="evenodd"
                  stroke="#000"
            Severity: Major
            Found in packages/utilities/psammead-assets/src/svgs/korean.jsx and 2 other locations - About 5 hrs to fix
            packages/utilities/psammead-assets/src/svgs/japanese.jsx on lines 5..25
            packages/utilities/psammead-assets/src/svgs/zhongwen.jsx on lines 5..25

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

            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