CodeScene PR Check
β Code Health Quality Gates: FAILED
Change in average Code Health of affected files: +0.61 (2.68 -> 3.29)
- Declining Code Health: 4 findings(s) π©
- Improving Code Health: 6 findings(s) β
- Affected Hotspots: 1 files(s) π₯
Details
π© Declining Code Health (highest to lowest):
- Complex Method decision_state.cpp: PathDecisionStateController::get_next_state
- Complex Conditional decision_state.cpp: PathDecisionStateController::get_next_state
- Excess Number of Function Arguments decision_state.cpp: PathDecisionStateController::transit_state
- Bumpy Road Ahead decision_state.cpp: PathDecisionStateController::get_next_state
β Improving Code Health:
- Lines of Code in a Single File goal_planner_module.cpp π₯
- Overall Code Complexity goal_planner_module.cpp π₯
- Complex Conditional goal_planner_module.cpp: PathDecisionStateController::get_next_state π₯
- Complex Method goal_planner_module.cpp: PathDecisionStateController::get_next_state π₯
- Bumpy Road Ahead goal_planner_module.cpp: PathDecisionStateController::get_next_state π₯
- Excess Number of Function Arguments goal_planner_module.cpp: PathDecisionStateController::transit_state π₯
Annotations
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β New issue: Complex Method
PathDecisionStateController::get_next_state has a cyclomatic complexity of 19, 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 Conditional
PathDecisionStateController::get_next_state has 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β New issue: Bumpy Road Ahead
PathDecisionStateController::get_next_state 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)
β New issue: Excess Number of Function Arguments
PathDecisionStateController::transit_state has 13 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 better: Lines of Code in a Single File
The lines of code decreases from 2005 to 1871, 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
PathDecisionStateController::get_next_state 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)
β No longer an issue: Complex Conditional
PathDecisionStateController::get_next_state 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.
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
β No longer an issue: Bumpy Road Ahead
PathDecisionStateController::get_next_state 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)
β Getting better: Overall Code Complexity
The mean cyclomatic complexity decreases from 6.44 to 6.31, 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)
β No longer an issue: Excess Number of Function Arguments
PathDecisionStateController::transit_state is no longer above the threshold for number of arguments. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.