CodeScene PR Check
β Quality Gates: FAILED
- Declining Code Health: 3 findings(s) π©
- Improving Code Health: 3 findings(s) β
- Affected Hotspots: 0 files(s) π₯
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
Details
π© Negative Code Health Impact (highest to lowest):
- Large Method vehicle_cmd_gate.cpp: VehicleCmdGate::VehicleCmdGate
- Complex Method vehicle_cmd_gate.cpp: VehicleCmdGate::publishControlCommands
- Bumpy Road Ahead vehicle_cmd_gate.cpp: VehicleCmdGate::publishControlCommands
β Positive Code Health Impact (highest to lowest):
- Complex Method pid_longitudinal_controller.cpp: PidLongitudinalController::updateControlState
- Large Method pid_longitudinal_controller.cpp: diagnostic_updater_
- Complex Method mpc_lateral_controller.cpp: MpcLateralController::run
Annotations
Check warning on line 447 in control/vehicle_cmd_gate/src/vehicle_cmd_gate.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β Getting worse: Complex Method
VehicleCmdGate::publishControlCommands increases in cyclomatic complexity from 12 to 16, 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 165 in control/vehicle_cmd_gate/src/vehicle_cmd_gate.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β Getting worse: Large Method
VehicleCmdGate::VehicleCmdGate increases from 152 to 155 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 warning on line 447 in control/vehicle_cmd_gate/src/vehicle_cmd_gate.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β New issue: Bumpy Road Ahead
VehicleCmdGate::publishControlCommands 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.
Check notice on line 276 in control/mpc_lateral_controller/src/mpc_lateral_controller.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β Getting better: Complex Method
MpcLateralController::run decreases in cyclomatic complexity from 10 to 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.
Check notice on line 496 in control/pid_longitudinal_controller/src/pid_longitudinal_controller.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β Getting better: Complex Method
PidLongitudinalController::updateControlState decreases in cyclomatic complexity from 33 to 32, 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 notice on line 51 in control/pid_longitudinal_controller/src/pid_longitudinal_controller.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β Getting better: Large Method
diagnostic_updater_ decreases from 116 to 114 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.