feat(gyro_odometer): add diagnostic #7188
Merged
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)
failed
Jun 6, 2024 in 50s
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 2 findings(s) 🚩
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method gyro_odometer_core.cpp: GyroOdometerNode::concatGyroAndOdometer
- Code Duplication gyro_odometer_core.cpp
Annotations
Check warning on line 95 in localization/gyro_odometer/src/gyro_odometer_core.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Code Duplication
The module contains 2 functions with similar structure: GyroOdometerNode::callbackImu,GyroOdometerNode::callbackVehicleTwist. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Check warning on line 271 in localization/gyro_odometer/src/gyro_odometer_core.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
GyroOdometerNode::concatGyroAndOdometer 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.
Loading