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

style: update state panel plugin #8846

Merged

remove commented line

3bd34d7
Select commit
Loading
Failed to load commit list.
Merged

style: update state panel plugin #8846

remove commented line
3bd34d7
Select commit
Loading
Failed to load commit list.
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) 🚩

View detailed results in CodeScene

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

See this annotation in the file changed.

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

See this annotation in the file changed.

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

See this annotation in the file changed.

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