-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Remove IDE0059: Value assigned to variable is never used #3155
Remove IDE0059: Value assigned to variable is never used #3155
Conversation
Thanks vgromfeld for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
|
@vgromfeld Here is what we see. The build is failing. DataGrid\DataGridDataConnection.cs(546,26): error SA1513: Closing brace must be followed by blank line [D:\a\1\s\Microsoft.Toolkit.Uwp.UI.Controls.DataGrid\Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.csproj] Rss\RssHelper.cs(377,62): error SA1311: Static readonly fields must begin with upper-case letter [D:\a\1\s\Microsoft.Toolkit.Parsers\Microsoft.Toolkit.Parsers.csproj] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @vgromfeld for this clean-up! Couple of minor questions, and also @Kyaa-dost pointed out some other style validations which prevent the build CI from completing. Otherwise, looking great!
Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGridCellsPresenter.cs
Show resolved
Hide resolved
Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGridColumnHeader.cs
Show resolved
Hide resolved
Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGridColumnHeadersPresenter.cs
Outdated
Show resolved
Hide resolved
Microsoft.Toolkit.Uwp.UI.Controls/ImageCropper/ImageCropper.Events.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found more about the handled
question, think that's my only item left. :)
Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGridColumnHeader.cs
Show resolved
Hide resolved
This PR has been marked as "needs attention 👋" and awaiting a response from the team. |
@azchohfi think we're all good here, eh? |
Microsoft.Toolkit.Uwp.Connectivity/BluetoothLEHelper/ObservableGattDeviceService.cs
Outdated
Show resolved
Hide resolved
...oft.Toolkit.Uwp.Notifications/DesktopNotificationManager/DesktopNotificationManagerCompat.cs
Outdated
Show resolved
Hide resolved
This PR has been marked as "needs attention 👋" and awaiting a response from the team. |
🎉 Thanks @vgromfeld for this great clean-up work! |
PR Type
What kind of change does this PR introduce?
Code style update (formatting)
What is the current behavior?
The current code base contains a lot of IDE0059: Value assigned to variable is never used error messages.
Some are styling issues like
Others are related to unused objects being allocated like:
Some others are related to unused out parameters/returned variables which are not explicitly discarded. See Discards.
All those unused variables are not needed and will consumed memory and/or perform useless computation. They can be removed.
What is the new behavior?
After this change, the code behavior is exactly the same. I've removed the unused variables and use the discard operator where needed.
I've also remove two unused methods.
PR Checklist
Please check if your PR fulfills the following requirements:
Other information