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

fix(ndt_scan_matcher): improved tpe #6990

Merged

Added name in TODO

e51a74a
Select commit
Loading
Failed to load commit list.
Merged

fix(ndt_scan_matcher): improved tpe #6990

Added name in TODO
e51a74a
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) succeeded May 13, 2024 in 40s

CodeScene PR Check

Code Health Quality Gates: OK

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

View detailed results in CodeScene

Details

🚩 Declining Code Health (highest to lowest):

  • Complex Conditional tree_structured_parzen_estimator.cpp: TreeStructuredParzenEstimator::log_gaussian_pdf

✅ Improving Code Health:

  • Large Method ndt_scan_matcher_core.cpp: NDTScanMatcher::align_pose
  • Complex Method tree_structured_parzen_estimator.cpp: TreeStructuredParzenEstimator::get_next_input
  • Bumpy Road Ahead tree_structured_parzen_estimator.cpp: TreeStructuredParzenEstimator::get_next_input
  • Overall Code Complexity tree_structured_parzen_estimator.cpp

Annotations

Check notice on line 1051 in localization/ndt_scan_matcher/src/ndt_scan_matcher_core.cpp

See this annotation in the file changed.

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

✅ Getting better: Large Method

NDTScanMatcher::align_pose decreases from 93 to 81 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.

Check notice on line 98 in localization/tree_structured_parzen_estimator/src/tree_structured_parzen_estimator.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

TreeStructuredParzenEstimator::get_next_input 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 176 in localization/tree_structured_parzen_estimator/src/tree_structured_parzen_estimator.cpp

See this annotation in the file changed.

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

ℹ New issue: Complex Method

TreeStructuredParzenEstimator::log_gaussian_pdf 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.

Check warning on line 173 in localization/tree_structured_parzen_estimator/src/tree_structured_parzen_estimator.cpp

See this annotation in the file changed.

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

❌ New issue: Complex Conditional

TreeStructuredParzenEstimator::log_gaussian_pdf 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 notice on line 98 in localization/tree_structured_parzen_estimator/src/tree_structured_parzen_estimator.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Bumpy Road Ahead

TreeStructuredParzenEstimator::get_next_input is no longer above the threshold for logical blocks with deeply nested code

Check notice on line 1 in localization/tree_structured_parzen_estimator/src/tree_structured_parzen_estimator.cpp

See this annotation in the file changed.

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

✅ No longer an issue: Overall Code Complexity

The mean cyclomatic complexity in this module is no longer above the threshold