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

feat(planning_evaluator): add evaluation feature of trajectory lateral displacement #9718

feat(metrics_utils): add function to trim trajectory based on distanc…

2a221df
Select commit
Loading
Failed to load commit list.
Merged

feat(planning_evaluator): add evaluation feature of trajectory lateral displacement #9718

feat(metrics_utils): add function to trim trajectory based on distanc…
2a221df
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Dec 23, 2024 in 46s

CodeScene PR Check

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: +0.16 (8.76 -> 8.92)

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 2 findings(s) ✅

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Method metrics_calculator.cpp: MetricsCalculator::calculate
  • Complex Conditional metrics_utils.cpp: get_lookahead_trajectory

✅ Improving Code Health:

  • Overall Code Complexity metrics_calculator.cpp
  • Complex Conditional metrics_calculator.cpp: MetricsCalculator::getLookaheadTrajectory

Annotations

Check warning on line 62 in evaluator/autoware_planning_evaluator/src/metrics/metrics_utils.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Conditional

get_lookahead_trajectory 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.

Check warning on line 73 in evaluator/autoware_planning_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

MetricsCalculator::calculate increases in cyclomatic complexity from 18 to 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.

Check notice on line 124 in evaluator/autoware_planning_evaluator/src/metrics_calculator.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

MetricsCalculator::getLookaheadTrajectory no longer has a complex conditional

Check notice on line 1 in evaluator/autoware_planning_evaluator/src/metrics_calculator.cpp

See this annotation in the file changed.

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

✅ Getting better: Overall Code Complexity

The mean cyclomatic complexity decreases from 4.25 to 4.14, 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.