CodeScene PR Check
β Code Health Quality Gates: FAILED
- Declining Code Health: 4 findings(s) π©
- Improving Code Health: 1 findings(s) β
- Affected Hotspots: 2 files(s) π₯
Details
π© Declining Code Health (highest to lowest):
- Large Method manager.cpp: StartPlannerModuleManager::updateModuleParams
- Large Method manager.cpp: StartPlannerModuleManager::init
- Complex Method safety_check.cpp: getCollidedPolygons π₯
- Complex Method logging.cpp: LoggingNode::dump_unit
β Improving Code Health:
- 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 355 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 290 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: Lines of Code in a Single File
The lines of code increases from 1398 to 1399, 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.