Skip to content
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Dec 16, 2024 in 34s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: +0.48 (8.05 -> 8.53)

  • Declining Code Health: 3 findings(s) 🚩
  • Improving Code Health: 9 findings(s) ✅

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Code Duplication camera_projection.cpp
  • Complex Conditional camera_projection.cpp: CameraProjection::calcRectifiedImageProjectedPoint
  • Complex Conditional camera_projection.cpp: CameraProjection::calcRawImageProjectedPoint

✅ Improving Code Health:

  • Complex Method node.cpp: RoiClusterFusionNode::fuseOnSingleImage
  • Complex Method node.cpp: RoiDetectedObjectFusionNode::generateDetectedObjectRoIs
  • Complex Conditional node.cpp: RoiDetectedObjectFusionNode::generateDetectedObjectRoIs
  • Brain Method node.cpp: RoiClusterFusionNode::fuseOnSingleImage
  • Complex Conditional node.cpp: RoiClusterFusionNode::fuseOnSingleImage
  • Excess Number of Function Arguments node.cpp: RoiClusterFusionNode::fuseOnSingleImage
  • Brain Method node.cpp: RoiDetectedObjectFusionNode::generateDetectedObjectRoIs
  • Excess Number of Function Arguments node.cpp: RoiDetectedObjectFusionNode::generateDetectedObjectRoIs
  • Overall Code Complexity utils.cpp

Annotations

Check warning on line 148 in perception/autoware_image_projection_based_fusion/src/camera_projection.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: CameraProjection::calcRawImageProjectedPoint,CameraProjection::calcRectifiedImageProjectedPoint. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.

Check warning on line 142 in perception/autoware_image_projection_based_fusion/src/camera_projection.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Conditional

CameraProjection::calcRectifiedImageProjectedPoint has 1 complex conditionals with 3 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.

Check warning on line 162 in perception/autoware_image_projection_based_fusion/src/camera_projection.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Complex Conditional

CameraProjection::calcRawImageProjectedPoint has 1 complex conditionals with 3 branches, threshold = 2. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.

Check notice on line 161 in perception/autoware_image_projection_based_fusion/src/roi_cluster_fusion/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ No longer an issue: Brain Method

RoiClusterFusionNode::fuseOnSingleImage is no longer a brain method

Check notice on line 161 in perception/autoware_image_projection_based_fusion/src/roi_cluster_fusion/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ Getting better: Complex Method

RoiClusterFusionNode::fuseOnSingleImage decreases in cyclomatic complexity from 41 to 37, 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 156 in perception/autoware_image_projection_based_fusion/src/roi_cluster_fusion/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ No longer an issue: Complex Conditional

RoiClusterFusionNode::fuseOnSingleImage no longer has a complex conditional

Check notice on line 161 in perception/autoware_image_projection_based_fusion/src/roi_cluster_fusion/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ No longer an issue: Excess Number of Function Arguments

RoiClusterFusionNode::fuseOnSingleImage is no longer above the threshold for number of arguments

Check notice on line 172 in perception/autoware_image_projection_based_fusion/src/roi_detected_object_fusion/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ No longer an issue: Brain Method

RoiDetectedObjectFusionNode::generateDetectedObjectRoIs is no longer a brain method

Check notice on line 172 in perception/autoware_image_projection_based_fusion/src/roi_detected_object_fusion/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ Getting better: Complex Method

RoiDetectedObjectFusionNode::generateDetectedObjectRoIs decreases in cyclomatic complexity from 21 to 18, 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 172 in perception/autoware_image_projection_based_fusion/src/roi_detected_object_fusion/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ No longer an issue: Complex Conditional

RoiDetectedObjectFusionNode::generateDetectedObjectRoIs no longer has a complex conditional. A complex conditional is an expression inside a branch (e.g. if, for, while) which consists of multiple, logical operators such as AND/OR. The more logical operators in an expression, the more severe the code smell.

Check notice on line 172 in perception/autoware_image_projection_based_fusion/src/roi_detected_object_fusion/node.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ No longer an issue: Excess Number of Function Arguments

RoiDetectedObjectFusionNode::generateDetectedObjectRoIs is no longer above the threshold for number of arguments

Check notice on line 1 in perception/autoware_image_projection_based_fusion/src/utils/utils.cpp

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ No longer an issue: Overall Code Complexity

The mean cyclomatic complexity in this module is no longer above the threshold