CodeScene PR Check
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 8 findings(s) 🚩
- Improving Code Health: 2 findings(s) ✅
- Affected Hotspots: 5 files(s) 🔥
Details
🚩 Declining Code Health (highest to lowest):
- Large Method manager.cpp: GoalPlannerModuleManager::updateModuleParams
- Large Method manager.cpp: StartPlannerModuleManager::updateModuleParams
- Large Method manager.cpp: GoalPlannerModuleManager::init
- Large Method manager.cpp: StartPlannerModuleManager::init
- Complex Method manager.cpp: LaneChangeModuleManager::initParams
- Complex Method safety_check.cpp: getCollidedPolygons 🔥
- Complex Method goal_planner_module.cpp: GoalPlannerModule::isSafePath 🔥
- Complex Method logging.cpp: LoggingNode::dump_unit
✅ Improving Code Health:
- Complex Method start_planner_module.cpp: StartPlannerModule::isPreventingRearVehicleFromPassingThrough 🔥
- Code Duplication operation_mode.cpp
Annotations
Check warning on line 90 in system/diagnostic_graph_utils/src/node/logging.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
LoggingNode::dump_unit has a cyclomatic complexity of 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 1 in system/default_ad_api/src/operation_mode.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Code Duplication
The module no longer contains too many functions with similar structure
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Complex Method
getCollidedPolygons increases in cyclomatic complexity from 13 to 15, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Primitive Obsession
The ratio of primitive types in function arguments increases from 35.16% to 36.56%, threshold = 30.0%. The functions in this file have too many primitive types (e.g. int, double, float) in their function argument lists. Using many primitive types lead to the code smell Primitive Obsession. Avoid adding more primitive arguments.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Excess Number of Function Arguments
checkSafetyWithRSS increases from 8 to 9 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Excess Number of Function Arguments
checkCollision increases from 8 to 9 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Large Method
StartPlannerModuleManager::updateModuleParams increases from 353 to 359 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Large Method
StartPlannerModuleManager::init increases from 288 to 292 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Complex Method
StartPlannerModule::isPreventingRearVehicleFromPassingThrough decreases in cyclomatic complexity from 18 to 17, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 1953 to 1955, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Complex Method
GoalPlannerModule::isSafePath already has high cyclomatic complexity, and now it increases in Lines of Code from 106 to 108. 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Large Method
GoalPlannerModuleManager::updateModuleParams increases from 357 to 360 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Large Method
GoalPlannerModuleManager::init increases from 339 to 341 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Complex Method
LaneChangeModuleManager::initParams already has high cyclomatic complexity, and now it increases in Lines of Code from 197 to 199. 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 1747 to 1749, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 1263 to 1264, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Complex Method
StaticObstacleAvoidanceModule::isSafePath already has high cyclomatic complexity, and now it increases in Lines of Code from 82 to 83. 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.