style: update state panel plugin #8846
Merged
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)
failed
Sep 17, 2024 in 36s
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
Change in average Code Health of affected files: -0.31 (9.50 -> 9.19)
- Declining Code Health: 1 findings(s) 🚩
Details
🚩 Declining Code Health (highest to lowest):
- Code Duplication autoware_state_panel.cpp
Annotations
Check warning on line 579 in common/tier4_state_rviz_plugin/src/autoware_state_panel.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Code Duplication
The module contains 4 functions with similar structure: AutowareStatePanel::makeLocalizationGroup,AutowareStatePanel::makeMotionGroup,AutowareStatePanel::onMotion,AutowareStatePanel::onRoute. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.
Check notice on line 77 in common/tier4_state_rviz_plugin/src/custom_button.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Excess Number of Function Arguments
CustomElevatedButton::updateStyle increases from 6 to 8 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 100 in common/tier4_state_rviz_plugin/src/custom_segmented_button_item.cpp
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Complex Method
CustomSegmentedButtonItem::paintEvent increases in cyclomatic complexity from 14 to 15, 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.
Loading