bbc/psammead

View on GitHub
packages/utilities/psammead-styles/src/font-families.js

Summary

Maintainability
D
2 days
Test Coverage
A
100%

File font-families.js has 313 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 *  BBC REITH
 */
const reithFallback = `Helvetica, Arial, sans-serif;`;
const reithSans = `font-family: ReithSans, ${reithFallback}`;
Severity: Minor
Found in packages/utilities/psammead-styles/src/font-families.js - About 3 hrs to fix

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

    const reithQalamStyles = {
      sansRegular: `
        ${reithQalamFontFamily}
        ${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 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 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 sinhalaStyles = {
      sansRegular: `
        ${sinhalaFontFamily}
        ${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 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 marathiStyles = {
      sansRegular: `
        ${marathiFontFamily}
        ${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 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 17 locations. Consider refactoring.
    Open

    const bengaliStyles = {
      sansRegular: `
        ${bengaliFontFamily}
        ${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 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 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 amharicStyles = {
      sansRegular: `
        ${amharicFontFamily}
        ${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 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 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 17 locations. Consider refactoring.
    Open

    const punjabiStyles = {
      sansRegular: `
        ${punjabiFontFamily}
        ${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 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 thaiStyles = {
      sansRegular: `
        ${thaiFontFamily}
        ${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 310..319
    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 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 tamilStyles = {
      sansRegular: `
        ${tamilFontFamily}
        ${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 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 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 17 locations. Consider refactoring.
    Open

    const chineseFontStyles = {
      sansRegular: `
        ${chineseFontFamily}
        ${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 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 17 locations. Consider refactoring.
    Open

    const koreanStyles = {
      sansRegular: `
        ${koreanFontFamily}
        ${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 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 17 locations. Consider refactoring.
    Open

    const gujaratiStyles = {
      sansRegular: `
        ${gujaratiFontFamily}
        ${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 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 17 locations. Consider refactoring.
    Open

    const hindiStyles = {
      sansRegular: `
        ${hindiFontFamily}
        ${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 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 17 locations. Consider refactoring.
    Open

    const japaneseStyles = {
      sansRegular: `
        ${japaneseFontFamily}
        ${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 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 17 locations. Consider refactoring.
    Open

    const tigrinyaStyles = {
      sansRegular: `
        ${tigrinyaFontFamily}
        ${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 310..319
    packages/utilities/psammead-styles/src/font-families.js on lines 326..335

    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 optimoBaseFontStyles = {
      sansRegular: latinReithFontStyles.sansRegular,
      sansRegularItalic: latinReithFontStyles.sansRegularItalic,
      sansBold: latinReithFontStyles.sansBold,
      sansBoldItalic: latinReithFontStyles.sansBoldItalic,
    Severity: Minor
    Found in packages/utilities/psammead-styles/src/font-families.js and 1 other location - About 35 mins to fix
    packages/components/psammead-grid/src/index.jsx on lines 321..327

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 47.

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

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

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

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

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status