refactor(control_evaluator): use class naming standard and use remapped param name #7782
CodeScene PR Check
✅ Code Health Quality Gates: OK
Change in average Code Health of affected files: +0.00 (8.31 -> 8.31)
- Improving Code Health: 3 findings(s) ✅
Details
✅ Improving Code Health:
- Code Duplication control_evaluator_node.cpp
- Complex Method control_evaluator_node.cpp: controlEvaluatorNode::onTimer
- Complex Conditional control_evaluator_node.cpp: controlEvaluatorNode::onTimer
Annotations
Check notice on line 201 in evaluator/autoware_control_evaluator/src/control_evaluator_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Code Duplication
introduced similar code in: ControlEvaluatorNode::generateLateralDeviationDiagnosticStatus,ControlEvaluatorNode::generateYawDeviationDiagnosticStatus. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Check notice on line 1 in evaluator/autoware_control_evaluator/src/control_evaluator_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Code Duplication
reduced similar code in: controlEvaluatorNode::generateLateralDeviationDiagnosticStatus,controlEvaluatorNode::generateYawDeviationDiagnosticStatus. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Check notice on line 233 in evaluator/autoware_control_evaluator/src/control_evaluator_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Method
controlEvaluatorNode::onTimer 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 233 in evaluator/autoware_control_evaluator/src/control_evaluator_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Complex Method
ControlEvaluatorNode::onTimer has a cyclomatic complexity of 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 1 in evaluator/autoware_control_evaluator/src/control_evaluator_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Complex Conditional
controlEvaluatorNode::onTimer 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.
Check notice on line 1 in evaluator/autoware_control_evaluator/src/control_evaluator_node.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Complex Conditional
ControlEvaluatorNode::onTimer 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.