CodeScene PR Check
❌ Code Health Quality Gates: FAILED
Change in average Code Health of affected files: -0.03 (6.57 -> 6.54)
- Declining Code Health: 9 findings(s) 🚩
- Improving Code Health: 3 findings(s) ✅
- Affected Hotspots: 2 files(s) 🔥
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method manager.cpp: LaneChangeModuleManager::set_params
- Large Method manager.cpp: LaneChangeModuleManager::updateModuleParams
- Deep, Nested Complexity path.cpp: generate_frenet_candidates
- Complex Method path.cpp: generate_frenet_candidates
- Large Method path.cpp: get_candidate_path
- Large Method markers.cpp: ShowLaneChangeMetricsInfo
- Complex Method path.cpp: get_prepare_segment
- Bumpy Road Ahead markers.cpp: ShowLaneChangeMetricsInfo
- Bumpy Road Ahead path.cpp: generate_frenet_candidates
✅ Improving Code Health:
- Overall Code Complexity path.cpp
- Complex Method scene.cpp: NormalLaneChange::get_lane_change_paths 🔥
- Bumpy Road Ahead scene.cpp: NormalLaneChange::get_lane_change_paths 🔥
Annotations
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 1461 to 1529, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
NormalLaneChange::get_lane_change_paths 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Complex Method
NormalLaneChange::get_path_using_path_shifter has a cyclomatic complexity of 17, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Bumpy Road Ahead
NormalLaneChange::get_lane_change_paths 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Bumpy Road Ahead
NormalLaneChange::get_path_using_path_shifter has 2 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Overall Code Complexity
The mean cyclomatic complexity increases from 4.92 to 4.94, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
generate_frenet_candidates has a cyclomatic complexity of 17, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Complex Method
get_prepare_segment has a cyclomatic complexity of 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Large Method
get_candidate_path has 86 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
generate_frenet_candidates has 2 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Overall Code Complexity
The mean cyclomatic complexity decreases from 4.63 to 4.10, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Deep, Nested Complexity
generate_frenet_candidates has a nested complexity depth of 4, threshold = 4. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Excess Number of Function Arguments
init_sampling_parameters has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Overall Code Complexity
The mean cyclomatic complexity increases from 4.78 to 4.79, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Complex Method
calculateCartesian increases in cyclomatic complexity from 9 to 10, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ Getting worse: Complex Method
LaneChangeModuleManager::set_params already has high cyclomatic complexity, and now it increases in Lines of Code from 207 to 213. 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: Large Method
LaneChangeModuleManager::updateModuleParams increases from 106 to 115 lines of code, 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Large Method
ShowLaneChangeMetricsInfo has 73 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Bumpy Road Ahead
ShowLaneChangeMetricsInfo has 2 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.