CodeScene PR Check
β Code Health Quality Gates: FAILED
Change in average Code Health of affected files: +0.17 (8.42 -> 8.59)
- Declining Code Health: 1 findings(s) π©
- Improving Code Health: 6 findings(s) β
Details
π© Declining Code Health (highest to lowest):
- Overall Code Complexity fusion_node.cpp
β Improving Code Health:
- Complex Method fusion_node.cpp: subCallback
- Complex Method fusion_node.cpp: roiCallback
- Bumpy Road Ahead fusion_node.cpp: subCallback
- Bumpy Road Ahead fusion_node.cpp: roiCallback
- Deep, Nested Complexity fusion_node.cpp: subCallback
- Deep, Nested Complexity fusion_node.cpp: roiCallback
Annotations
Check notice on line 366 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β Getting better: Complex Method
subCallback decreases in cyclomatic complexity from 20 to 19, 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 430 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β Getting better: Complex Method
roiCallback decreases in cyclomatic complexity from 10 to 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 366 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β Getting better: Bumpy Road Ahead
subCallback decreases from 5 to 3 logical blocks with deeply nested code, threshold is one single block per function. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
Check notice on line 430 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β No longer an issue: Bumpy Road Ahead
roiCallback is no longer above the threshold for logical blocks with deeply nested code. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.
Check warning on line 1 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β New issue: Overall Code Complexity
This module has a mean cyclomatic complexity of 6.29 across 7 functions. The mean complexity threshold is 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
Check notice on line 366 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β No longer an issue: Deep, Nested Complexity
subCallback is no longer above the threshold for nested complexity depth
Check notice on line 430 in perception/autoware_image_projection_based_fusion/src/fusion_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β No longer an issue: Deep, Nested Complexity
roiCallback is no longer above the threshold for nested complexity depth
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
βΉ Getting worse: Complex Method
RoiClusterFusionNode::fuseOnSingleImage already has high cyclomatic complexity, and now it increases in Lines of Code from 117 to 118. 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: Complex Method
RoiDetectedObjectFusionNode::generateDetectedObjectRoIs already has high cyclomatic complexity, and now it increases in Lines of Code from 75 to 76. 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.