Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(control_evaluator): use class naming standard and use remapped param name #7782

Merged

use class naming standard and use remapped param name

d8c2954
Select commit
Loading
Failed to load commit list.
Merged

refactor(control_evaluator): use class naming standard and use remapped param name #7782

use class naming standard and use remapped param name
d8c2954
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) succeeded Jul 2, 2024 in 47s

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) ✅

View detailed results in CodeScene

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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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

See this annotation in the file changed.

@codescene-delta-analysis 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.