-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Avoid zero-length array allocations #19300
Conversation
Hey there @molesmoke! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Maybe the CA1825 warning should be treated as an error |
Does this get rid of all the warnings? If yes, I would indeed say treat this as an error from now on? @hartez? |
ff39ab5
to
56ec88b
Compare
@jfversluis Yup, this fixes all occurrences - or at least all that I'm aware of :). At the moment its enforcement is limited to Core, but seems reasonable to me that it should be solution-wide. |
e739f7a
to
3cc58c1
Compare
@jfversluis Seems like I did miss a few 😅 The iOS ones needed a bit of manual effort to fix up |
/azp run MAUI-UITests-public |
Azure Pipelines successfully started running 1 pipeline(s). |
3cc58c1
to
ca88590
Compare
/rebase |
ca88590
to
aa84d7c
Compare
We should enforce this in all of the projects eventually (we already do in Core). But if we're going to PR a change to fix all the rule violations in a project, we also need to turn on enforcement of the rule for that project (so no new violations creep in). So at the very least, this PR needs to add editorconfig changes to enforce CA1825 for each other project. I would prefer we do these one project per PR (it makes for a much easier review), but I'd consider taking this if the editorconfig entries were there. |
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.
Add missing editorconfig entries.
aa84d7c
to
74cf8f4
Compare
74cf8f4
to
4d0de9e
Compare
/azp run MAUI-UITests-public |
Azure Pipelines successfully started running 1 pipeline(s). |
🤣🤦🏽♂️
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: azure-pipelines[bot] ***@***.***>
Sent: Friday, January 12, 2024 9:11:02 PM
To: dotnet/maui ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [dotnet/maui] Avoid zero-length array allocations (PR #19300)
Azure Pipelines successfully started running 1 pipeline(s).
—
Reply to this email directly, view it on GitHub<#19300 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AECNY5S7NSDHL6OOMRSZKK3YOER5NAVCNFSM6AAAAABALXP7L2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBZGAYTKMZWGU>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Sorry, my bad. Somehow I missed that you'd put it at the root. |
Description of Change
Noticed while looking at another issue that CA1825 is configured as an error in .editorconfig, but there are various violations.
Pretty minor, but looks like it saves a reasonable number of allocations in some bindings scenarios at least. Thought the blanket fix-all should be reasonable since it should be a non-breaking change.