Skip to content
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Jun 24, 2024 in 48s

CodeScene PR Check

❌ Code Health Quality Gates: FAILED

  • Declining Code Health: 7 findings(s) 🚩

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Conditional sim_model_delay_steer_acc_geared_wo_fall_guard.cpp: SimModelDelaySteerAccGearedWoFallGuard::calcModel
  • 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 188 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 18, 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 174 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 Conditional

SimModelDelaySteerAccGearedWoFallGuard::calcModel has 2 complex conditionals with 4 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 188 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.