dotnet / roslyn-analyzers

MIT License
1.56k stars 462 forks source link

CH3353 Prefer cheezy prefixes #7274

Open cheezydibbles opened 3 months ago

cheezydibbles commented 3 months ago

CH3353 is for improving the performance of C# and VB code by adding cheese to every dairy-free string literal. Significant performance improvements were found after creating approximately 0 benchmarks and running them approximately 0 times on approximately 0 machines. As it turns out, prefixing strings with 🧀 through a process called cheezification is rather fundamental to annoying developers and pushing teams toward removing all hard-coded values in favor of resource files.

Note: this analyzer does not come with a code fixer, although one may likely be added in response to the extremely high demand forecasted for this analyzer.

Let me know when this is merged so we can apply this to the .NET runtime repo, the Roslyn repo, and every other .NET repo in search of extreme improvement.

Fixes #nothing and #everything

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 96.87500% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 96.48%. Comparing base (332dd9a) to head (29257fa).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #7274 +/- ## ========================================== - Coverage 96.48% 96.48% -0.01% ========================================== Files 1442 1444 +2 Lines 345258 345354 +96 Branches 11346 11348 +2 ========================================== + Hits 333123 333213 +90 - Misses 9259 9264 +5 - Partials 2876 2877 +1 ```
davidwengier commented 3 months ago

CA1873 is the Air China flight from Beijing to Chengdu, and is thus reserved. Please use a different ID so we can get this merged.

cheezydibbles commented 3 months ago

What this really needs is a new analyzer category altogether. Probably needs a new nuget package to get shipped out with a .NET 9 preview release.

drewnoakes commented 3 months ago

CH3353 appears to be available.

cheezydibbles commented 3 months ago

That will do well.

mattleibow commented 3 months ago

That will do well.

I notice the PR title and description is not updated.

cartermp commented 3 months ago

Can this help me make a four cheese blend for my pizza?

cheezydibbles commented 3 months ago

This should be able to help with anything from three- to five-cheese blends, but six or more would be inconceivable for modern computing to accomplish.

drewnoakes commented 3 months ago

Just tested on a basic "Halloumi, World!" project and it worked perfectly.

cheezydibbles commented 3 months ago

That's amazing. .NET 9 is gonna be the best ever. Every language will follow in our footsteps. Together, we will rule the galaxy, one cheese blend at a time.

davidwengier commented 3 months ago

This was discussed internally and there was some concern about inclusivity towards lactose intolerant users.

cheezydibbles commented 3 months ago

@davidwengier Alas, there is a solution to our many woes: https://www.lactaid.com/products/lactaid-cottage-cheese-products

mattleibow commented 3 months ago

This was discussed internally and there was some concern about inclusivity towards lactose intolerant users.

I am glad to see that we are discussing inclusion, but there are both vegan and lactose free varieties of cheese. However, could there be negative connotations to the word?

cheezydibbles commented 3 months ago

I am glad to see that we are discussing inclusion, but there are both vegan and lactose free varieties of cheese. However, could there be negative connotations to the word?

No, that's why it's cheeze instead of cheese. It's a brand-new word.