fix(ndt_scan_matcher): improved tpe #6990
Merged
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) ✅
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
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.
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.
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.
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.
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
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
Loading