bbc/psammead

View on GitHub

Showing 168 of 201 total issues

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

  mundo: {
    text: 'Lo que todos podemos aprender de esta foto de un hombre',
    longText:
      'Colombia entra a su sexto día de protestas sin que se resuelvan dos preguntas clave: cuál es el problema y cuáles las soluciones. Uno de expertos en el país más famosos del mundo, el economista británico James Robinson, habló con BBC Mundo sobre esta complejidad histórica.',
    script: 'latinDiacritics',
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 7..19
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 20..32
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 33..45
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 60..72
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 73..85
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 86..98
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 99..111
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 112..124
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 125..137
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 138..150
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 151..163
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 164..176
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 177..190
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 191..203
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 204..216
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 217..229
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 230..242
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 256..268
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 269..281
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 282..294
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 308..320
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 351..363
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 364..376
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 377..389
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 390..402
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 433..445
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 446..459
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 473..485
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 486..499
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 500..513
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 514..526
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 527..539
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 540..552
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 583..596
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 611..624
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 625..637
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 638..650

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

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

  uzbek: {
    text:
      'Дариға Назарбоева Қозоғистон президентининг Британияга охирги сафарида отасига ҳамроҳлик',
    longText:
      'Ўзбекистон: 12 йиллик муҳожиратдан кейин Ватанга қайтган фаол вафот этди - Толиб Ёқубов мустақил Ўзбекистондаги илк ва энг таниқли инсон ҳуқуқлари ҳимоячиларидан бири эди. У Каримов даврида Ўзбекистонни тарк этишга мажбур бўлган, муҳожиратда экан, фуқароликдан маҳрум этилганди.',
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 7..19
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 20..32
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 33..45
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 60..72
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 73..85
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 86..98
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 99..111
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 112..124
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 125..137
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 138..150
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 151..163
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 164..176
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 177..190
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 191..203
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 204..216
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 217..229
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 230..242
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 243..255
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 256..268
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 269..281
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 282..294
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 308..320
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 351..363
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 364..376
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 377..389
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 390..402
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 433..445
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 446..459
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 473..485
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 486..499
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 500..513
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 514..526
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 527..539
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 540..552
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 583..596
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 625..637
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 638..650

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

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

const burmeseStyles = {
  sansRegular: `
    ${burmeseFontFamily}
    ${getFontStyleAndWeight('normal', 400)}
  `,
Severity: Major
Found in packages/utilities/psammead-styles/src/font-families.js and 16 other locations - About 1 hr to fix
packages/utilities/psammead-styles/src/font-families.js on lines 85..94
packages/utilities/psammead-styles/src/font-families.js on lines 101..110
packages/utilities/psammead-styles/src/font-families.js on lines 117..126
packages/utilities/psammead-styles/src/font-families.js on lines 149..158
packages/utilities/psammead-styles/src/font-families.js on lines 165..174
packages/utilities/psammead-styles/src/font-families.js on lines 181..190
packages/utilities/psammead-styles/src/font-families.js on lines 197..206
packages/utilities/psammead-styles/src/font-families.js on lines 213..222
packages/utilities/psammead-styles/src/font-families.js on lines 229..238
packages/utilities/psammead-styles/src/font-families.js on lines 245..254
packages/utilities/psammead-styles/src/font-families.js on lines 262..271
packages/utilities/psammead-styles/src/font-families.js on lines 278..287
packages/utilities/psammead-styles/src/font-families.js on lines 294..303
packages/utilities/psammead-styles/src/font-families.js on lines 310..319
packages/utilities/psammead-styles/src/font-families.js on lines 326..335
packages/utilities/psammead-styles/src/font-families.js on lines 342..351

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

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

  gahuza: {
    text: "Umukate n'isoda vyatumye amenya ko afise umugera wa SIDA",
    longText:
      "Phenny Awiti ni umunyakenya agendana umugera wa SIDA, akaba yamenye ko awugendana mu mwaka wa 2008, ico gihe yiga mu mwaka w'icenda.",
    script: 'latin',
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 7..19
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 20..32
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 33..45
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 60..72
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 73..85
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 86..98
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 99..111
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 125..137
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 138..150
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 151..163
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 164..176
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 177..190
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 191..203
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 204..216
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 217..229
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 230..242
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 243..255
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 256..268
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 269..281
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 282..294
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 308..320
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 351..363
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 364..376
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 377..389
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 390..402
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 433..445
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 446..459
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 473..485
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 486..499
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 500..513
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 514..526
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 527..539
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 540..552
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 583..596
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 611..624
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 625..637
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 638..650

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

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

const nepaliStyles = {
  sansRegular: `
    ${nepaliFontFamily}
    ${getFontStyleAndWeight('normal', 400)}
  `,
Severity: Major
Found in packages/utilities/psammead-styles/src/font-families.js and 16 other locations - About 1 hr to fix
packages/utilities/psammead-styles/src/font-families.js on lines 85..94
packages/utilities/psammead-styles/src/font-families.js on lines 101..110
packages/utilities/psammead-styles/src/font-families.js on lines 117..126
packages/utilities/psammead-styles/src/font-families.js on lines 133..142
packages/utilities/psammead-styles/src/font-families.js on lines 149..158
packages/utilities/psammead-styles/src/font-families.js on lines 165..174
packages/utilities/psammead-styles/src/font-families.js on lines 181..190
packages/utilities/psammead-styles/src/font-families.js on lines 197..206
packages/utilities/psammead-styles/src/font-families.js on lines 213..222
packages/utilities/psammead-styles/src/font-families.js on lines 229..238
packages/utilities/psammead-styles/src/font-families.js on lines 262..271
packages/utilities/psammead-styles/src/font-families.js on lines 278..287
packages/utilities/psammead-styles/src/font-families.js on lines 294..303
packages/utilities/psammead-styles/src/font-families.js on lines 310..319
packages/utilities/psammead-styles/src/font-families.js on lines 326..335
packages/utilities/psammead-styles/src/font-families.js on lines 342..351

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

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

const teluguStyles = {
  sansRegular: `
    ${teluguFontFamily}
    ${getFontStyleAndWeight('normal', 400)}
  `,
Severity: Major
Found in packages/utilities/psammead-styles/src/font-families.js and 16 other locations - About 1 hr to fix
packages/utilities/psammead-styles/src/font-families.js on lines 85..94
packages/utilities/psammead-styles/src/font-families.js on lines 101..110
packages/utilities/psammead-styles/src/font-families.js on lines 117..126
packages/utilities/psammead-styles/src/font-families.js on lines 133..142
packages/utilities/psammead-styles/src/font-families.js on lines 149..158
packages/utilities/psammead-styles/src/font-families.js on lines 165..174
packages/utilities/psammead-styles/src/font-families.js on lines 181..190
packages/utilities/psammead-styles/src/font-families.js on lines 197..206
packages/utilities/psammead-styles/src/font-families.js on lines 213..222
packages/utilities/psammead-styles/src/font-families.js on lines 229..238
packages/utilities/psammead-styles/src/font-families.js on lines 245..254
packages/utilities/psammead-styles/src/font-families.js on lines 262..271
packages/utilities/psammead-styles/src/font-families.js on lines 278..287
packages/utilities/psammead-styles/src/font-families.js on lines 294..303
packages/utilities/psammead-styles/src/font-families.js on lines 326..335
packages/utilities/psammead-styles/src/font-families.js on lines 342..351

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

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

  bengali: {
    text: 'ভিসা ফুরিয়ে যাওয়ায় ক্রিকেটার সাইফের জরিমানা',
    longText:
      'বিমানবন্দরে যাওয়ার আগে সাইফ দেখেন, তার ভিসার মেয়াদ দুদিন আগেই শেষ হয়ে গেছে। তখন জরিমানা দিয়ে তাকে আবার এক্সিট পারমিট নিতে হয়।',
    script: 'bengali',
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 7..19
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 20..32
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 33..45
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 60..72
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 86..98
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 99..111
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 112..124
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 125..137
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 138..150
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 151..163
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 164..176
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 177..190
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 191..203
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 204..216
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 217..229
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 230..242
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 243..255
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 256..268
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 269..281
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 282..294
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 308..320
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 351..363
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 364..376
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 377..389
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 390..402
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 433..445
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 446..459
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 473..485
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 486..499
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 500..513
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 514..526
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 527..539
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 540..552
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 583..596
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 611..624
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 625..637
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 638..650

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

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

  naidheachdan: {
    text: 'Bana-chroitear òg sna Hearadh agus an turas sònraichte aice',
    longText:
      "Bha i riamh airson a dhol a Phabaigh airson obair chudromach a bhios croitearan na sgìre a' dèanamh a h-uile bliadhna, agus am bliadhna fhuair i an cothrom a dhol còmhla riutha.",
    script: 'latin',
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 7..19
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 20..32
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 33..45
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 60..72
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 73..85
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 86..98
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 99..111
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 112..124
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 125..137
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 138..150
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 151..163
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 164..176
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 177..190
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 191..203
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 204..216
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 217..229
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 230..242
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 243..255
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 269..281
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 282..294
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 308..320
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 351..363
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 364..376
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 377..389
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 390..402
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 433..445
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 446..459
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 473..485
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 486..499
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 500..513
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 514..526
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 527..539
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 540..552
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 583..596
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 611..624
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 625..637
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 638..650

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

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

  optimobase: {
    text: 'Could a computer ever create better art than a human?',
    longText:
      'The critic, author, poet and TV host was known for his witty commentary on international television.',
    script: 'latin',
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 7..19
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 20..32
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 33..45
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 60..72
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 73..85
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 86..98
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 99..111
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 112..124
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 125..137
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 138..150
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 151..163
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 164..176
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 177..190
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 191..203
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 204..216
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 217..229
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 230..242
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 243..255
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 256..268
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 269..281
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 282..294
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 351..363
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 364..376
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 377..389
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 390..402
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 433..445
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 446..459
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 473..485
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 486..499
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 500..513
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 514..526
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 527..539
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 540..552
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 583..596
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 611..624
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 625..637
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 638..650

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

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

  sinhala: {
    text: 'සිවිල් යුද ගැටුම් හමුවේ කොටු වී සිටි සිවිල් වැසියන්',
    longText:
      'ජනාධිපතිවරණයට පෙර එම ගිවිසුමට අනිවාර්යයෙන්ම අත්සන් තබන බවට නව ප්‍රජාතන්ත්‍රවාදී පෙරමුණ අවධාරණය කළ අතර, ශ්‍රී ලංකා පොදුජන පෙරමුණ චෝදනා කළේ, එය "ඇමෙරිකානු මර උගුලක්" වන අතර ඒ හරහා ඇමෙරිකාවට ශ්‍රී ලංකාවේ ඉඩම් "කුණු කොල්ලයට" විකිණෙන බවටය.',
    script: 'sinhalese',
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 7..19
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 20..32
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 33..45
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 60..72
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 73..85
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 86..98
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 99..111
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 112..124
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 125..137
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 138..150
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 151..163
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 164..176
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 177..190
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 191..203
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 204..216
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 217..229
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 230..242
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 243..255
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 256..268
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 269..281
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 282..294
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 308..320
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 351..363
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 364..376
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 377..389
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 390..402
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 446..459
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 473..485
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 486..499
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 500..513
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 514..526
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 527..539
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 540..552
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 583..596
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 611..624
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 625..637
packages/utilities/psammead-storybook-helpers/src/text-variants.js on lines 638..650

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

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 yorubaNavData = [
  {
    title: 'Ìròyìn',
    url: '/yoruba',
  },
packages/components/psammead-navigation/testHelpers/igbo.js on lines 1..18

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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: 'Akụkọ',
    url: '/igbo',
  },
Severity: Major
Found in packages/components/psammead-navigation/testHelpers/igbo.js and 1 other location - About 1 hr to fix
packages/components/psammead-navigation/testHelpers/yoruba.js on lines 1..15

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

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

export const F_NOTO_SERIF_BENGALI_BOLD = baseUrlOverride => `
  @font-face {
    font-family: "Noto Serif Bengali";
    font-weight: 700;
    font-style: normal;
Severity: Major
Found in packages/utilities/psammead-styles/src/fonts.js and 2 other locations - About 55 mins to fix
packages/utilities/psammead-styles/src/fonts.js on lines 314..330
packages/utilities/psammead-styles/src/fonts.js on lines 350..366

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

export const F_NOTO_SERIF_SINHALA_REGULAR = baseUrlOverride => `
  @font-face {
    font-family: "Noto Serif Sinhala";
    font-weight: 400;
    font-style: normal;
Severity: Major
Found in packages/utilities/psammead-styles/src/fonts.js and 2 other locations - About 55 mins to fix
packages/utilities/psammead-styles/src/fonts.js on lines 333..348
packages/utilities/psammead-styles/src/fonts.js on lines 451..466

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

export const F_NOTO_SANS_TAMIL_REGULAR = baseUrlOverride => `
  @font-face {
    font-family: "Noto Sans Tamil";
    font-weight: 400;
    font-style: normal;
Severity: Major
Found in packages/utilities/psammead-styles/src/fonts.js and 2 other locations - About 55 mins to fix
packages/utilities/psammead-styles/src/fonts.js on lines 297..312
packages/utilities/psammead-styles/src/fonts.js on lines 451..466

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

export const F_NOTO_SERIF_SINHALA_BOLD = baseUrlOverride => `
  @font-face {
    font-family: "Noto Serif Sinhala";
    font-weight: 700;
    font-style: normal;
Severity: Major
Found in packages/utilities/psammead-styles/src/fonts.js and 2 other locations - About 55 mins to fix
packages/utilities/psammead-styles/src/fonts.js on lines 350..366
packages/utilities/psammead-styles/src/fonts.js on lines 468..484

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

export const F_NOTO_SANS_TAMIL_BOLD = baseUrlOverride => `
  @font-face {
    font-family: "Noto Sans Tamil";
    font-weight: 700;
    font-style: normal;
Severity: Major
Found in packages/utilities/psammead-styles/src/fonts.js and 2 other locations - About 55 mins to fix
packages/utilities/psammead-styles/src/fonts.js on lines 314..330
packages/utilities/psammead-styles/src/fonts.js on lines 468..484

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

export const F_NOTO_SERIF_BENGALI_REGULAR = baseUrlOverride => `
  @font-face {
    font-family: "Noto Serif Bengali";
    font-weight: 400;
    font-style: normal;
Severity: Major
Found in packages/utilities/psammead-styles/src/fonts.js and 2 other locations - About 55 mins to fix
packages/utilities/psammead-styles/src/fonts.js on lines 297..312
packages/utilities/psammead-styles/src/fonts.js on lines 333..348

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 rtlStyles = `
  margin-right: ${GEL_MARGIN_BELOW_400PX};
  border-right: 1px solid ${C_METAL};

  @media (min-width: ${GEL_GROUP_2_SCREEN_WIDTH_MIN}) and (max-width: ${GEL_GROUP_3_SCREEN_WIDTH_MAX}) {
Severity: Minor
Found in packages/components/psammead-caption/src/index.jsx and 1 other location - About 50 mins to fix
packages/components/psammead-caption/src/index.jsx on lines 36..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 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 2 locations. Consider refactoring.
Open

const ltrStyles = `
  margin-left: ${GEL_MARGIN_BELOW_400PX};
  border-left: 1px solid ${C_METAL};

  @media (min-width: ${GEL_GROUP_2_SCREEN_WIDTH_MIN}) and (max-width: ${GEL_GROUP_3_SCREEN_WIDTH_MAX}) {
Severity: Minor
Found in packages/components/psammead-caption/src/index.jsx and 1 other location - About 50 mins to fix
packages/components/psammead-caption/src/index.jsx on lines 19..34

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