Skip to content

style(pre-commit): autofix

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed May 31, 2024 in 55s

CodeScene PR Check

Code Health Quality Gates: FAILED

  • Declining Code Health: 2 findings(s) 🚩

View detailed results in CodeScene

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

See this annotation in the file changed.

@codescene-delta-analysis 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 270 in localization/gyro_odometer/src/gyro_odometer_core.cpp

See this annotation in the file changed.

@codescene-delta-analysis 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.