Skip to content

fix(radar_object_tracker): fix duplicateBranch warning

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) succeeded Jun 26, 2024 in 47s

CodeScene PR Check

Code Health Quality Gates: OK

  • Improving Code Health: 2 findings(s) ✅

View detailed results in CodeScene

Details

✅ Improving Code Health:

  • Overall Code Complexity linear_motion_tracker.cpp
  • Large Method linear_motion_tracker.cpp: LinearMotionTracker::LinearMotionTracker

Annotations

Check notice on line 153 in perception/radar_object_tracker/src/tracker/model/linear_motion_tracker.cpp

See this annotation in the file changed.

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

✅ Getting better: Large Method

LinearMotionTracker::LinearMotionTracker decreases from 76 to 70 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.

Check notice on line 1 in perception/radar_object_tracker/src/tracker/model/linear_motion_tracker.cpp

See this annotation in the file changed.

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

✅ Getting better: Overall Code Complexity

The mean cyclomatic complexity decreases from 5.38 to 5.25, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.