Skip to content

clean up more

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) succeeded May 10, 2024 in 49s

CodeScene PR Check

βœ… Code Health Quality Gates: OK

  • Declining Code Health: 3 findings(s) 🚩

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Code Duplication mission_details_display.cpp
  • Complex Conditional overlay_utils.cpp: OverlayObject::updateTextureSize
  • Complex Method remaining_distance_time_display.cpp: RemainingDistanceTimeDisplay::drawRemainingDistanceTimeDisplay

Annotations

Check warning on line 84 in common/autoware_overlay_rviz_plugin/autoware_mission_details_overlay_rviz_plugin/src/mission_details_display.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Code Duplication

The module contains 2 functions with similar structure: MissionDetailsDisplay::setupRosSubscriptions,MissionDetailsDisplay::topic_updated_remaining_distance_time. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 167 in common/autoware_overlay_rviz_plugin/autoware_mission_details_overlay_rviz_plugin/src/overlay_utils.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Conditional

OverlayObject::updateTextureSize has 1 complex conditionals with 2 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.

Check warning on line 153 in common/autoware_overlay_rviz_plugin/autoware_mission_details_overlay_rviz_plugin/src/remaining_distance_time_display.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Method

RemainingDistanceTimeDisplay::drawRemainingDistanceTimeDisplay has a cyclomatic complexity of 9, threshold = 9. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.