bbc/psammead

View on GitHub

Showing 168 of 201 total issues

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

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

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

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

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

const zhongwen = {
  group: (
    <g
      fillRule="evenodd"
      stroke="#000"
Severity: Major
Found in packages/utilities/psammead-assets/src/svgs/zhongwen.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/korean.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

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

const igboNavData = [
  {
    title: 'Home',
    url: '/pidgin',
  },
.storybook/preview.js on lines 69..79

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

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 fontPathMap = [
  { prefix: 'F_MALLANNA', path: 'fonts/Mallanna/' },
  { prefix: 'F_NOTO_SANS_ETHIOPIC', path: 'fonts/NotoSansEthiopic/' },
  { prefix: 'F_NOTO_SANS_TAMIL', path: 'fonts/NotoSerifTamil/' },
  { prefix: 'F_NOTO_SERIF_BENGALI', path: 'fonts/NotoSerifBengali/' },
Severity: Major
Found in .storybook/preview.js and 1 other location - About 4 hrs to fix
packages/components/psammead-navigation/testHelpers/pidgin.js on lines 1..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 116.

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

export const Headline = styled.h1`
  ${({ script }) => script && getCanon(script)};
  ${({ service }) => getSerifMedium(service)}
  color: ${({ darkMode }) => (darkMode ? C_LUNAR : C_SHADOW)};
  display: block; /* Explicitly set */
Severity: Major
Found in packages/components/psammead-headings/src/index.jsx and 1 other location - About 3 hrs to fix
packages/components/psammead-headings/src/index.jsx on lines 36..45

Duplicated Code

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

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

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

Tuning

This issue has a mass of 99.

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