Kentico/gatsby-source-kontent

View on GitHub
packages/gatsby-source/src/naming.ts

Summary

Maintainability
D
2 days
Test Coverage

Function getKontentItemsSchemaNamingConfiguration has 85 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const getKontentItemsSchemaNamingConfiguration = (
  config: PluginNamingConfiguration = defaultPluginNamingConfiguration,
): string => {
  return (
    ItemsSchemaTemplate
Severity: Major
Found in packages/gatsby-source/src/naming.ts - About 3 hrs to fix

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

    const getKontentItemElementValueTypeNameByType = (
      type: string,
      config: PluginNamingConfiguration = defaultPluginNamingConfiguration,
    ): string =>
      `${config.prefix}${CONNECTOR}${ITEM_IDENTIFIER}${CONNECTOR}${type}${CONNECTOR}${ELEMENT_IDENTIFIER}`;
    Severity: Major
    Found in packages/gatsby-source/src/naming.ts and 1 other location - About 1 hr to fix
    packages/gatsby-source/src/naming.ts on lines 65..69

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

    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 getKontentItemElementsSchemaTypeName = (
      type: string,
      config: PluginNamingConfiguration = defaultPluginNamingConfiguration,
    ): string =>
      `${config.prefix}${CONNECTOR}${ITEM_IDENTIFIER}${CONNECTOR}${type}${CONNECTOR}${MULTI_ELEMENT_IDENTIFIER}`;
    Severity: Major
    Found in packages/gatsby-source/src/naming.ts and 1 other location - About 1 hr to fix
    packages/gatsby-source/src/naming.ts on lines 59..63

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

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

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

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

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

    Refactorings

    Further Reading

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

    const getKontentTypeNodeStringForCodeName = (
      codename: string,
      config: PluginNamingConfiguration = defaultPluginNamingConfiguration,
    ): string =>
      `${config.prefix}${CONNECTOR}${TYPE_IDENTIFIER}${CONNECTOR}${codename}`;
    Severity: Major
    Found in packages/gatsby-source/src/naming.ts and 2 other locations - About 1 hr to fix
    packages/gatsby-source/src/naming.ts on lines 38..42
    packages/gatsby-source/src/naming.ts on lines 76..80

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

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

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

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

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

    Refactorings

    Further Reading

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

    const getKontentItemNodeTypeName = (
      type: string,
      config: PluginNamingConfiguration = defaultPluginNamingConfiguration,
    ): string =>
      `${config.prefix}${CONNECTOR}${ITEM_IDENTIFIER}${CONNECTOR}${type}`;
    Severity: Major
    Found in packages/gatsby-source/src/naming.ts and 2 other locations - About 1 hr to fix
    packages/gatsby-source/src/naming.ts on lines 76..80
    packages/gatsby-source/src/naming.ts on lines 96..100

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

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

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

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

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

    Refactorings

    Further Reading

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

    const getKontentTaxonomyNodeStringForCodeName = (
      codename: string,
      config: PluginNamingConfiguration = defaultPluginNamingConfiguration,
    ): string =>
      `${config.prefix}${CONNECTOR}${TAXONOMY_IDENTIFIER}${CONNECTOR}${codename}`;
    Severity: Major
    Found in packages/gatsby-source/src/naming.ts and 2 other locations - About 1 hr to fix
    packages/gatsby-source/src/naming.ts on lines 38..42
    packages/gatsby-source/src/naming.ts on lines 96..100

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

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

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

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

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

    Refactorings

    Further Reading

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

    const getKontentTypesCacheKey = (
      config: PluginNamingConfiguration = defaultPluginNamingConfiguration,
    ): string =>
      `${config.prefix}${CONNECTOR}${TYPE_IDENTIFIER}${CONNECTOR}${CACHE_IDENTIFIER}`;
    Severity: Major
    Found in packages/gatsby-source/src/naming.ts and 6 other locations - About 55 mins to fix
    packages/gatsby-source/src/naming.ts on lines 48..51
    packages/gatsby-source/src/naming.ts on lines 71..74
    packages/gatsby-source/src/naming.ts on lines 86..89
    packages/gatsby-source/src/naming.ts on lines 91..94
    packages/gatsby-source/src/naming.ts on lines 106..109
    packages/gatsby-source/src/naming.ts on lines 111..114

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

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

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

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

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

    Refactorings

    Further Reading

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

    const getKontentTaxonomySystemElementTypeName = (
      config: PluginNamingConfiguration = defaultPluginNamingConfiguration,
    ): string =>
      `${config.prefix}${CONNECTOR}${TAXONOMY_IDENTIFIER}${CONNECTOR}${SYSTEM_IDENTIFIER}`;
    Severity: Major
    Found in packages/gatsby-source/src/naming.ts and 6 other locations - About 55 mins to fix
    packages/gatsby-source/src/naming.ts on lines 48..51
    packages/gatsby-source/src/naming.ts on lines 71..74
    packages/gatsby-source/src/naming.ts on lines 91..94
    packages/gatsby-source/src/naming.ts on lines 106..109
    packages/gatsby-source/src/naming.ts on lines 111..114
    packages/gatsby-source/src/naming.ts on lines 123..126

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

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

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

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

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

    Refactorings

    Further Reading

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

    const getKontentItemSystemElementTypeName = (
      config: PluginNamingConfiguration = defaultPluginNamingConfiguration,
    ): string =>
      `${config.prefix}${CONNECTOR}${ITEM_IDENTIFIER}${CONNECTOR}${SYSTEM_IDENTIFIER}`;
    Severity: Major
    Found in packages/gatsby-source/src/naming.ts and 6 other locations - About 55 mins to fix
    packages/gatsby-source/src/naming.ts on lines 71..74
    packages/gatsby-source/src/naming.ts on lines 86..89
    packages/gatsby-source/src/naming.ts on lines 91..94
    packages/gatsby-source/src/naming.ts on lines 106..109
    packages/gatsby-source/src/naming.ts on lines 111..114
    packages/gatsby-source/src/naming.ts on lines 123..126

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

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

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

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

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

    Refactorings

    Further Reading

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

    const getKontentTypeSystemElementTypeName = (
      config: PluginNamingConfiguration = defaultPluginNamingConfiguration,
    ): string =>
      `${config.prefix}${CONNECTOR}${TYPE_IDENTIFIER}${CONNECTOR}${SYSTEM_IDENTIFIER}`;
    Severity: Major
    Found in packages/gatsby-source/src/naming.ts and 6 other locations - About 55 mins to fix
    packages/gatsby-source/src/naming.ts on lines 48..51
    packages/gatsby-source/src/naming.ts on lines 71..74
    packages/gatsby-source/src/naming.ts on lines 86..89
    packages/gatsby-source/src/naming.ts on lines 91..94
    packages/gatsby-source/src/naming.ts on lines 111..114
    packages/gatsby-source/src/naming.ts on lines 123..126

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

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

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

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

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

    Refactorings

    Further Reading

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

    const getKontentItemLanguageLinkExtensionName = (
      config: PluginNamingConfiguration = defaultPluginNamingConfiguration,
    ): string =>
      `${config.prefix}${CONNECTOR}${ITEM_IDENTIFIER}${CONNECTOR}${LANGUAGE_LINK_EXTENSION_IDENTIFIER}`;
    Severity: Major
    Found in packages/gatsby-source/src/naming.ts and 6 other locations - About 55 mins to fix
    packages/gatsby-source/src/naming.ts on lines 48..51
    packages/gatsby-source/src/naming.ts on lines 86..89
    packages/gatsby-source/src/naming.ts on lines 91..94
    packages/gatsby-source/src/naming.ts on lines 106..109
    packages/gatsby-source/src/naming.ts on lines 111..114
    packages/gatsby-source/src/naming.ts on lines 123..126

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

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

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

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

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

    Refactorings

    Further Reading

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

    const getKontentTypeElementTypeName = (
      config: PluginNamingConfiguration = defaultPluginNamingConfiguration,
    ): string =>
      `${config.prefix}${CONNECTOR}${TYPE_IDENTIFIER}${CONNECTOR}${ELEMENT_IDENTIFIER}`;
    Severity: Major
    Found in packages/gatsby-source/src/naming.ts and 6 other locations - About 55 mins to fix
    packages/gatsby-source/src/naming.ts on lines 48..51
    packages/gatsby-source/src/naming.ts on lines 71..74
    packages/gatsby-source/src/naming.ts on lines 86..89
    packages/gatsby-source/src/naming.ts on lines 91..94
    packages/gatsby-source/src/naming.ts on lines 106..109
    packages/gatsby-source/src/naming.ts on lines 123..126

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

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

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

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

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

    Refactorings

    Further Reading

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

    const getKontentTaxonomyTermTypeName = (
      config: PluginNamingConfiguration = defaultPluginNamingConfiguration,
    ): string =>
      `${config.prefix}${CONNECTOR}${TAXONOMY_IDENTIFIER}${CONNECTOR}${TAXONOMY_TERM_IDENTIFIER}`;
    Severity: Major
    Found in packages/gatsby-source/src/naming.ts and 6 other locations - About 55 mins to fix
    packages/gatsby-source/src/naming.ts on lines 48..51
    packages/gatsby-source/src/naming.ts on lines 71..74
    packages/gatsby-source/src/naming.ts on lines 86..89
    packages/gatsby-source/src/naming.ts on lines 106..109
    packages/gatsby-source/src/naming.ts on lines 111..114
    packages/gatsby-source/src/naming.ts on lines 123..126

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

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

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

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

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

    Refactorings

    Further Reading

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

    const getKontentItemInterfaceName = (
      config: PluginNamingConfiguration = defaultPluginNamingConfiguration,
    ): string => `${config.prefix}${CONNECTOR}${ITEM_IDENTIFIER}`;
    Severity: Minor
    Found in packages/gatsby-source/src/naming.ts and 2 other locations - About 35 mins to fix
    packages/gatsby-source/src/naming.ts on lines 82..84
    packages/gatsby-source/src/naming.ts on lines 102..104

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

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

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

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

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

    Refactorings

    Further Reading

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

    const getKontentTaxonomyTypeName = (
      config: PluginNamingConfiguration = defaultPluginNamingConfiguration,
    ): string => `${config.prefix}${CONNECTOR}${TAXONOMY_IDENTIFIER}`;
    Severity: Minor
    Found in packages/gatsby-source/src/naming.ts and 2 other locations - About 35 mins to fix
    packages/gatsby-source/src/naming.ts on lines 44..46
    packages/gatsby-source/src/naming.ts on lines 102..104

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

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

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

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

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

    Refactorings

    Further Reading

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

    const getKontentTypeTypeName = (
      config: PluginNamingConfiguration = defaultPluginNamingConfiguration,
    ): string => `${config.prefix}${CONNECTOR}${TYPE_IDENTIFIER}`;
    Severity: Minor
    Found in packages/gatsby-source/src/naming.ts and 2 other locations - About 35 mins to fix
    packages/gatsby-source/src/naming.ts on lines 44..46
    packages/gatsby-source/src/naming.ts on lines 82..84

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

    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