Skip to content

obtain time to stopline diff

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) succeeded May 28, 2024 in 52s

CodeScene PR Check

Code Health Quality Gates: OK

  • Improving Code Health: 5 findings(s) ✅

View detailed results in CodeScene

Details

✅ Improving Code Health:

  • Overall Code Complexity scene.cpp
  • Complex Method scene.cpp: BlindSpotModule::generateBlindSpotPolygons
  • Complex Method scene.cpp: BlindSpotModule::isCollisionDetected
  • Bumpy Road Ahead scene.cpp: BlindSpotModule::generateBlindSpotPolygons
  • Deep, Nested Complexity scene.cpp: BlindSpotModule::cutPredictPathWithDuration

Annotations

Check notice on line 128 in planning/behavior_velocity_blind_spot_module/src/scene.cpp

See this annotation in the file changed.

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

ℹ Getting worse: Complex Method

BlindSpotModule::modifyPathVelocityDetail increases in cyclomatic complexity from 9 to 12, 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 682 in planning/behavior_velocity_blind_spot_module/src/scene.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Complex Method

BlindSpotModule::generateBlindSpotPolygons is no longer above the threshold for cyclomatic complexity. 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 483 in planning/behavior_velocity_blind_spot_module/src/scene.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Complex Method

BlindSpotModule::isCollisionDetected is no longer above the threshold for cyclomatic complexity. 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 670 in planning/behavior_velocity_blind_spot_module/src/scene.cpp

See this annotation in the file changed.

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

ℹ New issue: Complex Method

BlindSpotModule::generateBlindSpotLanelets has a cyclomatic complexity of 22, 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 682 in planning/behavior_velocity_blind_spot_module/src/scene.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Bumpy Road Ahead

BlindSpotModule::generateBlindSpotPolygons 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 notice on line 670 in planning/behavior_velocity_blind_spot_module/src/scene.cpp

See this annotation in the file changed.

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

ℹ New issue: Bumpy Road Ahead

BlindSpotModule::generateBlindSpotLanelets has 4 blocks with nested conditional logic. Any nesting of 2 or deeper is considered. Threshold is one single, nested 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 1 in planning/behavior_velocity_blind_spot_module/src/scene.cpp

See this annotation in the file changed.

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

✅ Getting better: Overall Code Complexity

The mean cyclomatic complexity decreases from 4.78 to 4.52, threshold = 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 407 in planning/behavior_velocity_blind_spot_module/src/scene.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Deep, Nested Complexity

BlindSpotModule::cutPredictPathWithDuration is no longer above the threshold for nested complexity depth