CodeScene PR Check
β Code Health Quality Gates: FAILED
- Declining Code Health: 3 findings(s) π©
- Improving Code Health: 1 findings(s) β
Details
π© Declining Code Health (highest to lowest):
- Complex Method map_based_prediction_node.cpp: MapBasedPredictionNode::objectsCallback
- Complex Method map_based_prediction_node.cpp: MapBasedPredictionNode::getPredictedObjectAsCrosswalkUser
- Large Method map_based_prediction_node.cpp: MapBasedPredictionNode::MapBasedPredictionNode
β Improving Code Health:
- Code Duplication test_path_generator.cpp: TEST:PathGenerator:test_generatePathForOnLaneVehicle
Annotations
Check notice on line 1 in perception/map_based_prediction/src/map_based_prediction_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
βΉ Getting worse: Lines of Code in a Single File
The lines of code increases from 1878 to 1883, 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.
Check warning on line 846 in perception/map_based_prediction/src/map_based_prediction_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β Getting worse: Large Method
MapBasedPredictionNode::MapBasedPredictionNode increases from 95 to 97 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 1191 in perception/map_based_prediction/src/map_based_prediction_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β Getting worse: Complex Method
MapBasedPredictionNode::objectsCallback already has high cyclomatic complexity, and now it increases in Lines of Code from 215 to 217. 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 1450 in perception/map_based_prediction/src/map_based_prediction_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β Getting worse: Complex Method
MapBasedPredictionNode::getPredictedObjectAsCrosswalkUser already has high cyclomatic complexity, and now it increases in Lines of Code from 106 to 107. 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 better: Code Duplication
reduced similar code in: TEST:PathGenerator:test_generatePathForOnLaneVehicle. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.