realitix/vulk

View on GitHub
vulk/vulkanconstant.py

Summary

Maintainability
F
1 wk
Test Coverage

File vulkanconstant.py has 630 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'''
This module contains useful mapping or constants.

Vulkan enum are translated to Python enum.
There are two types of enumeration, `IntEnum` and `IntFlag`.
Severity: Major
Found in vulk/vulkanconstant.py - About 1 day to fix

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

    class PipelineStage(IntFlag):
        NONE = 0
        TOP_OF_PIPE = vk.VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT
        DRAW_INDIRECT = vk.VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT
        VERTEX_INPUT = vk.VK_PIPELINE_STAGE_VERTEX_INPUT_BIT
    Severity: Major
    Found in vulk/vulkanconstant.py and 1 other location - About 1 day to fix
    vulk/vulkanconstant.py on lines 27..45

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 128.

    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

    class Access(IntFlag):
        NONE = 0
        INDIRECT_COMMAND_READ = vk.VK_ACCESS_INDIRECT_COMMAND_READ_BIT
        INDEX_READ = vk.VK_ACCESS_INDEX_READ_BIT
        VERTEX_ATTRIBUTE_READ = vk.VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT
    Severity: Major
    Found in vulk/vulkanconstant.py and 1 other location - About 1 day to fix
    vulk/vulkanconstant.py on lines 573..591

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

    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

    class DescriptorType(IntEnum):
        NONE = 0
        SAMPLER = vk.VK_DESCRIPTOR_TYPE_SAMPLER
        COMBINED_IMAGE_SAMPLER = vk.VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
        SAMPLED_IMAGE = vk.VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
    Severity: Major
    Found in vulk/vulkanconstant.py and 1 other location - About 5 hrs to fix
    vulk/vulkanconstant.py on lines 601..613

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

    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

    class PrimitiveTopology(IntEnum):
        NONE = 0
        POINT_LIST = vk.VK_PRIMITIVE_TOPOLOGY_POINT_LIST
        LINE_LIST = vk.VK_PRIMITIVE_TOPOLOGY_LINE_LIST
        LINE_STRIP = vk.VK_PRIMITIVE_TOPOLOGY_LINE_STRIP
    Severity: Major
    Found in vulk/vulkanconstant.py and 1 other location - About 5 hrs to fix
    vulk/vulkanconstant.py on lines 212..224

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

    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

    class ShaderStage(IntFlag):
        NONE = 0
        VERTEX = vk.VK_SHADER_STAGE_VERTEX_BIT
        TESSELLATION_CONTROL = vk.VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT
        TESSELLATION_EVALUATION = vk.VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT # noqa
    Severity: Major
    Found in vulk/vulkanconstant.py and 2 other locations - About 3 hrs to fix
    vulk/vulkanconstant.py on lines 155..164
    vulk/vulkanconstant.py on lines 509..518

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

    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

    class CompareOp(IntEnum):
        NONE = 0
        NEVER = vk.VK_COMPARE_OP_NEVER
        LESS = vk.VK_COMPARE_OP_LESS
        EQUAL = vk.VK_COMPARE_OP_EQUAL
    Severity: Major
    Found in vulk/vulkanconstant.py and 2 other locations - About 3 hrs to fix
    vulk/vulkanconstant.py on lines 509..518
    vulk/vulkanconstant.py on lines 642..651

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

    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

    class ImageUsage(IntFlag):
        NONE = 0
        TRANSFER_SRC = vk.VK_IMAGE_USAGE_TRANSFER_SRC_BIT
        TRANSFER_DST = vk.VK_IMAGE_USAGE_TRANSFER_DST_BIT
        SAMPLED = vk.VK_IMAGE_USAGE_SAMPLED_BIT
    Severity: Major
    Found in vulk/vulkanconstant.py and 2 other locations - About 3 hrs to fix
    vulk/vulkanconstant.py on lines 155..164
    vulk/vulkanconstant.py on lines 642..651

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

    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

    class SampleCount(IntFlag):
        NONE = 0
        COUNT_1 = vk.VK_SAMPLE_COUNT_1_BIT
        COUNT_2 = vk.VK_SAMPLE_COUNT_2_BIT
        COUNT_4 = vk.VK_SAMPLE_COUNT_4_BIT
    Severity: Major
    Found in vulk/vulkanconstant.py and 2 other locations - About 2 hrs to fix
    vulk/vulkanconstant.py on lines 167..175
    vulk/vulkanconstant.py on lines 521..529

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

    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

    class ComponentSwizzle(IntEnum):
        NONE = 0
        IDENTITY = vk.VK_COMPONENT_SWIZZLE_IDENTITY
        ZERO = vk.VK_COMPONENT_SWIZZLE_ZERO
        ONE = vk.VK_COMPONENT_SWIZZLE_ONE
    Severity: Major
    Found in vulk/vulkanconstant.py and 2 other locations - About 2 hrs to fix
    vulk/vulkanconstant.py on lines 521..529
    vulk/vulkanconstant.py on lines 616..624

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

    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

    class ImageViewType(IntEnum):
        NONE = 0
        TYPE_1D = vk.VK_IMAGE_VIEW_TYPE_1D
        TYPE_2D = vk.VK_IMAGE_VIEW_TYPE_2D
        TYPE_3D = vk.VK_IMAGE_VIEW_TYPE_3D
    Severity: Major
    Found in vulk/vulkanconstant.py and 2 other locations - About 2 hrs to fix
    vulk/vulkanconstant.py on lines 167..175
    vulk/vulkanconstant.py on lines 616..624

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

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

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

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

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

    Refactorings

    Further Reading

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

    class VmaMemoryUsage(IntEnum):
        NONE = 0
        UNKNOWN = vma.VMA_MEMORY_USAGE_UNKNOWN
        GPU_ONLY = vma.VMA_MEMORY_USAGE_GPU_ONLY
        CPU_ONLY = vma.VMA_MEMORY_USAGE_CPU_ONLY
    Severity: Major
    Found in vulk/vulkanconstant.py and 3 other locations - About 1 hr to fix
    vulk/vulkanconstant.py on lines 84..90
    vulk/vulkanconstant.py on lines 558..564
    vulk/vulkanconstant.py on lines 627..633

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

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

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

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

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

    Refactorings

    Further Reading

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

    class MemoryProperty(IntFlag):
        NONE = 0
        DEVICE_LOCAL = vk.VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
        HOST_VISIBLE = vk.VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
        HOST_COHERENT = vk.VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
    Severity: Major
    Found in vulk/vulkanconstant.py and 3 other locations - About 1 hr to fix
    vulk/vulkanconstant.py on lines 84..90
    vulk/vulkanconstant.py on lines 627..633
    vulk/vulkanconstant.py on lines 672..678

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

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

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

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

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

    Refactorings

    Further Reading

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

    class SamplerAddressMode(IntEnum):
        NONE = 0
        REPEAT = vk.VK_SAMPLER_ADDRESS_MODE_REPEAT
        MIRRORED_REPEAT = vk.VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT
        CLAMP_TO_EDGE = vk.VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
    Severity: Major
    Found in vulk/vulkanconstant.py and 3 other locations - About 1 hr to fix
    vulk/vulkanconstant.py on lines 84..90
    vulk/vulkanconstant.py on lines 558..564
    vulk/vulkanconstant.py on lines 672..678

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

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

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

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

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

    Refactorings

    Further Reading

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

    class BlendOp(IntEnum):
        NONE = 0
        ADD = vk.VK_BLEND_OP_ADD
        SUBSTRACT = vk.VK_BLEND_OP_SUBTRACT
        REVERSE_SUBSTRACT = vk.VK_BLEND_OP_REVERSE_SUBTRACT
    Severity: Major
    Found in vulk/vulkanconstant.py and 3 other locations - About 1 hr to fix
    vulk/vulkanconstant.py on lines 558..564
    vulk/vulkanconstant.py on lines 627..633
    vulk/vulkanconstant.py on lines 672..678

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

    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

    class ImageAspect(IntFlag):
        NONE = 0
        COLOR = vk.VK_IMAGE_ASPECT_COLOR_BIT
        DEPTH = vk.VK_IMAGE_ASPECT_DEPTH_BIT
        STENCIL = vk.VK_IMAGE_ASPECT_STENCIL_BIT
    Severity: Minor
    Found in vulk/vulkanconstant.py and 1 other location - About 55 mins to fix
    vulk/vulkanconstant.py on lines 123..128

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

    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

    class ColorComponent(IntFlag):
        NONE = 0
        R = vk.VK_COLOR_COMPONENT_R_BIT
        G = vk.VK_COLOR_COMPONENT_G_BIT
        B = vk.VK_COLOR_COMPONENT_B_BIT
    Severity: Minor
    Found in vulk/vulkanconstant.py and 1 other location - About 55 mins to fix
    vulk/vulkanconstant.py on lines 474..479

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

    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