Skip to content

fix(utils): add guard

This check has been archived and is scheduled for deletion. Learn more about checks retention
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Oct 12, 2023 in 52s

CodeScene PR Check

❌ Quality Gates: FAILED

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

Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene

Details

🚩 Negative Code Health Impact (highest to lowest):

  • Complex Method manager.cpp: AvoidanceModuleManager::AvoidanceModuleManager
  • Complex Method utils.cpp: getBoundWithIntersectionAreas πŸ”₯
  • Large Method avoidance_module.cpp: AvoidanceModule::plan πŸ”₯
  • Complex Method avoidance_module.cpp: AvoidanceModule::fillEgoStatus πŸ”₯

Annotations

Check notice on line 1 in planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.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 2117 to 2152, 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 522 in planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

AvoidanceModule::fillEgoStatus increases in cyclomatic complexity from 10 to 11, 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 warning on line 2105 in planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp

See this annotation in the file changed.

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

❌ New issue: Large Method

AvoidanceModule::plan has 71 lines, 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 notice on line 1 in planning/behavior_path_planner/src/scene_module/avoidance/avoidance_module.cpp

See this annotation in the file changed.

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

β„Ή Getting worse: Overall Code Complexity

The mean cyclomatic complexity increases from 5.94 to 5.98, 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 warning on line 205 in planning/behavior_path_planner/src/scene_module/avoidance/manager.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

AvoidanceModuleManager::AvoidanceModuleManager already has high cyclomatic complexity, and now it increases in Lines of Code from 235 to 237. 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_path_planner/src/utils/utils.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 2757 to 2762, 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 1766 in planning/behavior_path_planner/src/utils/utils.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

getBoundWithIntersectionAreas increases in cyclomatic complexity from 28 to 30, 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_path_planner/src/utils/utils.cpp

See this annotation in the file changed.

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

β„Ή Getting worse: Overall Code Complexity

The mean cyclomatic complexity increases from 6.11 to 6.13, 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.