IL2HorusTeam/il2fb-mission-parser

View on GitHub
profiling/profiling.py

Summary

Maintainability
B
6 hrs
Test Coverage

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

@profile
def profile_static_camera_parser():
    with ParserWrapper(StaticCameraSectionParser, 'StaticCamera', generate_static_camera_lines) as pw:
        for line in pw.lines:
            pw.parse_line(line)
Severity: Major
Found in profiling/profiling.py and 8 other locations - About 45 mins to fix
profiling/profiling.py on lines 60..64
profiling/profiling.py on lines 67..71
profiling/profiling.py on lines 74..78
profiling/profiling.py on lines 81..85
profiling/profiling.py on lines 88..92
profiling/profiling.py on lines 102..106
profiling/profiling.py on lines 109..113
profiling/profiling.py on lines 116..120

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

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

@profile
def profile_target_parser():
    with ParserWrapper(TargetSectionParser, 'Target', generate_target_lines) as pw:
        for line in pw.lines:
            pw.parse_line(line)
Severity: Major
Found in profiling/profiling.py and 8 other locations - About 45 mins to fix
profiling/profiling.py on lines 60..64
profiling/profiling.py on lines 67..71
profiling/profiling.py on lines 74..78
profiling/profiling.py on lines 88..92
profiling/profiling.py on lines 95..99
profiling/profiling.py on lines 102..106
profiling/profiling.py on lines 109..113
profiling/profiling.py on lines 116..120

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

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

@profile
def profile_buildings_parser():
    with ParserWrapper(BuildingsSectionParser, 'Buildings', generate_buildings_lines) as pw:
        for line in pw.lines:
            pw.parse_line(line)
Severity: Major
Found in profiling/profiling.py and 8 other locations - About 45 mins to fix
profiling/profiling.py on lines 60..64
profiling/profiling.py on lines 67..71
profiling/profiling.py on lines 81..85
profiling/profiling.py on lines 88..92
profiling/profiling.py on lines 95..99
profiling/profiling.py on lines 102..106
profiling/profiling.py on lines 109..113
profiling/profiling.py on lines 116..120

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

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

@profile
def profile_chief_road_parser():
    with ParserWrapper(ChiefRoadSectionParser, '0_Chief_Road', generate_cheif_road_lines) as pw:
        for line in pw.lines:
            pw.parse_line(line)
Severity: Major
Found in profiling/profiling.py and 8 other locations - About 45 mins to fix
profiling/profiling.py on lines 67..71
profiling/profiling.py on lines 74..78
profiling/profiling.py on lines 81..85
profiling/profiling.py on lines 88..92
profiling/profiling.py on lines 95..99
profiling/profiling.py on lines 102..106
profiling/profiling.py on lines 109..113
profiling/profiling.py on lines 116..120

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

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

@profile
def profile_front_marker_parser():
    with ParserWrapper(FrontMarkerSectionParser, 'FrontMarker', generate_front_marker_lines) as pw:
        for line in pw.lines:
            pw.parse_line(line)
Severity: Major
Found in profiling/profiling.py and 8 other locations - About 45 mins to fix
profiling/profiling.py on lines 60..64
profiling/profiling.py on lines 67..71
profiling/profiling.py on lines 74..78
profiling/profiling.py on lines 81..85
profiling/profiling.py on lines 88..92
profiling/profiling.py on lines 95..99
profiling/profiling.py on lines 109..113
profiling/profiling.py on lines 116..120

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

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

@profile
def profile_rocket_parser():
    with ParserWrapper(RocketSectionParser, 'Rocket', generate_rocket_lines) as pw:
        for line in pw.lines:
            pw.parse_line(line)
Severity: Major
Found in profiling/profiling.py and 8 other locations - About 45 mins to fix
profiling/profiling.py on lines 60..64
profiling/profiling.py on lines 67..71
profiling/profiling.py on lines 74..78
profiling/profiling.py on lines 81..85
profiling/profiling.py on lines 88..92
profiling/profiling.py on lines 95..99
profiling/profiling.py on lines 102..106
profiling/profiling.py on lines 116..120

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

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

@profile
def profile_born_place_parser():
    with ParserWrapper(BornPlaceSectionParser, 'BornPlace', generate_born_place_lines) as pw:
        for line in pw.lines:
            pw.parse_line(line)
Severity: Major
Found in profiling/profiling.py and 8 other locations - About 45 mins to fix
profiling/profiling.py on lines 60..64
profiling/profiling.py on lines 67..71
profiling/profiling.py on lines 74..78
profiling/profiling.py on lines 81..85
profiling/profiling.py on lines 95..99
profiling/profiling.py on lines 102..106
profiling/profiling.py on lines 109..113
profiling/profiling.py on lines 116..120

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

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

@profile
def profile_nstationary_parser():
    with ParserWrapper(NStationarySectionParser, 'NStationary', generate_nstationary_lines) as pw:
        for line in pw.lines:
            pw.parse_line(line)
Severity: Major
Found in profiling/profiling.py and 8 other locations - About 45 mins to fix
profiling/profiling.py on lines 60..64
profiling/profiling.py on lines 74..78
profiling/profiling.py on lines 81..85
profiling/profiling.py on lines 88..92
profiling/profiling.py on lines 95..99
profiling/profiling.py on lines 102..106
profiling/profiling.py on lines 109..113
profiling/profiling.py on lines 116..120

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

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

@profile
def profile_flight_route_parser():
    with ParserWrapper(FlightRouteSectionParser, '3GvIAP01_Way', generate_flight_route_lines) as pw:
        for line in pw.lines:
            pw.parse_line(line)
Severity: Major
Found in profiling/profiling.py and 8 other locations - About 45 mins to fix
profiling/profiling.py on lines 60..64
profiling/profiling.py on lines 67..71
profiling/profiling.py on lines 74..78
profiling/profiling.py on lines 81..85
profiling/profiling.py on lines 88..92
profiling/profiling.py on lines 95..99
profiling/profiling.py on lines 102..106
profiling/profiling.py on lines 109..113

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

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