Skip to content

[StyleCleanUp] Use compound assignment (IDE0054) #10620

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

Merged
merged 2 commits into from
Apr 7, 2025

Conversation

jizc
Copy link
Contributor

@jizc jizc commented Mar 23, 2025

Fixes #10619

Description

Fixes all IDE0054 warnings by switching to compound assignment. All changes were automated, with the exception of restoring comments in Popup.cs, and the removal of redundant braces (second commit).

Customer Impact

Cleaner codebase for developers.

Regression

No.

Testing

Local build.

Risk

None.

Microsoft Reviewers: Open in CodeFlow

@jizc jizc requested review from a team as code owners March 23, 2025 13:25
@dotnet-policy-service dotnet-policy-service bot added PR metadata: Label to tag PRs, to facilitate with triage Community Contribution A label for all community Contributions labels Mar 23, 2025
@h3xds1nz
Copy link
Member

I wonder why that one doesn't trigger an error during compilation since its warning level.

But I guess IDE0074's suggestion overrides that.

dotnet_diagnostic.IDE0074.severity = suggestion

Or maybe since both IDE0054 and IDE0074 fall under this.

dotnet_style_prefer_compound_assignment = true:suggestion

Anyways, LGTM though I firmly believe some simply hurt readibility in pursuit of shorter line haha.

Copy link

codecov bot commented Mar 23, 2025

Codecov Report

Attention: Patch coverage is 0.83333% with 119 lines in your changes missing coverage. Please review.

Project coverage is 11.21257%. Comparing base (2ded801) to head (d73f0c0).
Report is 14 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #10620         +/-   ##
===================================================
+ Coverage   10.95887%   11.21257%   +0.25370%     
===================================================
  Files           3310        3310                 
  Lines         664667      664665          -2     
  Branches       74667       74667                 
===================================================
+ Hits           72840       74526       +1686     
+ Misses        590685      588907       -1778     
- Partials        1142        1232         +90     
Flag Coverage Δ
Debug 11.21257% <0.83333%> (+0.25370%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dipeshmsft dipeshmsft self-assigned this Mar 28, 2025
dipeshmsft
dipeshmsft previously approved these changes Mar 28, 2025
@dipeshmsft dipeshmsft merged commit 23723b9 into dotnet:main Apr 7, 2025
8 checks passed
@dipeshmsft
Copy link
Member

Thanks @jizc for your contribution.

@jizc jizc deleted the style-clean-up/ide0054 branch April 7, 2025 08:16
@jizc
Copy link
Contributor Author

jizc commented Apr 7, 2025

Thank you for merging!

@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Community Contribution A label for all community Contributions PR metadata: Label to tag PRs, to facilitate with triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IDE0054: Use compound assignment
4 participants