Skip to content

measure the overshoot into unprotected area and check the overshoot

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Oct 17, 2023 in 49s

CodeScene PR Check

❌ Code Health Quality Gates: FAILED

  • Declining Code Health: 1 findings(s) 🚩
  • Improving Code Health: 4 findings(s) βœ…
  • Affected Hotspots: 1 files(s) πŸ”₯

Recommended Review Level: Lightweight sanity check
View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method scene_intersection.cpp: IntersectionModule::modifyPathVelocityDetail πŸ”₯

βœ… Improving Code Health:

  • Lines of Code in a Single File util.cpp
  • Overall Code Complexity util.cpp
  • Complex Method util.cpp: generateIntersectionStopLines
  • Complex Conditional scene_intersection.cpp: IntersectionModule::modifyPathVelocityDetail πŸ”₯

Annotations

Check notice on line 1097 in planning/behavior_velocity_intersection_module/src/scene_intersection.cpp

See this annotation in the file changed.

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

βœ… Getting better: Complex Conditional

IntersectionModule::modifyPathVelocityDetail decreases from 2 complex conditionals with 6 branches to 1 complex conditionals with 2 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 1 in planning/behavior_velocity_intersection_module/src/scene_intersection.cpp

See this annotation in the file changed.

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

β„Ή Getting worse: Lines of Code in a Single File

The lines of code increases from 1625 to 1630, 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 1164 in planning/behavior_velocity_intersection_module/src/scene_intersection.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

IntersectionModule::modifyPathVelocityDetail already has high cyclomatic complexity, and now it increases in Lines of Code from 295 to 301. 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 planning/behavior_velocity_intersection_module/src/util.cpp

See this annotation in the file changed.

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

βœ… Getting better: Lines of Code in a Single File

The lines of code decreases from 1179 to 1175, 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 notice on line 441 in planning/behavior_velocity_intersection_module/src/util.cpp

See this annotation in the file changed.

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

βœ… Getting better: Complex Method

generateIntersectionStopLines decreases in cyclomatic complexity from 20 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 1 in planning/behavior_velocity_intersection_module/src/util.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 7.19 to 7.14, 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.