Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lane_departure_checker,start_planner): add check for path within lanes for bvspm #6366

move the cheap/fast check first to possibly boost performance

6208d4f
Select commit
Loading
Failed to load commit list.
Merged

feat(lane_departure_checker,start_planner): add check for path within lanes for bvspm #6366

move the cheap/fast check first to possibly boost performance
6208d4f
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Feb 28, 2024 in 39s

CodeScene PR Check

Code Health Quality Gates: FAILED

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 4 findings(s) ✅
  • Affected Hotspots: 1 files(s) 🔥

Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method geometric_parallel_parking.cpp: GeometricParallelParking::planOneTrial
  • Bumpy Road Ahead geometric_parallel_parking.cpp: GeometricParallelParking::planOneTrial

✅ Improving Code Health:

  • Lines of Code in a Single File start_planner_module.cpp 🔥
  • Complex Method shift_pull_out.cpp: ShiftPullOut::plan
  • Primitive Obsession geometric_parallel_parking.cpp
  • Deep, Nested Complexity shift_pull_out.cpp: ShiftPullOut::plan

Annotations

Check notice on line 100 in planning/behavior_path_start_planner_module/src/shift_pull_out.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Complex Method

ShiftPullOut::plan is no longer above the threshold for cyclomatic complexity. 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.

Check notice on line 100 in planning/behavior_path_start_planner_module/src/shift_pull_out.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Deep, Nested Complexity

ShiftPullOut::plan is no longer above the threshold for nested complexity depth

Check notice on line 1 in planning/behavior_path_start_planner_module/src/start_planner_module.cpp

See this annotation in the file changed.

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

✅ Getting better: Lines of Code in a Single File

The lines of code decreases from 1316 to 1301, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.

Check warning on line 518 in planning/behavior_path_planner_common/src/utils/parking_departure/geometric_parallel_parking.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

GeometricParallelParking::planOneTrial increases in cyclomatic complexity from 22 to 25, 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.

Check warning on line 518 in planning/behavior_path_planner_common/src/utils/parking_departure/geometric_parallel_parking.cpp

See this annotation in the file changed.

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

❌ Getting worse: Bumpy Road Ahead

GeometricParallelParking::planOneTrial increases from 4 to 5 logical blocks with deeply nested code, threshold is one single block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check notice on line 1 in planning/behavior_path_planner_common/src/utils/parking_departure/geometric_parallel_parking.cpp

See this annotation in the file changed.

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

ℹ Getting worse: Overall Code Complexity

The mean cyclomatic complexity increases from 5.35 to 5.53, 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.

Check notice on line 1 in planning/behavior_path_planner_common/src/utils/parking_departure/geometric_parallel_parking.cpp

See this annotation in the file changed.

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

✅ Getting better: Primitive Obsession

The ratio of primitive types in function arguments decreases from 57.41% to 55.36%, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.

Check notice on line 246 in planning/behavior_path_planner_common/src/utils/parking_departure/geometric_parallel_parking.cpp

See this annotation in the file changed.

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

ℹ Getting worse: Excess Number of Function Arguments

GeometricParallelParking::planPullOut increases from 5 to 6 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.

Check notice on line 518 in planning/behavior_path_planner_common/src/utils/parking_departure/geometric_parallel_parking.cpp

See this annotation in the file changed.

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

ℹ Getting worse: Excess Number of Function Arguments

GeometricParallelParking::planOneTrial increases from 10 to 11 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.