ICTU/quality-time

View on GitHub
components/shared_code/src/shared_data_model/metrics.py

Summary

Maintainability
F
3 days
Test Coverage

File metrics.py has 720 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""Data model metrics."""

from .meta.metric import Addition, Direction, Metric, Tag, Unit

SIG_TUVIT_EVALUATION_CRITERIA = (
Severity: Major
Found in components/shared_code/src/shared_data_model/metrics.py - About 1 day to fix

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

        "uncovered_branches": Metric(
            name="Test branch coverage",
            description="The number of code branches not covered by tests.",
            rationale="Code branches not covered by tests may contain bugs and signal incomplete tests.",
            rationale_urls=[FOWLER_TEST_COVERAGE],
    Severity: Major
    Found in components/shared_code/src/shared_data_model/metrics.py and 1 other location - About 2 hrs to fix
    components/shared_code/src/shared_data_model/metrics.py on lines 652..669

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

    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

        "uncovered_lines": Metric(
            name="Test line coverage",
            description="The number of lines of code not covered by tests.",
            rationale="Code lines not covered by tests may contain bugs and signal incomplete tests.",
            rationale_urls=[FOWLER_TEST_COVERAGE],
    Severity: Major
    Found in components/shared_code/src/shared_data_model/metrics.py and 1 other location - About 2 hrs to fix
    components/shared_code/src/shared_data_model/metrics.py on lines 633..650

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 50.

    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

        "duplicated_lines": Metric(
            name="Duplicated lines",
            description="The number of lines that are duplicated.",
            rationale="Duplicate code makes software larger and thus potentially harder to maintain. "
            "Also, if the duplicated code contains bugs, they need to be fixed in multiple locations.",
    Severity: Major
    Found in components/shared_code/src/shared_data_model/metrics.py and 1 other location - About 1 hr to fix
    components/shared_code/src/shared_data_model/metrics.py on lines 204..214

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

    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

        "many_parameters": Metric(
            name="Many parameters",
            description="The number of units (functions, methods, procedures) that have too many parameters.",
            rationale="Units with many parameters are deemed harder to maintain.",
            rationale_urls=[
    Severity: Major
    Found in components/shared_code/src/shared_data_model/metrics.py and 1 other location - About 1 hr to fix
    components/shared_code/src/shared_data_model/metrics.py on lines 96..107

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

    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

    METRICS = {
        "average_issue_lead_time": Metric(
            name="Average issue lead time",
            description="The average lead time for changes completed in a certain time period.",
            rationale="The shorter the lead time for changes, the sooner the new features can be used. "
    Severity: Major
    Found in components/shared_code/src/shared_data_model/metrics.py and 1 other location - About 1 hr to fix
    components/shared_code/src/shared_data_model/sources/quality_time.py on lines 117..157

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

    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

        "todo_and_fixme_comments": Metric(
            name="Todo and fixme comments",
            description="The number of todo and fixme comments in source code.",
            rationale="Code should not contain traces of unfinished work. The presence of todo and fixme comments may "
            "be indicative of technical debt or hidden defects.",
    Severity: Major
    Found in components/shared_code/src/shared_data_model/metrics.py and 1 other location - About 1 hr to fix
    components/shared_code/src/shared_data_model/metrics.py on lines 51..64

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

    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

        "commented_out_code": Metric(
            name="Commented out code",
            description="The number of blocks of commented out lines of code.",
            rationale="Code should not be commented out because it bloats the sources and may confuse the "
            "reader as to why the code is still there, making the source code harder to understand and maintain. "
    Severity: Major
    Found in components/shared_code/src/shared_data_model/metrics.py and 1 other location - About 1 hr to fix
    components/shared_code/src/shared_data_model/metrics.py on lines 619..631

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

    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

        "failed_jobs": Metric(
            name="Failed CI-jobs",
            description="The number of continuous integration jobs or pipelines that have failed.",
            rationale="Although it is to be expected that CI-jobs or pipelines will fail from time to time, a "
            "significant number of failed CI-jobs or pipelines over a longer period of time could be a sign that "
    Severity: Minor
    Found in components/shared_code/src/shared_data_model/metrics.py and 1 other location - About 50 mins to fix
    components/shared_code/src/shared_data_model/metrics.py on lines 690..697

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

    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

        "unused_jobs": Metric(
            name="Unused CI-jobs",
            description="The number of continuous integration jobs that are unused.",
            rationale="Removing unused, obsolete CI-jobs helps to keep a clear overview of the relevant CI-jobs.",
            unit=Unit.CI_JOBS,
    Severity: Minor
    Found in components/shared_code/src/shared_data_model/metrics.py and 1 other location - About 50 mins to fix
    components/shared_code/src/shared_data_model/metrics.py on lines 109..119

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

    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

        "manual_test_duration": Metric(
            name="Manual test duration",
            description="The duration of the manual test in minutes.",
            rationale="Preferably, all regression tests are automated. When this is not feasible, it is good to "
            "know how much time it takes to execute the manual tests, since they need to be executed before every "
    Severity: Minor
    Found in components/shared_code/src/shared_data_model/metrics.py and 1 other location - About 40 mins to fix
    components/shared_code/src/shared_data_model/metrics.py on lines 194..202

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

    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

        "manual_test_execution": Metric(
            name="Manual test execution",
            description="Measure the number of manual test cases that have not been tested on time.",
            rationale="Preferably, all regression tests are automated. When this is not feasible, it is good to "
            "know whether the manual regression tests have been executed recently.",
    Severity: Minor
    Found in components/shared_code/src/shared_data_model/metrics.py and 1 other location - About 40 mins to fix
    components/shared_code/src/shared_data_model/metrics.py on lines 183..192

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

    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