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(simple_planning_simulator): add new vehicle model with falling down #7651

Merged

update

15ce9d0
Select commit
Loading
Failed to load commit list.
Merged

feat(simple_planning_simulator): add new vehicle model with falling down #7651

update
15ce9d0
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Jun 27, 2024 in 45s

CodeScene PR Check

Code Health Quality Gates: FAILED

  • Declining Code Health: 6 findings(s) 🚩

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method sim_model_delay_steer_acc_geared_wo_fall_guard.cpp: SimModelDelaySteerAccGearedWoFallGuard::calcModel
  • Complex Conditional simple_planning_simulator_core.cpp: SimplePlanningSimulator::set_initial_state
  • Complex Method simple_planning_simulator_core.cpp: SimplePlanningSimulator::set_input
  • Complex Method simple_planning_simulator_core.cpp: SimplePlanningSimulator::initialize_vehicle_model
  • Bumpy Road Ahead sim_model_delay_steer_acc_geared_wo_fall_guard.cpp: SimModelDelaySteerAccGearedWoFallGuard::calcModel
  • Complex Method simple_planning_simulator_core.cpp: SimplePlanningSimulator::set_initial_state

Annotations

Check warning on line 514 in simulator/simple_planning_simulator/src/simple_planning_simulator/simple_planning_simulator_core.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

SimplePlanningSimulator::set_input increases in cyclomatic complexity from 12 to 13, 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 277 in simulator/simple_planning_simulator/src/simple_planning_simulator/simple_planning_simulator_core.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

SimplePlanningSimulator::initialize_vehicle_model increases in cyclomatic complexity from 12 to 13, 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 614 in simulator/simple_planning_simulator/src/simple_planning_simulator/simple_planning_simulator_core.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

SimplePlanningSimulator::set_initial_state increases in cyclomatic complexity from 9 to 10, 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 614 in simulator/simple_planning_simulator/src/simple_planning_simulator/simple_planning_simulator_core.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Conditional

SimplePlanningSimulator::set_initial_state increases from 1 complex conditionals with 2 branches to 1 complex conditionals with 3 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 183 in simulator/simple_planning_simulator/src/simple_planning_simulator/vehicle_model/sim_model_delay_steer_acc_geared_wo_fall_guard.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Method

SimModelDelaySteerAccGearedWoFallGuard::calcModel has a cyclomatic complexity of 12, 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 183 in simulator/simple_planning_simulator/src/simple_planning_simulator/vehicle_model/sim_model_delay_steer_acc_geared_wo_fall_guard.cpp

See this annotation in the file changed.

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

❌ New issue: Bumpy Road Ahead

SimModelDelaySteerAccGearedWoFallGuard::calcModel has 2 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested 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.